Reproduction
The entry imports the same missing request twice:
import { first } from "./dep.js";
import { second } from "./dep.js";
console.log(first, second);
The script builds once, deletes dep.js, and compares an incremental rebuild with a cold build.
incremental rebuild after deleting dep.js: 3:13-18
cold build with dep.js missing: 1:1-34
BUG REPRODUCED: incremental location 3:13-18 differs from cold location 1:1-34.
Expected behavior
The same missing request should report a stable location regardless of whether the module graph was repaired incrementally or rebuilt cold.
Suspected area
The repair path groups affected dependencies in crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/process_dependencies.rs, while the diagnostic is assigned from create_data.dependencies[0].loc() in crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/factorize.rs. The incremental path can select a different dependency from the cold path when a group is reconstructed from affected dependency collections.
Reproduction
The entry imports the same missing request twice:
The script builds once, deletes dep.js, and compares an incremental rebuild with a cold build.
Expected behavior
The same missing request should report a stable location regardless of whether the module graph was repaired incrementally or rebuilt cold.
Suspected area
The repair path groups affected dependencies in crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/process_dependencies.rs, while the diagnostic is assigned from create_data.dependencies[0].loc() in crates/rspack_core/src/compilation/build_module_graph/graph_updater/repair/factorize.rs. The incremental path can select a different dependency from the cold path when a group is reconstructed from affected dependency collections.