Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rewatch-ocaml-port #8781 +/- ##
===================================================
Coverage 80.94% 80.94%
===================================================
Files 453 453
Lines 62839 62839
===================================================
Hits 50865 50865
Misses 11974 11974
🚀 New features to boost your workflow:
|
236cf9b to
3de8d08
Compare
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
0ba9249 to
6bcbfad
Compare
6bcbfad to
6a72ee9
Compare
20777a1 to
ea7a294
Compare
ea7a294 to
5c7c670
Compare
5c7c670 to
4980a8d
Compare
4980a8d to
c05044a
Compare
eaae0c7 to
868272e
Compare
868272e to
8a10d3d
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61da00ebaa
ℹ️ 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".
Signed-off-by: Christoph Knittel <ck@cca.io>
compiler-info.json records the bundled bsc.exe again, which editor tooling uses to find the platform binaries. RESCRIPT_BSC_EXE only affects Rust. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
On Windows this gives the same CRLF line endings as a bsc process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
bsc.exe writes to its own stdout and stderr again; only in-process requests capture. A request that raises still reports what it wrote before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
The first signal still waits for modules compiling in-process; a second one releases the held build locks and exits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
Threads may handle INT and TERM in either order, so the immediate exit reports 130 or 143. A two-second deadline still rules out the graceful stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
The cleanup also runs when the build is interrupted while a PPX runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
The large module from the second-signal test keeps the first build compiling. That test now checks the real output name, Slow.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
…rewatch The npm launcher forwards the Ctrl-C the terminal already sent, so the second-signal exit cut every stop short and could truncate artifacts. A damaged published AST now makes its module parse again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
…g failures Capture compiler output in memory, write a PPX's stderr past the formatter, close artifact readers on failure, make PPX temp paths absolute, open .cmi files close-on-exec, and report a bad REWATCH_COMPILER_DOMAINS cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
They ran one at a time through Process.run_task, which ignored a stop request until the last map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
Three regression tests now fail with their bug reintroduced, the Windows backend is type-checked against platform.mli again, and the interrupt, atomic-save and retained-parse tests the test proxy removal dropped are back, using a large module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
Publication only touches the module's own files; build-state updates stay on the scheduler domain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
The default heap made workers stop each other for minor collections. Clean builds of tests/tests take about 20% less wall time and 27% less CPU, for about 200 MB more memory at 8 workers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
Process_child's payload was always unit, Btype.reinit never rewound a fresh request's counter, and the bsc test proxy only needs its counting mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
compiler-info.json named a bsc.exe next to the executable even where there is none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
d2d1c04 to
de1bf35
Compare
cristianoc
left a comment
There was a problem hiding this comment.
This is where I would have expected a detectable per difference.
Or difference in allocation profile.
But perhaps I don't understand the spirit of what is done here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 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_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
Stacked on #8780.
This PR moves compilation into the OCaml rewatch process. Instead of starting
bscfor every parse and compile,rescriptlinks the compiler and runs requests on a bounded pool of OCaml 5 domains. That removes process start-up and pipe handling, which make the subprocess port about 6% slower than Rust on clean builds. It also opens the door to sharing compiler state between requests later. The compiler side, which makes requests safe to run repeatedly and in parallel and captures their output, is #8864.Changes
REWATCH_COMPILER_DOMAINSoverrides it, and a count above the machine's limit is lowered to it. The worker that compiled a module also publishes its artifacts; build-state updates stay on the scheduling domain. Workers get a 2M-word minor heap, because with the default one they keep stopping each other for minor collections. Together, these two make clean builds oftests/testsabout 20% faster (27% less CPU), for about 200 MB more memory at 8 workers. PPXs and hooks still run as external processes.rescript formatalso runs on the embedded compiler. PPXs,js-post-build,--after-buildand the lock-owner check are the only remaining subprocesses.RESCRIPT_BSC_EXEnow only affectsrescript-rust, and CONTRIBUTING.md says how to test a local compiler instead.lib/bs/compiler-info.jsonstill records thebsc.exeshipped next torescript.exe; the VS Code extension readsbsc_pathto findbsc.exeand the other platform binaries. A development build, which has nobsc.exenext to it, records the one in the installed@rescript/<platform>package.ThreadSanitizer
An OCaml 5.5.0 ThreadSanitizer build of
rescriptreported no data races in compiler or rewatch code on clean builds ofrewatch/testrepo(4 domains),tests/tests(2, 8 and 12 domains), the gentype example and the React PPX tests, or in the rewatch unit tests. Two reports appeared in sometests/testsruns, both inside the runtime's parallel minor GC (oldify_oneagainstpool_allocate). With the sharedJs_analyzeraccumulator restored, the sametests/testsbuild reports 91 races, all inJs_analyzer, so the tool does catch this class of bug. This run predates publishing on the worker domains.Tests
watch.lockstops a watcher's compile;TMPDIR;rewatch-ocaml/benchcompares clean-build artifacts across domain counts; it does not run in CI.🤖 Generated with Claude Code