Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1197 npm build warnings in ci #1203

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Conversation

MyPyDavid
Copy link
Member

Description

Related issue: #1197

Motivation and Context

How has this been tested?

Screenshots (if appropriate)

@MyPyDavid MyPyDavid self-assigned this Nov 27, 2024
Copy link
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice thanks for looking into it. However, I don't want the profile hints in watch mode. But I want the export 'default' warning. I thought about adding a warningsConfig in webpack.config.js, but not if args.watch is set. Or we add a build:testing with a testingConfig. What do you think?

webpack.config.js Outdated Show resolved Hide resolved
@MyPyDavid
Copy link
Member Author

yeah, also thought about adding another config. By adding a testingConfig I can keep the other Configs the same right?

@jochenklar
Copy link
Member

Yes, and testing is pretty common as environment. You just need an else if in the last block.

@MyPyDavid MyPyDavid force-pushed the 1197-npm-build-warnings-in-ci branch from 9bc5100 to 48c2de7 Compare November 28, 2024 16:08
@@ -2,6 +2,7 @@
"name": "rdmo",
"scripts": {
"build:prod": "webpack --config webpack.config.js --mode production",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest that build:prod fails on warnings and testing does not, but contains the performance hints.

Copy link
Member Author

@MyPyDavid MyPyDavid Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive added an object ignorePerformanceWarnings that build:prod build:dist gets so that it can fail on other warnings

package.json Outdated Show resolved Hide resolved
webpack.config.js Outdated Show resolved Hide resolved
@MyPyDavid MyPyDavid force-pushed the 1197-npm-build-warnings-in-ci branch from 48c2de7 to dff1508 Compare November 29, 2024 09:16
@MyPyDavid MyPyDavid requested a review from jochenklar November 29, 2024 09:19
Copy link
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should name it different from testing if the only difference is that the performance warnings are suppressed. build:warn maybe? It could also fail on warnings i guess. We will probaly not use it much. But you can also merge right away.

@MyPyDavid
Copy link
Member Author

what about build:dist for the distribution build that uses prod mode but ignores the performance warnings, and build:prod for the build that fails on all warnings?

@MyPyDavid MyPyDavid force-pushed the 1197-npm-build-warnings-in-ci branch from dff1508 to 5ffd801 Compare December 2, 2024 13:47
@jochenklar
Copy link
Member

yes, I like it! But ... build:dist for the build process (fails on warnings, no performance warnings) and build:prod (does not fail, but shows performance warnings).

Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
@MyPyDavid MyPyDavid force-pushed the 1197-npm-build-warnings-in-ci branch from 5ffd801 to 93e5ece Compare December 2, 2024 14:01
@MyPyDavid MyPyDavid marked this pull request as ready for review December 2, 2024 14:06
Copy link
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@MyPyDavid MyPyDavid force-pushed the 1197-npm-build-warnings-in-ci branch from 93e5ece to f0572f7 Compare December 2, 2024 14:14
@MyPyDavid
Copy link
Member Author

alright, the ci now uses build:dist instead of build:prod,
ready for merge but waiting on tests to pass

@MyPyDavid MyPyDavid added this to the RDMO 2.3.0 milestone Dec 2, 2024
@MyPyDavid MyPyDavid linked an issue Dec 2, 2024 that may be closed by this pull request
@MyPyDavid MyPyDavid merged commit b5397a5 into 2.3.0 Dec 2, 2024
19 checks passed
@MyPyDavid MyPyDavid deleted the 1197-npm-build-warnings-in-ci branch December 2, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

npm build warnings in CI
2 participants