Skip to content

feat: persist filtered library set as build target#14275

Closed
robinbb wants to merge 1 commit intoocaml:robinbb-issue-4572-combined-testsfrom
robinbb:robinbb-issue-4572-persisted-filter
Closed

feat: persist filtered library set as build target#14275
robinbb wants to merge 1 commit intoocaml:robinbb-issue-4572-combined-testsfrom
robinbb:robinbb-issue-4572-persisted-filter

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented Apr 20, 2026

Summary

Write the filtered library names to a .filtered-libs file per module.
The compilation rule reads this file to set up deps, instead of computing
the filtering inline in the builder.

On a null build, the .filtered-libs rule is a cache hit (its inputs —
.d files — haven't changed), so the filtering computation is skipped
entirely. The compilation rule just reads one small file and resolves
library names.

Alternative to #14273 (consolidated .all-raw-deps). This approach
caches the entire filtering computation (including Lib.closure), not
just the .d file reads.

Depends on #14116.

Test plan

  • per-module-lib-deps tests pass
  • hidden-deps-supported tests pass
  • root-module tests pass
  • CI
  • Benchmark null build comparison

Write the filtered library names to a .filtered-libs file per module.
The compilation rule reads this file to set up deps, instead of
computing the filtering inline.

On a null build, the .filtered-libs rule is a cache hit (its inputs —
.d files — haven't changed), so the filtering computation is skipped
entirely. The compilation rule just reads one small file and resolves
library names.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
@robinbb
Copy link
Copy Markdown
Collaborator Author

robinbb commented Apr 20, 2026

Closing in favor of #14273, which achieves the same goal with less complexity.

@robinbb robinbb closed this Apr 20, 2026
@robinbb robinbb deleted the robinbb-issue-4572-persisted-filter branch April 20, 2026 22:55
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