-
Notifications
You must be signed in to change notification settings - Fork 70
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
Correctly report errors during the first compilation #121
base: master
Are you sure you want to change the base?
Correctly report errors during the first compilation #121
Conversation
Errors are ignored the first time the Rust code is compiled. This causes `yarn run build` on downstream projects to succeed even when compilation actually failed.
plugin.js
Outdated
if (this.error != null) { | ||
compilation.errors.push(this.error) | ||
} | ||
|
||
// Super hacky, needed to workaround a bug in Webpack which causes | ||
// thisCompilation to be triggered twice on the first compilation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afilini did you check that it doesn't trigget this bug again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me with webpack 4.46.0
, I'm not sure how to reproduce the bug described there
plugin.js
Outdated
if (this.error != null) { | ||
compilation.errors.push(this.error) | ||
} | ||
|
||
// Super hacky, needed to workaround a bug in Webpack which causes | ||
// thisCompilation to be triggered twice on the first compilation. | ||
if (first) { | ||
first = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't use first
anymore can you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
Errors are ignored the first time the Rust code is compiled. This causes
yarn run build
on downstream projects to succeed even when compilationactually failed.