test: pps runtime libs reach cinaps compile rule#14607
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a single cram regression test that pins the dependency-set shape for cinaps exes that use a ppx whose ppx_runtime_libraries field is non-empty. It verifies that the compile rule for the synthesized cinaps exe module gains a glob over the runtime library's byte objdir for .cmi files, even though no source syntactically references the runtime lib — a forward-looking guard against the per-module library-dep narrowing work in #14492.
Changes:
- New cram test
cinaps-pps-runtime-libs.tsetting uphello(runtime lib),hello_ppx(no-op ppxlib rewriter declaringhelloas appx_runtime_library), and a(cinaps … (preprocess (pps hello_ppx)))stanza. - Locates the generated cinaps exe
.cmounder the digest-named subdir viafind, then usesdune rules --format=json --depsand ajq/depsGlobsfilter to assert the glob_build/default/hello/.hello.objs/byte *.cmi.
Alizter
approved these changes
May 19, 2026
A `(cinaps ...)` stanza that preprocesses with a ppx declaring `(ppx_runtime_libraries hello)` must pull `hello` into the cinaps exe'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>
b4e1daf to
ced6767
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.
Pins that a
(cinaps ...)stanza preprocessing with a ppx whose(ppx_runtime_libraries ...)is non-empty includes a glob over the runtime lib's.cmiobjdir in the cinaps exe'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.