Skip to content

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

Merged
Alizter merged 1 commit into
mainfrom
robinbb-test-mixed-per-module-preprocess
May 27, 2026
Merged

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

Conversation

@robinbb

@robinbb robinbb commented May 18, 2026

Copy link
Copy Markdown
Collaborator

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

Copilot AI left a comment

Copy link
Copy Markdown

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

robinbb commented May 18, 2026

Copy link
Copy Markdown
Collaborator Author

@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
@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch 2 times, most recently from 177f57f to 1ca3347 Compare May 20, 2026 20:33
@robinbb robinbb force-pushed the robinbb-test-mixed-per-module-preprocess branch 2 times, most recently from e70d358 to c3a854b Compare May 21, 2026 01:34
@robinbb robinbb requested a review from Copilot May 21, 2026 01:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/mixed-per-module-preprocess.t Outdated
Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/mixed-per-module-preprocess.t Outdated
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 c3a854b to 6470ecb Compare May 21, 2026 02:21
@robinbb robinbb requested a review from Copilot May 21, 2026 02:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

@robinbb robinbb requested a review from Alizter May 21, 2026 05:53
@Alizter Alizter merged commit 35b67d9 into main May 27, 2026
62 of 63 checks passed
@Alizter Alizter deleted the robinbb-test-mixed-per-module-preprocess branch May 27, 2026 19:39
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