Skip to content

test: regression baseline for (modules ...) cmi glob over-invalidation#14585

Open
robinbb wants to merge 1 commit into
mainfrom
robinbb-test-unwrapped-explicit-modules-baseline
Open

test: regression baseline for (modules ...) cmi glob over-invalidation#14585
robinbb wants to merge 1 commit into
mainfrom
robinbb-test-unwrapped-explicit-modules-baseline

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented May 18, 2026

Pins today's behaviour for a (wrapped false) library with an explicit (modules a b) clause: editing one sibling's .mli rebuilds every sibling's compile rule because the consumer's compile depends on the lib's whole-objdir .cmi glob.

The test asserts (via dune trace cat + jq) the rebuild lists explicitly. The forthcoming per-module narrowing work (#14492) will flip both expected outputs to [] (sibling rebuilds suppressed by per-module deps).

Matches the exact lib shape raised in #14492's review feedback; the explicit (modules ...) clause routes through a different parse path from the implicit form covered by lib-to-lib-unwrapped.t, so a separate observational test pins the equivalence empirically.

@robinbb robinbb force-pushed the robinbb-test-unwrapped-explicit-modules-baseline branch 2 times, most recently from 0912f61 to b0c7151 Compare May 18, 2026 18:02
@robinbb robinbb self-assigned this May 18, 2026
@robinbb robinbb force-pushed the robinbb-test-unwrapped-explicit-modules-baseline branch from b0c7151 to 203d9c3 Compare May 18, 2026 20:22
Pins today's behaviour for a `(wrapped false)` library with an explicit `(modules a b)` clause: editing one sibling's `.mli` rebuilds every sibling's compile rule because the consumer's compile depends on the lib's whole-objdir `.cmi` glob.

The test asserts (via `dune trace cat` + `jq`) the rebuild lists explicitly. The forthcoming per-module narrowing work (#14492) will flip both expected outputs to `[]` (sibling rebuilds suppressed by per-module deps).

Matches the exact lib shape raised in #14492's review feedback; the explicit `(modules ...)` clause routes through a different parse path from the implicit form covered by `lib-to-lib-unwrapped.t`, so a separate observational test pins the equivalence empirically.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
@robinbb robinbb force-pushed the robinbb-test-unwrapped-explicit-modules-baseline branch from 203d9c3 to 5231a1a Compare May 18, 2026 20:32
@robinbb robinbb requested a review from Copilot May 18, 2026 20:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a blackbox regression test that pins current over-invalidation behavior for (wrapped false) libraries with explicit (modules ...), providing a baseline for forthcoming per-module dependency narrowing.

Changes:

  • Creates an explicit-module unwrapped library and a sibling consumer library.
  • Asserts current wide .cmi glob dependencies via dune rules.
  • Verifies unrelated consumer modules rebuild after sibling .mli edits.

@robinbb robinbb requested a review from Alizter May 18, 2026 22:10
@robinbb
Copy link
Copy Markdown
Collaborator Author

robinbb commented May 18, 2026

@Alizter This is test code factored out of the stack for PR 14492.

@robinbb robinbb marked this pull request as ready for review May 18, 2026 22:11
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.

3 participants