Skip to content

Use options.log, warn and error for compilation messages #186

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

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

Tarrask
Copy link
Contributor

@Tarrask Tarrask commented Apr 18, 2017

When the compilation fails or has warnings, the compilation
messages are outputted in console.log not using the options.error
and options.warn functions.

This commit change the defaultReporter to output the stats
and final message to the options.error when the compilation
has errors or the options.warn when it has warnings.

The Reporter.test.js test cases are updated accordingly.

When the compilation fails or has warnings, the compilation
messages are outputted in console.log not using the options.error
and options.warn functions.

This commit change the defaultReporter to output the stats
and final message to the options.error when the compilation
has errors or the options.warn when it has warnings.

The Reporter.test.js test cases are updated accordingly.
@jsf-clabot
Copy link

jsf-clabot commented Apr 18, 2017

CLA assistant check
All committers have signed the CLA.

@Tarrask
Copy link
Contributor Author

Tarrask commented Apr 18, 2017

Hi jsf-clabot, can you fix the page you ask me to sign. The link to the licence file is not working:

in accordance with the [JS Foundation IP Policy]({{ site.url }}{{ site.baseurl }}/pdf/ip-policy.pdf).

@shellscape
Copy link
Contributor

@Tarrask Please click the link on the comment above your last. That will take you to the site to sign the CLA.

@shellscape
Copy link
Contributor

@SpaceK33z could you weigh in on this one? I think it makes good sense and fixes what was probably an oversight, but I can't speak to the original intention here.

@SpaceK33z
Copy link
Member

This was intentional, but arguably it can be inconvenient. The reason that I used options.log for webpack warning/errors, was that options.warn and options.error were intended for warnings/errors from webpack-dev-middleware.

It makes sense to use options.warn and options.error for webpack warnings/errors, so that's fine, but it doesn't make sense to use options.error for the message "webpack: Failed to compile." and options.warn for "webpack: Compiled with warnings." This is an informational message and not a warning/error itself. If you hide these, you can't see from the terminal whether your bundle is ready.

@SpaceK33z
Copy link
Member

Note that you've changed some files from 0664 to 0775 permissions, could you fix that?

@shellscape
Copy link
Contributor

@Tarrask ping! please see the comments above

@shellscape
Copy link
Contributor

@SpaceK33z I think I should merge this and then modify with a subsequent commit to resolve the issues mentioned. There's value-add in this PR; I'd like not to hold it up further due to vanishing author 😆

@shellscape shellscape merged commit 42c2e5d into webpack:master Jun 13, 2017
@shellscape
Copy link
Contributor

Will be following this up with a commit to resolve the requests made.

shellscape added a commit that referenced this pull request Jun 13, 2017
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.

4 participants