Repository navigation
Conversation
Why:
rescript clean took only the build lock, which a watcher holds only
while it builds, so a clean during rescript watch removed the artifacts
the watcher kept reading, and every later rebuild failed (#9241).
Diagnostic added (rescript clean while rescript watch runs):
Before (text): Cleaning x, exit 0; the watcher then fails with Sys_error("<root>/lib/rescript/A.ast: No such file or directory")
After (diagnostic):
Could not clean while rescript watch or another clean is running. The process ID (PID) is 4242
After (text): exit 1; the artifacts and the watcher are left as they were
Clean now takes the watch lock of the folder it cleans, as rescript watch
does, before the build lock.
Review: Does a clean of a workspace see a watcher of one of its members? No: each takes the watch lock of the folder it was given, and a watcher takes it before it reads the configuration, which a test requires.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gGBR9g3DD93vrWbYzU
Signed-off-by: Christoph Knittel <ck@cca.io>
Changelog🐛 Bug fix
Semantic Diff1 commit · Full page Refuse to clean while a watcher of the project runs323c05f · cknitt + Claude · Nov 06, 2026, 20:31 UTC
Diagnostic added (rescript clean while rescript watch runs)
-Cleaning x, exit 0; the watcher then fails with Sys_error("<root>/lib/rescript/A.ast: No such file or directory")
+exit 1; the artifacts and the watcher are left as they were
Clean now takes the watch lock of the folder it cleans, as rescript watch does, before the build lock. Review
|
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9247 |
Fixes #9241.
compiler-info.jsonas soon as the clean decision is made;run.shcovers it.cleanduringwatch:rescript cleannow takes the watch lock of the folder it cleans, asrescript watchdoes, and refuses while a watcher runs:New test:
check_command_validation.shrunscleanagainst a running watcher, expects the refusal with the artifacts left in place, and checks that the watcher still rebuilds.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gGBR9g3DD93vrWbYzU