test: mixed-pp lib soundness + precision baselines#14586
Open
robinbb wants to merge 1 commit into
Open
Conversation
3f29e0a to
b21f205
Compare
b21f205 to
eaeaf65
Compare
There was a problem hiding this comment.
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 stagesb.cmieven though onlyAis 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. |
eaeaf65 to
2b0ff75
Compare
Collaborator
Author
|
@Alizter This is test code that I have factored out of my 9-layer PR for 14492. |
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>
2b0ff75 to
177f57f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=copybecause today's wide cmi glob overmylib'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.)