-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: Improve how combined assets are generated #3309
Conversation
7ca93e1
to
aa83b13
Compare
aa83b13
to
29bca0e
Compare
d62fe46
to
53ae3f0
Compare
I did some more debugging today and it seems that not even production build reliably guarantees stable order of modules and stable hashes. When the chunk modules are written to a file, they are ordered by The real reason why production builds are OK is that production uses module concatenation. The offending I'll be investigating further in cooperation with @ockham |
53ae3f0
to
849b671
Compare
Thank you so much for sharing your findings. That would be great to confirm it won't cause similar issues in the future. In the meantime, I applied all the necessary changes to make CI happy. I think it's a good improvement on its own as it allows us to keep only the file with combined assets for production to ensure that they never differ between platforms. |
Update: @jsnajdr prepared a minimal test case that I ran on Windows. He'll use the results to file a bug report against Webpack. |
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.
Thank you @gziolo! LGTM
Webpack bug reported here: webpack/webpack#16289 |
Committed with https://core.trac.wordpress.org/changeset/54289. |
Trac ticket: https://core.trac.wordpress.org/ticket/56615
It reverts the temporary workaround for the failing Test NPM CI check on Windows: https://core.trac.wordpress.org/changeset/54277.
It's based on the finding from @jsnajdr that stable hashes are only guaranteed for the production version of the build. In effect, I'm applying the following changes:
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.