webpack icon indicating copy to clipboard operation
webpack copied to clipboard

fix: stats.hasWarnings() should respect ignoreWarnings

Open nanianlisao opened this issue 2 years ago • 4 comments

Summary

Actually, I am not sure if this is a bug or if it was done intentionally. But I think hasWarnings in stats should respect ignoreWarnings

Especially in the compiler.hooks.done hooks, stats obtained is directly processed via hasWarnings to handle warnings.

🤖 Generated by Copilot at 345939a

Refactor Stats.hasWarnings to use Compilation.getWarnings. This is part of a larger effort to optimize and enhance the stats output.

Details

stats.hasWarnings() should respect ignoreWarnings

🤖 Generated by Copilot at 345939a

  • Refactor warnings handling logic in Compilation class (0,10,10,1,F0L3R

nanianlisao avatar Sep 18 '23 12:09 nanianlisao

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: nanianlisao / name: chenxiang (2cf42837519387a9e35d87560862488d442ea83f, 345939a0b978d5e6c597d666c8aa73d20dea7306, 6f8340a59b19401d07efaf2bb2a7cfec060f2a0d)

For maintainers only:

  • [ ] This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • [ ] This needs to be backported to webpack 4 (issue will be created when merged)

webpack-bot avatar Sep 18 '23 12:09 webpack-bot

@alexander-akait Hi, I've noticed that my pull request hasn't been reviewed yet. If you could find some time to review it, I'd really appreciate it.

Thanks a lot!

nanianlisao avatar Dec 21 '23 09:12 nanianlisao

@alexander-akait Yeah, this could be a potential breaking change. I believe we should consider this change for webpack v6

snitin315 avatar Jan 13 '24 05:01 snitin315

I think this is valid, ignoreWarnings should be respected.

vankop avatar Apr 11 '24 11:04 vankop

@vankop I think we need a test cases to prevent a regression in future

alexander-akait avatar Apr 11 '24 11:04 alexander-akait

Feel free to send it and we can merge it

alexander-akait avatar Apr 11 '24 11:04 alexander-akait

@nanianlisao Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@vankop Please review the new changes.

webpack-bot avatar Apr 12 '24 09:04 webpack-bot

Great, could you please take a look again. @alexander-akait

nanianlisao avatar Apr 12 '24 09:04 nanianlisao