Skip to content

test: sibling-module consumer unreferenced-dep regression guard#14309

Merged
robinbb merged 2 commits into
ocaml:mainfrom
robinbb:robinbb-test-sibling-unreferenced-lib
Apr 27, 2026
Merged

test: sibling-module consumer unreferenced-dep regression guard#14309
robinbb merged 2 commits into
ocaml:mainfrom
robinbb:robinbb-test-sibling-unreferenced-lib

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented Apr 23, 2026

Summary

Adds a blackbox cram test recording the rebuild-target count for a
consumer module spurious_rebuild in a multi-module unwrapped
consumer library whose sibling consumes_dep references a module of
the declared dependency but spurious_rebuild itself references
nothing from that dependency.

On current main the count is 1: the consumer library depends on a
glob over dep_lib's object directory, which is invalidated by the
cmi change on referenced_dep. A future fix implementing library-
level dep filtering at consumer-module granularity would drop
dep_lib entirely from spurious_rebuild's deps and tighten this
corner to 0.

This zero-reference-sibling-in-a-library corner is not covered by
existing tests:

  • test-cases/per-module-lib-deps/lib-to-lib-unwrapped.t probes
    siblings that reference a different (non-edited) module of the dep
    — one-reference, not zero.
  • test-cases/per-module-lib-deps/transitive.t and
    test-cases/per-module-lib-deps/unwrapped.t probe zero-reference
    modules but within executable stanzas, not library stanzas.

Related: #4572, #14116

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 cram test to guard against regressions in per-module inter-library dependency filtering: when only one module in a consumer library references a dependency library, edits to the dependency’s referenced module (without interface/signature change) must not cause recompilation of the consumer’s unreferenced sibling module.

Changes:

  • Add a new per-module-lib-deps blackbox test covering the “sibling module does not reference dependency” scenario.
  • Validate via dune trace that modB1 is not rebuilt after a non-signature-changing edit to libA’s modA2.ml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robinbb robinbb marked this pull request as ready for review April 23, 2026 22:31
@robinbb robinbb requested a review from Copilot April 23, 2026 23:04
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.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/sibling-unreferenced-lib.t Outdated
robinbb added a commit to robinbb/dune that referenced this pull request Apr 23, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 23, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
@robinbb robinbb requested a review from Copilot April 23, 2026 23:52
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.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

robinbb added a commit to robinbb/dune that referenced this pull request Apr 24, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 24, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
@robinbb robinbb force-pushed the robinbb-test-sibling-unreferenced-lib branch from 6b184c5 to 7027ba0 Compare April 24, 2026 00:54
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 25, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 26, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 26, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 27, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request Apr 27, 2026
Per Copilot review on ocaml#14309: the test does not rely on any feature
newer than 3.0; the [(lang dune)] version can gate
dependency-analysis behaviour, so using 3.22 may unintentionally
change what this test is guarding. Consistent with other baseline
tests in this directory.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
Copy link
Copy Markdown
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

I think the test is fine, my comments are mostly about how to make the test easier to read.

Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/sibling-unreferenced-lib.t Outdated
Comment thread test/blackbox-tests/test-cases/per-module-lib-deps/sibling-unreferenced-lib.t Outdated
robinbb added a commit to robinbb/dune that referenced this pull request Apr 29, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request Apr 30, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 1, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 2, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 3, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 3, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 3, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 6, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 6, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 7, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 7, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 8, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 9, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit to robinbb/dune that referenced this pull request May 9, 2026
The test came in via ocaml#14309 as an observational baseline (originating
from @nojb's repro in
ocaml#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 10, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
robinbb added a commit that referenced this pull request May 10, 2026
The test came in via #14309 as an observational baseline (originating
from @nojb's repro in
#14116 (comment)).
On trunk it asserts a count of 1 — [spurious_rebuild] re-runs once
because the consumer's compile rule globs over [dep_lib]'s objdir
and any [.cmi] change in there fires.

[| length] hides which target actually re-ran. A future change that
quietly swaps which rule re-runs (e.g. [.cmo]/[.cmt] dropped but
[.cmx] picked up) could still show [length = 1] and slip past the
test. Promote the assertion to inspect the array of [target_files]
returned by [targetsMatchingFilter] — same pattern as
[implicit-transitive-deps-false.t] and the [[]] / [true] asserts in
[alias-reexport.t].

This is a style-only upgrade: the asserted shape (one rule
re-running, producing [.cmi]+[.cmo]+[.cmt]) reflects trunk's
current behaviour. On this PR the per-module filter narrows the
deps, eliminating the rebuild — the diff produced by running this
test against the PR (count = 0 on disk vs the asserted single rule)
is the visible improvement, and a later commit will flip the
assertion to [[]] alongside the rest of the post-fix test
promotions.

Signed-off-by: Robin Bate Boerop <me@robinbb.com>
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.

4 participants