test: cross-library .cmi regression baselines (4 fixtures)#14584
Open
robinbb wants to merge 1 commit into
Open
test: cross-library .cmi regression baselines (4 fixtures)#14584robinbb wants to merge 1 commit into
robinbb wants to merge 1 commit into
Conversation
7e57b43 to
1b7d59d
Compare
1b7d59d to
3c4514f
Compare
There was a problem hiding this comment.
Pull request overview
Adds blackbox regression fixtures under per-module-lib-deps/ to pin today’s “wide .cmi glob” behavior for cross-library compilation dependencies in cases where ocamldep can’t see the full transitive .cmi chain (preprocess/action, ppx runtime deps, instrumentation backend, and -open flags). These baselines are intended to guard upcoming per-module dependency narrowing work (#14492).
Changes:
- Add a preprocess
(action ...)fixture ensuring a consumer build succeeds under--sandbox=copywhen only transitive.cmiloads make the leaf needed. - Add a ppx runtime-libraries fixture ensuring the consumer build succeeds under
--sandbox=copyeven when the runtime library is never named in consumer source. - Add an instrumentation-backend fixture that snapshots the current
.cmiglob present indune rulesJSON output.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-preprocess-barrier.t | New blackbox test for .cmi dep tracking across an action-preprocessed library under sandbox copy. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-pps-runtime-no-ocamldep-barrier.t/run.t | New blackbox test exercising ppx_runtime_libraries-induced compile-time .cmi needs under sandbox copy. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-instrumentation-barrier.t/run.t | New blackbox test pinning current instrumentation-disabled behavior and .cmi glob presence in dune rules output. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-instrumentation-barrier.t/ppx/hello.ml | Support library for the instrumentation backend fixture. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-instrumentation-barrier.t/ppx/hello_ppx.ml | Support ppx rewriter for the instrumentation backend fixture. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-instrumentation-barrier.t/ppx/dune-project | Defines the nested hello package for the instrumentation backend fixture. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-instrumentation-barrier.t/ppx/dune | Declares the instrumentation backend and its ppx/runtime library. |
| test/blackbox-tests/test-cases/per-module-lib-deps/cross-lib-open-flag-barrier.t | New blackbox test intended to cover -open-hidden transitive .cmi needs under sandbox copy. |
3c4514f to
3fb5e95
Compare
Collaborator
Author
|
@Alizter This is more code that I have factored out of the 9-layer PR 14492. |
Four fixtures pinning the consumer-compile cmi-dep behaviour today, when the cctx-wide cmi glob over a dep lib's objdir covers the consumer's transitive `.cmi` needs regardless of whether `ocamldep` can see the chain syntactically. Each fixture hides the leaf's name from `ocamldep` through a different mechanism: - `cross-lib-preprocess-barrier.t` — `(preprocess (action ...))` - `cross-lib-pps-runtime-no-ocamldep-barrier.t` — `(preprocess (pps X))` + `ppx_runtime_libraries` - `cross-lib-instrumentation-barrier.t` — `(instrumentation (backend X))` - `cross-lib-open-flag-barrier.t` — `(flags (-open M))` Three of the four assert build success under `--sandbox=copy`. The instrumentation case additionally pins today's wide cmi glob over `middle`'s objdir in `dune rules` output. The forthcoming per-module narrowing work (#14492) will validate that each construct continues to work soundly under tighter per-module dep tracking, and will flip the instrumentation case's `jq` expected output from "glob present" to "glob absent". Signed-off-by: Robin Bate Boerop <me@robinbb.com>
3fb5e95 to
6b999b2
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.
Four fixtures pinning the consumer-compile cmi-dep behaviour today, when the cctx-wide cmi glob over a dep lib's objdir covers the consumer's transitive
.cmineeds regardless of whetherocamldepcan see the chain syntactically. Each fixture hides the leaf's name fromocamldepthrough a different mechanism:cross-lib-preprocess-barrier.t—(preprocess (action ...))cross-lib-pps-runtime-no-ocamldep-barrier.t—(preprocess (pps X))+ppx_runtime_librariescross-lib-instrumentation-barrier.t—(instrumentation (backend X))cross-lib-open-flag-barrier.t—(flags (-open M))Three of the four assert build success under
--sandbox=copy. The instrumentation case additionally pins today's wide cmi glob overmiddle's objdir indune rulesoutput.The forthcoming per-module narrowing work (#14492) will validate that each construct continues to work soundly under tighter per-module dep tracking, and will flip the instrumentation case's
jqexpected output from "glob present" to "glob absent".