Repository navigation
Remove the Rust build system - #9238
Conversation
Changelog💥 Breaking Change
💅 Polish
Semantic Diff8 commits · Full page Check rewatch output against snapshots instead of Rust rewatch06d6bb5 · cknitt + Claude · Nov 05, 2026, 17:08 UTC The check_*.sh scripts compared the OCaml build system with the Rust one, which is about to be removed. They now run Review
Remove the Rust build system8789a23 · cknitt + Claude · Nov 05, 2026, 17:08 UTC
Make the command-validation snapshots hold in CI70a6242 · cknitt + Claude · Nov 05, 2026, 18:23 UTC CI sets CLICOLOR_FORCE=1, which colored the redirected-output cases, so the script now unsets it. On Windows the runner's TEMP is an 8.3 short path, so check_snapshot also replaces the explicit long spelling that bsc prints. Sort verbose events in the C locale0c1b07d · cknitt + Claude · Nov 05, 2026, 18:34 UTC macOS CI sorts with a locale that puts Normalize escaped Windows paths in snapshotse93d828 · cknitt + Claude · Nov 05, 2026, 18:39 UTC Some diagnostics print a path as a quoted string, so on Windows its backslashes are doubled ( Keep backslashes in Unix snapshots and share path normalizationab6306d · cknitt + Claude · Nov 05, 2026, 19:23 UTC Review of #9238: check_snapshot turned every backslash into a slash, so a snapshot could not hold an escape such as \n, and a path printed with backslashes on Unix went unnoticed. It now rewrites separators on Windows only. The command-validation checks that grep for paths (normalize_project_path, require_error_contains) use the same normalization through the new normalize_paths helper, instead of deriving short paths from USERPROFILE. Drop the remaining Rust settings from rewatch tests09736cb · cknitt + Claude · Nov 05, 2026, 19:23 UTC Review of #9238: the integration tests still set RUST_BACKTRACE and RAYON_NUM_THREADS, which rescript ignores. The two tests that ran Rust on one thread now set REWATCH_COMPILER_DOMAINS=1, so they again check scheduling with a single compiler worker. Comments shortened when the Rust mentions were removed are rewrapped. ✨ Accept every regular expression Re can match in --filter290323e · cknitt + Claude · Nov 05, 2026, 19:45 UTC · new --filter rejected valid Perl constructs, such as \Q...\E, \Z and [z-a], because Rust's regex crate read them differently. With the Rust build system gone, that parity check only refuses valid filters, so the filter now accepts what Re's Perl syntax parses and still rejects what Re cannot match, such as backreferences. |
The check_*.sh scripts compared the OCaml build system with the Rust one, which is about to be removed. They now run `rescript` alone: each case keeps its expected outcome, and output the scripts used to compare with Rust's is compared with snapshots under rewatch-ocaml/tests/snapshots, written with UPDATE_SNAPSHOTS=1. Paths are replaced by placeholders, line endings and separators normalized, so one snapshot serves Unix and Windows. Review: Do the snapshots still describe Rust's output? Yes: before removing Rust, every snapshot was checked against the Rust executable too; the verbose, interactive and command-validation snapshots match it. Remaining differences are the documented ones, whose cases already expected OCaml's outcome. Review: Which checks were dropped? Only Rust-only ones: the three missing-`RESCRIPT_BSC_EXE` cases (OCaml ignores the variable), Rust's exit codes and error wording. Config cases named for Rust's last-key-wins behavior (`duplicate-last`) were renamed, since duplicates are rejected. Signed-off-by: Christoph Knittel <ck@cca.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf
`rescript` has run the OCaml build system since 13.0.0-alpha.7; the Rust implementation only shipped as `rescript-rust` for comparison. This removes its sources, the `rescript-rust` executable and launcher, the Cargo build in the Makefile and CI, the Rust/OCaml performance gates, Rust formatting and version constraints, and the Rust toolchain from the dev container. rewatch/ keeps the integration suite and the behavior documents; the implementation stays in rewatch-ocaml/. Breaking: `rescript-rust` and its `RESCRIPT_BSC_EXE` override are gone; use `rescript`, which has the compiler built in. Signed-off-by: Christoph Knittel <ck@cca.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf
CI sets CLICOLOR_FORCE=1, which colored the redirected-output cases, so the script now unsets it. On Windows the runner's TEMP is an 8.3 short path, so check_snapshot also replaces the explicit long spelling that bsc prints. Signed-off-by: Christoph Knittel <ck@cca.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf
b00a717 to
70a6242
Compare
|
@codex review |
Codex Review SummaryThis 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. |
macOS CI sorts with a locale that puts `compile dirty:` before `DEBUG:`, so the sorted events did not match the snapshot written in the C locale. Signed-off-by: Christoph Knittel <ck@cca.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf
|
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". |
Some diagnostics print a path as a quoted string, so on Windows its backslashes are doubled (`C:\\Users\\...`). check_snapshot now replaces that spelling of each root and turns escaped separators into slashes as well. Signed-off-by: Christoph Knittel <ck@cca.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf
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-9238 |
Review of #9238: check_snapshot turned every backslash into a slash, so a snapshot could not hold an escape such as \n, and a path printed with backslashes on Unix went unnoticed. It now rewrites separators on Windows only. The command-validation checks that grep for paths (normalize_project_path, require_error_contains) use the same normalization through the new normalize_paths helper, instead of deriving short paths from USERPROFILE. 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>
Review of #9238: the integration tests still set RUST_BACKTRACE and RAYON_NUM_THREADS, which rescript ignores. The two tests that ran Rust on one thread now set REWATCH_COMPILER_DOMAINS=1, so they again check scheduling with a single compiler worker. Comments shortened when the Rust mentions were removed are rewrapped. 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>
--filter rejected valid Perl constructs, such as \Q...\E, \Z and [z-a], because Rust's regex crate read them differently. With the Rust build system gone, that parity check only refuses valid filters, so the filter now accepts what Re's Perl syntax parses and still rejects what Re cannot match, such as backreferences. 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>
Removes the Rust build system.
rescripthas run the OCaml build system since 13.0.0-alpha.7, andrescript-rustonly shipped for comparison.Commits
Check rewatch output against snapshots instead of Rust rewatch. The
rewatch-ocaml/tests/check_*.shscripts used to run Rust and OCaml side by side. Now they runrescriptalone:snapshots/config_acceptance/arguments.txt).check_snapshot(intest_helpers.sh, withcheck_snapshot.js) replaces root paths with placeholders and normalizes CRLF and backslashes, so one snapshot serves Unix and Windows.UPDATE_SNAPSHOTS=1rewrites the snapshots.RESCRIPT_BSC_EXEcases, which tested a Rust-only variable.Remove the Rust build system:
rewatch/src, Cargo files,rustfmt.toml, and Rust agent docs.rescript-rustbin and launcher (package.json, platform packages,artifacts.json).rewatch,test-rewatch-rust,clean-rewatch).build-rewatchCI action,copyExes.js, and the Rust reference suite run.rewatch-ocaml/bench.rewatch/keeps the integration suite and the behavior docs.rewatch-ocaml/is not renamed in this PR; the directory name is still open. Comments, test names, and READMEs no longer refer to Rust. The README's "Differences from Rust rewatch" section became behavior notes.Review guide
rescriptbuilds.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gHBNSg9dHsEnBuQaPf