Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a67928f
Make OCaml rewatch benchmarks reproducible across build scenarios
codex Sep 24, 2026
e415568
Add opt-in compiler request timing trace
codex Sep 24, 2026
19cd9bf
Record retained watch filesystem audit
codex Sep 24, 2026
d49ad43
Document compiler-core timing bottlenecks
codex Sep 24, 2026
95499ed
Align benchmark compiler profiles and refresh results
codex Sep 24, 2026
87f58d4
Record matched before-and-after OCaml benchmarks
codex Sep 24, 2026
1830b9e
Document CMI lookup cost and reuse bound
codex Sep 24, 2026
64de041
Document repeated signature opening cost
codex Sep 24, 2026
b2f9f94
Build opened signature label tables in bulk
codex Sep 24, 2026
cacbf09
Time builds independently of resource sampling
codex Sep 24, 2026
515f4f5
Record label-table benchmark and reproduction steps
codex Sep 24, 2026
0af49e4
Record unexplained single-worker outliers
codex Sep 24, 2026
02b518e
Record compiler filesystem effect on Rewatch baselines
codex Sep 24, 2026
9f5079a
Restore source baseline between edit benchmark runs
codex Sep 24, 2026
d544397
Measure retained watches without compiler proxy overhead
codex Sep 24, 2026
cfbb43f
Record restored-edit fast compiler comparison
codex Sep 24, 2026
68e372d
Record parser environment allocation probe
codex Sep 24, 2026
f43bfdd
Document in-process OCaml rewatch in changelog
codex Sep 24, 2026
80eb959
Clarify OCaml rewatch compiler timing breakdowns
fhammerschmidt Sep 25, 2026
26ec8df
Add exclusive compiler phase tracing for OCaml rewatch
fhammerschmidt Sep 25, 2026
54e3bd0
Cache expanded signatures per OCaml rewatch worker
fhammerschmidt Sep 25, 2026
d1c43a0
Document OCaml rewatch signature cache in changelog
fhammerschmidt Sep 25, 2026
5d68298
Reuse runtime CMIs and shared signature snapshots
fhammerschmidt Sep 25, 2026
ac85680
Keep compiler dependency state for the project lifetime
fhammerschmidt Sep 25, 2026
b72fc53
Document project-scoped compiler session in changelog
fhammerschmidt Sep 25, 2026
2e2baf5
Clarify testrepo benchmark platform limitation
fhammerschmidt Sep 25, 2026
807a6e1
Add immutable compiled interface representation
fhammerschmidt Sep 25, 2026
ff965cc
Document immutable interface experiment in changelog
fhammerschmidt Sep 25, 2026
8aa9dd3
Continue immutable interface experiments
fhammerschmidt Sep 26, 2026
14dc9b4
Advance Rewatch lifecycle and tooling performance
fhammerschmidt Sep 26, 2026
bf921de
Gate compatibility copies behind explicit mode
fhammerschmidt Sep 26, 2026
8b53da9
Fix OCaml CI compatibility issues
fhammerschmidt Sep 26, 2026
b580562
Align config acceptance with annotation defaults
fhammerschmidt Sep 26, 2026
736a6d3
Align suffix CI test with default output layout
fhammerschmidt Sep 26, 2026
4043321
Build annotated tooling dependencies in macOS CI
fhammerschmidt Sep 26, 2026
e258d0e
Separate watch-filter edits in parity test
fhammerschmidt Sep 27, 2026
80c2375
Run CI for rewatch-ocaml stack PRs
fhammerschmidt Sep 27, 2026
2004dad
Build experimental stack on branch pushes
fhammerschmidt Sep 27, 2026
4d47905
Speed up frozen interface reuse and leaf publication
fhammerschmidt Sep 28, 2026
2e5a03d
Fix cross-platform OCaml rewatch CI failures
fhammerschmidt Sep 29, 2026
28908ec
Wait for completed watch build before lock assertion
fhammerschmidt Sep 29, 2026
a79880f
Match completion message after watch recovery
fhammerschmidt Sep 29, 2026
b8ce0dc
Report production feature outputs in integration test
fhammerschmidt Sep 29, 2026
f74d9c1
Normalize genType trace paths in Windows integration test
fhammerschmidt Sep 29, 2026
0e9e6ec
Use native paths for Windows diagnostic logs
fhammerschmidt Sep 29, 2026
ef0a737
Prune interim OCaml Rewatch experiment notes
fhammerschmidt Sep 29, 2026
c0a00b9
Record embedded compiler performance baseline
codex Sep 30, 2026
af8881a
Cache typed compiler options per session
codex Sep 30, 2026
97186f4
Separate compiler and editor policies
codex Sep 30, 2026
d820f22
Supply owned semantic inputs to GenType
codex Sep 30, 2026
c1015c3
Persist validated GenType dependency summaries
codex Sep 30, 2026
e477c34
Make binary annotations editor-only for GenType builds
codex Sep 30, 2026
71e77b4
Defer owned AST persistence after session handoff
codex Sep 30, 2026
908b0cb
Persist owned compiler artifacts after session handoff
codex Sep 30, 2026
1170ce9
Validate frozen imported modules and interface parity
codex Sep 30, 2026
2d1fae7
Validate frozen lookup in mixed GenType builds
codex Sep 30, 2026
66a92e9
Isolate and measure the legacy PPX adapter
codex Sep 30, 2026
fe4df0b
Prepare final compiler promotion gates
codex Sep 30, 2026
97d5f5d
Preserve PPX write errors and atomic symlink test replacement
codex Sep 30, 2026
a7be34e
Record static Linux promotion gate
codex Sep 30, 2026
58b7858
Update GenType compiler argument parity checks
fhammerschmidt Oct 1, 2026
b4347bf
Make rapid rewrite tests deterministic on Windows
fhammerschmidt Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master, 11.0_release]
branches: [master, 11.0_release, rewatch-ocaml-consolidated]

pull_request:
branches: [master, 11.0_release]
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:

- name: Run analysis / tools tests
if: runner.os != 'Windows' && runner.os != 'Linux'
run: opam exec -- make -C tests/analysis_tests test && make -C tests/tools_tests test
run: opam exec -- make test-analysis test-tools

- name: Run gentype tests
if: runner.os != 'Windows'
Expand Down Expand Up @@ -246,20 +246,41 @@ jobs:
shell: bash

- name: Run OCaml rewatch unit tests
id: rewatch-unit-tests
timeout-minutes: 10
run: |
opam exec -- dune build tests/rewatch_ounit_tests/rewatch_ounit_tests_main.exe
# Run the executable directly so a stuck test leaves live progress;
# dune otherwise buffers the test output until the action exits.
opam exec -- ./_build/default/tests/rewatch_ounit_tests/rewatch_ounit_tests_main.exe -runner sequential
REWATCH_COMPILER_WORKER_EXECUTABLE="$PWD/_build/default/rewatch-ocaml/rescript_ocaml.exe" \
opam exec -- ./_build/default/tests/rewatch_ounit_tests/rewatch_ounit_tests_main.exe -runner sequential -verbose true
shell: bash

- name: Upload OCaml rewatch unit test failure logs
if: failure() && steps.rewatch-unit-tests.outcome == 'failure'
uses: actions/upload-artifact@v7
with:
name: rewatch-unit-test-logs-${{ matrix.os }}-${{ matrix.ocaml_compiler }}
path: _build/oUnit-rewatch-*.log
if-no-files-found: warn

- name: Run OCaml rewatch focused integration tests
timeout-minutes: 30
run: |
REWATCH_COMPILER_DOMAINS=1 sh rewatch-ocaml/tests/run.sh packages/@rescript/${{ matrix.node-target }}/bin/rescript.exe
REWATCH_COMPILER_DOMAINS=4 sh rewatch-ocaml/tests/run.sh packages/@rescript/${{ matrix.node-target }}/bin/rescript.exe
sh rewatch-ocaml/tests/run.sh packages/@rescript/${{ matrix.node-target }}/bin/rescript.exe
shell: bash

- name: Check frozen compiler and GenType parity
if: matrix.node-target == 'linux-arm64'
timeout-minutes: 15
run: |
opam exec -- dune build rewatch-ocaml/bench/cmt_compare.exe
python3 rewatch-ocaml/bench/frozen_gentype_parity.py "$RUNNER_TEMP/frozen-gentype-parity"
python3 rewatch-ocaml/bench/legacy_ppx_gate.py "$RUNNER_TEMP/legacy-ppx-gate" 5
shell: bash

- name: Run OCaml rewatch canonical tests
run: ./rewatch/tests/suite.sh packages/@rescript/${{ matrix.node-target }}/bin/rescript.exe
shell: bash
Expand Down Expand Up @@ -372,7 +393,9 @@ jobs:

- name: Generate API Docs
if: ${{ matrix.generate_api_docs }}
run: yarn apidocs:generate
run: |
opam exec -- make annotated-tooling-deps
REWATCH_BIN_ANNOT=1 yarn apidocs:generate

- name: "Upload artifacts: scripts/res/apiDocs"
id: upload-api-docs
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,25 @@

#### :rocket: New Feature

- Use the OCaml rewatch build system with parallel in-process compiler workers as the default `rescript` executable; keep the Rust implementation available as `rescript-rust`. https://github.com/rescript-lang/rescript/pull/8653

#### :bug: Bug fix

- Make rewatch compile independent modules after an unrelated failure and recompile blocked dependents when a changed interface survives a failed implementation, including across full watcher rebuilds. https://github.com/rescript-lang/rescript/pull/8667
- Avoid a parser-artifact publication error when an OCaml rewatch compilation fails while its AST is being exported. https://github.com/rescript-lang/rescript/pull/8680

#### :memo: Documentation

#### :nail_care: Polish

- Speed up OCaml rewatch builds with project-owned compiler caches, in-memory module results, and fewer compatibility copies. https://github.com/rescript-lang/rescript/pull/8680
- Use frozen compiler imports in mixed GenType builds while preserving generated TypeScript and editor annotations. https://github.com/rescript-lang/rescript/pull/8680
- Avoid running `rescript-schema-ppx` and `sury-ppx` on source files without an `@schema` annotation. https://github.com/rescript-lang/rescript/pull/8662

#### :house: Internal

- Share immutable compiled interfaces across OCaml rewatch compiler workers, with request-local type views. https://github.com/rescript-lang/rescript/pull/8680

# 13.0.0-alpha.6

#### :boom: Breaking Change
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ bench: compiler
test: lib
node scripts/test.js -all

test-analysis: lib
make -C tests/analysis_tests clean test
annotated-tooling-deps: lib
REWATCH_BIN_ANNOT=1 REWATCH_FROZEN_VALUES=0 $(RESCRIPT_EXE) build $(RUNTIME_DIR)
REWATCH_BIN_ANNOT=1 REWATCH_FROZEN_VALUES=0 $(RESCRIPT_EXE) build $(BELT_DIR)

test-analysis: annotated-tooling-deps
REWATCH_BIN_ANNOT=1 REWATCH_FROZEN_VALUES=0 $(MAKE) -C tests/analysis_tests clean test

test-reanalyze: lib
make -C tests/analysis_tests/tests-reanalyze/deadcode test
Expand All @@ -172,8 +176,8 @@ test-reanalyze: lib
benchmark-reanalyze: lib
make -C tests/analysis_tests/tests-reanalyze/deadcode-benchmark benchmark COPIES=$(or $(COPIES),50)

test-tools: lib
make -C tests/tools_tests clean test
test-tools: annotated-tooling-deps
REWATCH_BIN_ANNOT=1 REWATCH_FROZEN_VALUES=0 $(MAKE) -C tests/tools_tests clean test

test-syntax: compiler
./scripts/test_syntax.sh
Expand Down Expand Up @@ -374,4 +378,4 @@ dev-container:

.DEFAULT_GOAL := build

.PHONY: yarn-install build rewatch compiler lib artifacts bench test test-analysis test-reanalyze benchmark-reanalyze test-tools test-syntax test-syntax-roundtrip test-gentype test-rewatch test-all playground playground-compiler playground-test playground-cmijs playground-release format checkformat clean-rewatch clean-compiler clean-lib clean-gentype clean-tests clean dev-container
.PHONY: yarn-install build rewatch compiler lib artifacts bench test annotated-tooling-deps test-analysis test-reanalyze benchmark-reanalyze test-tools test-syntax test-syntax-roundtrip test-gentype test-rewatch test-all playground playground-compiler playground-test playground-cmijs playground-release format checkformat clean-rewatch clean-compiler clean-lib clean-gentype clean-tests clean dev-container
Loading
Loading