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

Build errors are reported twice #1374

Open
1 of 3 tasks
jhiode opened this issue Oct 5, 2020 · 0 comments
Open
1 of 3 tasks

Build errors are reported twice #1374

jhiode opened this issue Oct 5, 2020 · 0 comments
Labels

Comments

@jhiode
Copy link
Contributor

jhiode commented Oct 5, 2020

This is my intent (choose one)

  • I want to report a bug
  • I want to request a feature or change
  • I want to provide or change a feature

The problem

Running hops build with a build error results in the error message being printed twice to the console.

Proposed solution

It should be sufficient to print the message only once.

The reason is that we are having two callbacks for the compilation:

if (watch) {
compiler.watch(watchOptions, callback);
} else {
compiler.run(callback);
}

This will reject the build promise and that results in the handleError hook getting called.

.catch(this.handleError),

And in that hook we just log the error:

handleError(error) {
this.getLogger().error(error);
}

The other place is the logging plugin for webpack:

compiler.hooks.done.tap('HopsLoggerPlugin', (stats) => {

@jhiode jhiode added the 🐛 bug label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant