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

Correctly report errors during the first compilation #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

afilini
Copy link

@afilini afilini commented Nov 1, 2021

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.

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.
Copy link
Member

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?

Copy link
Author

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
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

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

Sure!

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.

2 participants