Skip to content

fix(rewatch): preserve warnings after atomic-save full rebuilds#8356

Closed
paulk-ketryx wants to merge 2 commits into
rescript-lang:masterfrom
paulk-ketryx:paulk/warnings-presist-atomic-saves
Closed

fix(rewatch): preserve warnings after atomic-save full rebuilds#8356
paulk-ketryx wants to merge 2 commits into
rescript-lang:masterfrom
paulk-ketryx:paulk/warnings-presist-atomic-saves

Conversation

@paulk-ketryx

Copy link
Copy Markdown

Summary

  • preserve stored compile warnings when watch mode rebuilds full state after atomic-save rename events
  • keep unrelated module warnings in .compiler.log and stderr across those rebuilds
  • add Rust unit tests for the warning carry-forward helper

Testing

  • cargo test --manifest-path rewatch/Cargo.toml watcher::tests
  • cargo test --manifest-path rewatch/Cargo.toml
  • rewatch/tests/watch/02-watch-warnings-persist-atomic-save.sh
  • rewatch/tests/watch/02-watch-warnings-persist.sh

Bushuo added 2 commits April 18, 2026 14:25
Add a rewatch integration test that simulates an editor-style atomic save by renaming B.res into place and verifies warnings from ModuleA.res remain in .compiler.log after the rebuild.

Signed-off-by: Paul Kim <paul.bushuo@gmail.com>
Atomic-save rename events force the watcher down the full rebuild path, which was recreating build state and dropping stored warnings for unchanged modules. Carry warning state forward into the new build state so unrelated module warnings continue to be re-emitted.\n\nAlso add unit tests for the warning carry-forward helper.

Signed-off-by: Paul Kim <paul.bushuo@gmail.com>
@paulk-ketryx

Copy link
Copy Markdown
Author

Closing and reopening from the correct account.

@Bushuo Bushuo reopened this Apr 18, 2026
@Bushuo

Bushuo commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

Closing because this PR is associated with the wrong GitHub account; reopening from the correct fork/account.

@Bushuo Bushuo closed this Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants