Semantic Diff
#8689 Add opt-in cross-module inlining for Option helpers
7 commits
1a49d918eb73d0b058655608cfb2c2f4e6af4e1f..pr-8689
Inline additional Option helpers across modules
Document cross-module inlining feature
Refresh Option inlining snapshots after clean build
Track CMJ changes for cross-module inlining
Read CMJ digest header for incremental rebuilds
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.