Skip to content

[3.25] perf(rocq): share plugin layouts without changing dependencies - #16647

Merged
Alizter merged 4 commits into
ocaml:3.25.0-rcfrom
Alizter:backport-16622-3.25
Oct 19, 2026
Merged

Alizter merged 4 commits into
ocaml:3.25.0-rcfrom
Alizter:backport-16622-3.25

Conversation

@Alizter

@Alizter Alizter commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Backport #16622 to 3.25.0-rc, reducing repeated Rocq plugin-layout dependency processing in unchanged builds. Related to the performance regression discussed in #16543; tracked in #15593.

Includes the three existing regression-test commits before the fix: conservative proof invalidation, shared layout dependencies and actual sandbox inputs, and mixed-directory dependency representation. The implementation, tests, and developer documentation match the merged PR. The changelog fragment is renamed to 16622.md and corrected to reference #16622 rather than #16543.

No dependency narrowing, environment-construction optimization, or engine changes are included. Existing dependencies and rebuild behavior are preserved.

Validation using the release branch's Nix environment (including #16599's dependency-builder pin):

  • @check, @fmt, and @runtest-rocq pass on all four commits.
  • Package-materialization tests pass on the final commit.

Full @runtest was not run; validation was limited to the focused checks above.

Cover direct and transitive plugin loading alongside an unused proof.
Record the complete layout dependencies and unnecessary recompilation
before layout sharing.

(cherry picked from commit ebc5110)

Signed-off-by: Ali Caglayan <[email protected]>
Inspect discovery and compilation rules before grouping, retaining the
conservative proof rebuild behavior as the baseline. Check plugin files
inside a fresh discovery sandbox and exclude root-section proof outputs.

(cherry picked from commit 5df1fcf)

Signed-off-by: Ali Caglayan <[email protected]>
Inspect direct-file and group counts for the root-section sandbox and
cycle regression. Require any selectors to be unconditional, avoiding
literal-name filters that scan a name list for every generated file.

(cherry picked from commit 053b294)

Signed-off-by: Ali Caglayan <[email protected]>
Backport ocaml#16622 to 3.25.0-rc. Share Lib and Libexec dependencies using
sandbox-safe generated-file selectors in all-library directories.
Construct groups lazily in the existing layout-entry memo, retaining
explicit dependencies for directory entries and mixed directories.

Preserve dependency selection and rebuild behavior. Keep dependency
narrowing and environment construction out of this backport.
Correct the changelog fragment reference to the original PR, ocaml#16622.

(cherry picked from commit 673da21)

Signed-off-by: Ali Caglayan <[email protected]>
Alizter added a commit that referenced this pull request Oct 19, 2026
Correct the changelog fragment added by #16622: rename `16543.md` to
`16622.md` and update its PR reference. #16543 is the alternative
performance proposal, not the merged change described by this entry.

No code or wording changes beyond the PR reference. The same correction
is included in the 3.25 backport, #16647.

Validation: `./dune.exe build -j4 @check @fmt` passes. Tests skipped for
this documentation-only change.
@Alizter
Alizter marked this pull request as ready for review October 19, 2026 11:21
@Alizter Alizter mentioned this pull request Oct 19, 2026
62 tasks done
@Alizter
Alizter merged commit d8410ed into ocaml:3.25.0-rc Oct 19, 2026
37 checks passed
@Alizter
Alizter deleted the backport-16622-3.25 branch October 19, 2026 15:18
@Alizter Alizter added this to the 3.25.0 milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant