Skip to content

test: mixed-pp lib soundness + precision baselines#14586

Open
robinbb wants to merge 1 commit into
mainfrom
robinbb-test-mixed-per-module-preprocess
Open

test: mixed-pp lib soundness + precision baselines#14586
robinbb wants to merge 1 commit into
mainfrom
robinbb-test-mixed-per-module-preprocess

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented May 18, 2026

Two test covering an unwrapped lib with per-module preprocessing where one module is default-pp (Some-entry in the per-lib index) and one is staged-pps (None-entry):

  • mixed-per-module-preprocess.t (soundness): consumer references the Some-entry module; today, the build succeeds under --sandbox=copy because today's wide cmi glob over mylib's objdir covers the staged-pps module's cmi.
  • mixed-per-module-preprocess-precision.t (precision): consumer references the Some-entry module while the staged-pps module's source contains an unresolvable identifier. Today, the wide glob pulls the bad module into consumer's deps and the build fails on the unbound identifier, pinning the current over-invalidation.

(The forthcoming per-module narrowing work (#14492) will flip the precision test's expected output from the compile error back to silent exit-0, demonstrating that the staged-pps None-entry module is no longer pulled in when the consumer doesn't reference it.)

@robinbb robinbb changed the title test: mixed-pp lib soundness + precision baselines (pair) test: mixed-pp lib soundness + precision baselines May 18, 2026
@robinbb robinbb self-assigned this May 18, 2026
@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch 5 times, most recently from 3f29e0a to b21f205 Compare May 18, 2026 19:54
@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch from b21f205 to eaeaf65 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 two new cram tests under per-module-lib-deps/ that document current behavior of inter-library dependency tracking for an unwrapped library with mixed per-module preprocessing (one default-pp module, one staged-pps module). These serve as baselines for the per-module narrowing work in #14492.

Changes:

  • New soundness test verifying that under --sandbox=copy, the consumer's compile correctly stages b.cmi even though only A is referenced.
  • New precision test pinning the current over-invalidation: the wide cmi glob pulls b.cmi (with an unbound identifier) into the consumer's compile rule, forcing a compile error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/blackbox-tests/test-cases/per-module-lib-deps/mixed-per-module-preprocess.t/run.t Soundness baseline using --sandbox=copy to ensure b.cmi remains a tracked dep of consumer.
test/blackbox-tests/test-cases/per-module-lib-deps/mixed-per-module-preprocess-precision.t/run.t Precision baseline documenting the current over-invalidation; expected to flip to silent exit-0 after #14492.

@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch from eaeaf65 to 2b0ff75 Compare May 18, 2026 20:54
@robinbb robinbb requested a review from Alizter May 18, 2026 22:09
@robinbb
Copy link
Copy Markdown
Collaborator Author

robinbb commented May 18, 2026

@Alizter This is test code that I have factored out of my 9-layer PR for 14492.

@robinbb robinbb marked this pull request as ready for review May 18, 2026 22:10
Two co-designed fixtures covering an unwrapped lib with per-module preprocessing where one module is default-pp (Some-entry in the per-lib index) and one is staged-pps (None-entry):

- `mixed-per-module-preprocess.t` (soundness): consumer references the Some-entry module; build succeeds under `--sandbox=copy` because today's wide cmi glob over `mylib`'s objdir covers the staged-pps module's cmi.
- `mixed-per-module-preprocess-precision.t` (precision): consumer references the Some-entry module while the staged-pps module's source contains an unresolvable identifier. Today, the wide glob pulls the bad module into consumer's deps and the build fails on the unbound identifier — pinning the current over-invalidation.

The forthcoming per-module narrowing work (#14492) will flip the precision test's expected output from the compile error back to silent exit-0, demonstrating that the staged-pps None-entry module is no longer pulled in when the consumer doesn't reference it.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch from 2b0ff75 to 177f57f Compare May 18, 2026 23:17
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