Commit ad7d27e
authored
Turbopack hmr: preserve group factory consistency for compressed modules (#89976)
## Summary
- update `installCompressedModuleFactories` to reuse an existing factory
in a compressed ID group when filling missing IDs
- keep `newModuleId` notifications aligned with actual IDs installed
(`newModuleId(id)`)
- add an execution regression test for the mixed-group case where one ID
already has a factory and another is missing
- regenerate affected runtime snapshots
(runtime/debug-ids/workers/preset_env)
Aims to fix cases like this being seen recently:
```sh
Error: Module 8896 was instantiated because it was required from module 18500, but the module factory is not available.
```
```
## Test Plan
- `cargo test -p turbopack-tests --test execution test_tests__execution__turbopack__runtime__factory_group_existing_factory__input__index_js -- --nocapture`
- `cargo test -p turbopack-tests --test snapshot test_tests__snapshot__runtime__default_build_runtime__input__index_js -- --nocapture`
- `cargo test -p turbopack-tests --test snapshot test_tests__snapshot__runtime__default_dev_runtime__input__index_js -- --nocapture`
- `cargo test -p turbopack-tests --test snapshot test_tests__snapshot__debug_ids -- --nocapture`
- `cargo test -p turbopack-tests --test snapshot test_tests__snapshot__swc_transforms__preset_env__input__index_js -- --nocapture`
- `cargo test -p turbopack-tests --test snapshot test_tests__snapshot__workers__ -- --nocapture`1 parent 6df0b7b commit ad7d27e
File tree
20 files changed
+297
-120
lines changed- turbopack/crates
- turbopack-tests/tests
- execution/turbopack/runtime/factory-group-existing-factory/input
- snapshot
- debug-ids
- browser/output
- node/output
- runtime
- default_build_runtime/output
- default_dev_runtime/output
- swc_transforms/preset_env/output
- workers
- basic/output
20 files changed
+297
-120
lines changedLines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | 554 | | |
556 | 555 | | |
557 | 556 | | |
| |||
565 | 564 | | |
566 | 565 | | |
567 | 566 | | |
568 | | - | |
569 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
571 | 582 | | |
572 | 583 | | |
573 | 584 | | |
574 | 585 | | |
575 | 586 | | |
576 | | - | |
577 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
578 | 590 | | |
579 | 591 | | |
580 | | - | |
| 592 | + | |
| 593 | + | |
581 | 594 | | |
582 | 595 | | |
583 | 596 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments