-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
feat(webpack-cli): infrastructure logging #2036
Conversation
2261410
to
f3bfd47
Compare
As mention before webpack infrastructure logging outputs to |
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.
Sorry, it is big breaking change, do not touch stdout and stderr, it was big problems for previously versions and we fix it
@evilebottnawi weback InfrastructureLogger is writing to Aligned the utils/logger for simpler refactor test, and not go one by one 🙈 Let's revert logger to console and fix the test, just ping me if that is something we want as it's not a small thing. |
hm, I need dicussion with sokra |
Anyway we can't change it here, because it is breaking change |
81fda84
to
e3bf375
Compare
Looks like reverting logger was not that bad. Still needed to disable few test, like with But yeah, also proposing some changes in what we log, now we show
something like v4
v5
|
Yes, we should remove |
|
And yes, you will right we should - All diagnostic output goes to stderr. only the stats output goes to stdout |
return options; | ||
}; | ||
|
||
module.exports = { getStatsOptions }; |
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.
No utils relates to complation, use methods classes
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 was execrated to utils as, moved stats display to WebpackCLIPlugin, but wanted to keep json output
in WebpackCLI compiler callback.
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.
I think we should avoid do here a lot of changes, let's separate them, I can't remove and merge this all big changes, sorry, let's focus on migrate infrastructure logger
Codecov Report
@@ Coverage Diff @@
## master #2036 +/- ##
==========================================
+ Coverage 68.31% 68.69% +0.37%
==========================================
Files 77 79 +2
Lines 2408 2450 +42
Branches 496 507 +11
==========================================
+ Hits 1645 1683 +38
- Misses 763 767 +4
Continue to review full report at Codecov.
|
Yes i know. Basic problem is that migrating to infrastructure logger is bigger one as it touch a lot of testes as we switch from.
So basic when logging stats we should not use infrastructure logger ? |
Yes, for stats we should use |
So let's separate it |
ok current plan
|
e3bf375
to
2352627
Compare
2352627
to
72936c7
Compare
af9f784
to
2f8fda0
Compare
2f8fda0
to
b9a51fb
Compare
if (childStats.hasErrors()) { | ||
logger.error(normalizedStatus); |
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.
We should set exitCode = 1 for errors.
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.
Exit code is set in callback in webpack-cli.js this wasn't changed https://github.com/webpack/webpack-cli/pull/2036/files#diff-7c711e2a4ef4b16d2cbbe1658495723402f9692da654cb6fa959127f3dc779f2R357-R359
Wondering if we should reset it if next complication is has no errors 🤔
@piecyk Thanks for your update. I labeled the Pull Request so reviewers will review it again. @alexander-akait Please review the new changes. |
Suppressed by #2144 |
What kind of change does this PR introduce?
Using InfrastructureLogger for logging output from webpack compiler
Did you add tests for your changes?
I plan to do it
If relevant, did you update the documentation?
No
Summary
Related #2019
Does this PR introduce a breaking change?
Yes
Other information