Semantic Diff

#8689 Add opt-in cross-module inlining for Option helpers

7 commits

1a49d918eb73d0b058655608cfb2c2f4e6af4e1f..pr-8689

00d6bff20 · cknitt · Sep 28, 2026, 06:04 UTC

Enable selective cross-module inlining for Option helpers

3da43adca · cknitt · Sep 28, 2026, 07:46 UTC

Inline additional Option helpers across modules

cb4faeddb · cknitt · Sep 28, 2026, 07:49 UTC

Document cross-module inlining feature

0e010a0c6 · cknitt · Sep 28, 2026, 07:55 UTC

Refresh Option inlining snapshots after clean build

a7681f89a · cknitt · Sep 28, 2026, 09:19 UTC

Track CMJ changes for cross-module inlining

7ce5284d7 · cknitt · Sep 28, 2026, 09:53 UTC

Read CMJ digest header for incremental rebuilds

08056a9f8 · cknitt + Claude · Oct 27, 2026, 07:15 UTC

Recompile dependents of a changed CMJ in the OCaml build system

Why

The OCaml build system, now the default rescript, recompiled dependents only when a module's CMI changed. An @inline(crossModule) body lives in the CMJ and can change while the CMI stays the same, so callers kept the old inlined code, during a build and on the next build after the dependency was compiled separately. Rust rewatch already compares CMJ digests since the previous commits.

Publishing a byte-different CMJ now marks dependents dirty like a changed CMI, and the startup freshness check compares a dependent's CMT with the later of its dependency's CMI and CMJ.

Review

  • Does every implementation change now recompile dependents? Only those whose CMJ bytes change, matching the Rust implementation.