Fix rewatch warning replay after early compile errors#8408
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
Signed-off-by: Christoph Knittel <ck@cca.io> # Conflicts: # rewatch/src/build/compile.rs
Signed-off-by: Christoph Knittel <ck@cca.io>
a3eb179 to
cf3418e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf3418edb4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Collect warnings from modules that were not recompiled in this build but still have stored | ||
| // warnings from a previous compilation. This includes ready modules that were in the compile | ||
| // universe but never scheduled because an earlier module failed. | ||
| for (module_name, module) in build_state.modules.iter() { |
There was a problem hiding this comment.
Sort replayed warning modules deterministically
When an early compile error leaves more than one warning-bearing module unscheduled, this new replay path emits those stored warnings in AHashMap iteration order. The compiled results above are explicitly sorted to keep diagnostics and snapshots deterministic, but this loop bypasses that ordering, so two skipped modules with stored warnings can still appear in a different order across processes/hash seeds. Please collect and sort the module names before appending their stored warnings.
Useful? React with 👍 / 👎.
Signed-off-by: Christoph Knittel <ck@cca.io>
15c9084 to
d3a7f04
Compare
|
@codex review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8408 +/- ##
==========================================
+ Coverage 58.78% 59.10% +0.32%
==========================================
Files 373 373
Lines 54210 54210
==========================================
+ Hits 31865 32040 +175
+ Misses 22345 22170 -175 🚀 New features to boost your workflow:
|
Summary
Fixes warning replay after an early rewatch compile error.
When the DAG scheduler hits a compile error, it stops dispatching new modules. Some modules can still be in the compile universe but never actually compile. Before this change, warning replay used membership in the compile universe as the skip condition, so stored warnings on those unscheduled modules were skipped.
This change tracks the modules that actually compiled and replays warnings for the ones that did not. It also emits fresh and replayed warnings through one sorted path, so diagnostic output stays deterministic.
Changes