web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
10.13k stars 575 forks source link

fix: rebuild should reset module.preOrderIndex #8413

Open JSerFeng opened 1 week ago

JSerFeng commented 1 week ago

Summary

close #7031

mgm.preOrderIndex is set by buildChunkGraph, which is skipped during incremental rebuild.

When enable newIncremental.buildChunkGraph, preOrderIndex is wrong by design, I'll refactor module.preOrderIndex soon in another PR

Checklist

netlify[bot] commented 1 week ago

Deploy Preview for rspack canceled.

Name Link
Latest commit 7bc1fd0f7ba7d74b530cf8e6e671cb2a271a9680
Latest deploy log https://app.netlify.com/sites/rspack/deploys/673422aa514ff50008ab31a3
ScriptedAlchemy commented 1 week ago

there is also a similar bug with [contenthash] in ark subspace if you use content hash the hash rendered in the js files is missmatched to what stats emits and the files emitted on disk.

Doesnt look related to this MR but seems to be from a similar possible cause?

JSerFeng commented 1 week ago

there is also a similar bug with [contenthash] in ark subspace if you use content hash the hash rendered in the js files is missmatched to what stats emits and the files emitted on disk.

Do we have a issue about it ? Sounds like the issue of incremental rebuild

ScriptedAlchemy commented 1 week ago

No i don't but I'll create one. Repo is bytedance internal so I will not share url publicly but can dm over lark. It's likely the same repo that you got the oncall about for this issue