test: regression guard for consumer-is-virtual-impl branch#14352
Merged
Alizter merged 1 commit intoApr 29, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a blackbox regression test to ensure that a virtual library implementation stanza ((implements vlib)) correctly rebuilds when a direct (libraries ...) dependency’s interface changes, guarding behavior relied on by per-module inter-library dependency filtering work.
Changes:
- Introduce a new
per-module-lib-depsblackbox test case covering the “consumer is a virtual-library implementation” scenario. - Validate (via
dune trace+jq) that changingother_lib’s.mlitriggers a rebuild of the implementation module.
fd30eeb to
4cd7c32
Compare
4cd7c32 to
ed833ef
Compare
ed833ef to
8d2c794
Compare
Documents that a stanza with [(implements vlib)] correctly rebuilds when its [(libraries ...)] dep's interface changes. Trunk satisfies this via cctx-wide compile-rule deps. The test asserts count = 1 and passes on [main]. Pre-emptive guard for ocaml#14116's per-module dep filter. The filter's [can_filter] check excludes virtual-library implementations (their dep machinery is in [Dep_rules.deps_of_vlib_module]), so they fall back to glob deps. This test locks in the property that any future change preserving the consumer-side virtual-impl branch keeps the implementation rebuilding correctly. Distinct from the existing [virtual-library.t] which exercises the deps-side ([has_virtual_impl]) branch. Signed-off-by: Robin Bate Boerop <me@robinbb.com>
8d2c794 to
7c1510d
Compare
Alizter
approved these changes
Apr 29, 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.
Summary
Documents that a stanza with
(implements vlib)correctlyrebuilds when its
(libraries ...)dep's interface changes.Trunk satisfies this via cctx-wide compile-rule deps. The test
asserts count = 1 and passes on
main.Pre-emptive regression guard for #14116's per-module dep filter.
The filter's
can_filtercheck excludes virtual-libraryimplementations (their dep machinery is in
Dep_rules.deps_of_vlib_module), so they fall back to glob deps.This test locks in the property that any future change preserving
the consumer-side virtual-impl branch keeps the implementation
rebuilding correctly.
Distinct from the existing
virtual-library.t, which exercisesthe deps-side (
has_virtual_impl) branch.