Skip to content

test: regression guard for consumer-is-virtual-impl branch#14352

Merged
Alizter merged 1 commit into
ocaml:mainfrom
robinbb:robinbb-test-consumer-is-virtual-impl
Apr 29, 2026
Merged

test: regression guard for consumer-is-virtual-impl branch#14352
Alizter merged 1 commit into
ocaml:mainfrom
robinbb:robinbb-test-consumer-is-virtual-impl

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented Apr 27, 2026

Summary

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 regression guard for #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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-deps blackbox test case covering the “consumer is a virtual-library implementation” scenario.
  • Validate (via dune trace + jq) that changing other_lib’s .mli triggers a rebuild of the implementation module.

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/consumer-is-virtual-impl.t Outdated
@robinbb robinbb force-pushed the robinbb-test-consumer-is-virtual-impl branch from fd30eeb to 4cd7c32 Compare April 27, 2026 04:08
@robinbb robinbb requested a review from Copilot April 27, 2026 04:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/consumer-is-virtual-impl.t Outdated
@robinbb robinbb force-pushed the robinbb-test-consumer-is-virtual-impl branch from 4cd7c32 to ed833ef Compare April 27, 2026 04:57
@robinbb robinbb requested a review from Copilot April 27, 2026 04:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/consumer-is-virtual-impl.t Outdated
@robinbb robinbb force-pushed the robinbb-test-consumer-is-virtual-impl branch from ed833ef to 8d2c794 Compare April 27, 2026 05:18
@robinbb robinbb requested a review from Copilot April 27, 2026 05:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@robinbb robinbb marked this pull request as ready for review April 27, 2026 06:24
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>
@robinbb robinbb force-pushed the robinbb-test-consumer-is-virtual-impl branch from 8d2c794 to 7c1510d Compare April 27, 2026 15:41
@robinbb robinbb requested a review from Copilot April 28, 2026 20:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@Alizter Alizter self-assigned this Apr 29, 2026
@Alizter Alizter merged commit 9ce3d2d into ocaml:main Apr 29, 2026
56 of 63 checks passed
@robinbb robinbb deleted the robinbb-test-consumer-is-virtual-impl branch April 29, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants