test: pps runtime libs reach toplevel compile rule#14606
Merged
robinbb merged 1 commit intoMay 19, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a blackbox regression test to ensure (toplevel ...) compile-rule dependencies include PPX runtime libraries declared via (ppx_runtime_libraries ...), even when the runtime library is not referenced in any source text. This guards upcoming per-module dependency narrowing work (ref #14492) from accidentally dropping these implicit runtime deps.
Changes:
- Add a new
per-module-lib-depsblackbox test covering(toplevel ...)+(preprocess (pps ...))+ non-emptyppx_runtime_libraries. - Assert (via
dune rules --deps --format=json) that the toplevel module compile rule records a deps glob over the runtime library’s bytecode objdir*.cmi.
abd265e to
6e266ff
Compare
A `(toplevel ...)` stanza that preprocesses with a ppx declaring `(ppx_runtime_libraries hello)` must pull `hello` into the toplevel's compile-rule dep set as a glob over its `.cmi` objdir, even though no source names `Hello` syntactically. Today the wide `cctx` `.cmi` glob covers it via `requires_compile` (which `add_pp_runtime_deps` extends with the ppx's runtime libs); under per-module narrowing the same surface must remain visible to the consumer. Signed-off-by: Robin Bate Boerop <me@robinbb.com>
6e266ff to
cd56076
Compare
Alizter
approved these changes
May 19, 2026
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.
Pins that a
(toplevel ...)stanza preprocessing with a ppx whose(ppx_runtime_libraries ...)is non-empty includes a glob over the runtime lib's.cmiobjdir in the toplevel's compile-rule dep set — even though no source names the runtime lib syntactically.Forward-looking regression guard for the per-module narrowing work under #14492.