diff --git a/test/blackbox-tests/test-cases/package-materialization/instrumentation-dependencies.t b/test/blackbox-tests/test-cases/package-materialization/instrumentation-dependencies.t new file mode 100644 index 00000000000..e44a8a5bbe7 --- /dev/null +++ b/test/blackbox-tests/test-cases/package-materialization/instrumentation-dependencies.t @@ -0,0 +1,42 @@ +Instrumentation backend metadata names a PPX library that is not an ordinary +library requirement. The scoped layout must track the referenced library and +its metadata. + + $ make_dune_project 3.24 + $ cat >>dune-project <<'EOF' + > (package (name instrumentation-root)) + > (package (name instrumentation-ppx)) + > EOF + + $ mkdir backend ppx + $ cat >backend/dune <<'EOF' + > (library + > (name backend) + > (public_name instrumentation-root) + > (modules ()) + > (instrumentation.backend + > (ppx instrumentation-ppx))) + > EOF + + $ cat >ppx/dune <<'EOF' + > (library + > (name ppx) + > (public_name instrumentation-ppx) + > (kind ppx_rewriter) + > (modules ())) + > EOF + + $ cat >dune <<'EOF' + > (rule + > (target marker) + > (deps (package instrumentation-root)) + > (action (write-file %{target} "ok"))) + > EOF + +The PPX package's metadata is not currently a dependency of the action. + + $ dune rules --format=json _build/default/marker | + > jq_dune '.[] | ruleDepFilePaths' | + > censor | + > grep 'lib/instrumentation-ppx/dune-package' + [1]