Skip to content

test: extend wrapped-transition to cover alert-silencing success path - #14315

Merged
robinbb merged 1 commit into
ocaml:mainfrom
robinbb:robinbb-test-wrapped-with-transition
Apr 27, 2026
Merged

robinbb merged 1 commit into
ocaml:mainfrom
robinbb:robinbb-test-wrapped-with-transition

Conversation

@robinbb

@robinbb robinbb commented Apr 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Per discussion on #14307 (closed): the new test added there was
redundant with wrapped-transition.t/run.t. Taking @rgrinberg's
suggestion to combine the two, this PR extends the existing
wrapped-transition.t/run.t in place rather than introducing a new
file.

The existing test covered only the failure mode: a consumer that
reaches for the bare-name compat shim without silencing deprecation
alerts fails to build with three errors.

This PR extends the test to also cover the success path: after
observing the failure, overwrite dune with a consumer that silences
-alert -deprecated and verify the build succeeds. One file, two
sides of the migration recipe.

Also clarifies the intro prose to describe (wrapped (transition "..."))
behaviour and the two-sided test structure.

Related: closed #14307

The existing test covers only the failure mode: a consumer that
reaches for the bare-name compat shim without silencing deprecation
alerts fails to build with three errors.

Extend the test to also cover the success path: after observing the
failure, overwrite [dune] with a consumer that silences
[-alert -deprecated] and verify the build succeeds. The resulting
file documents both sides of the migration recipe in one place.

Also clarify the intro prose to describe [(wrapped (transition
"..."))] behaviour and the two-sided test structure.

Signed-off-by: Robin Bate Boerop <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Extends the existing blackbox cram test for (wrapped (transition "...")) libraries to cover both the failure mode (unsilenced use of bare-name compatibility modules) and the success path (consumer silences the deprecation alert and builds successfully), consolidating the coverage that was previously discussed in #14307.

Changes:

  • Expands the introductory prose to explain wrapped vs. bare-name compatibility module behavior and the associated deprecation alert.
  • Adds a second phase to the test that rewrites the consumer dune file to silence -alert -deprecated and verifies dune build succeeds.

💡 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 24, 2026 00:40
@robinbb
robinbb requested a review from rgrinberg April 24, 2026 00:40
@robinbb robinbb removed their assignment Apr 24, 2026
@robinbb
robinbb merged commit 466b62e into ocaml:main Apr 27, 2026
60 of 61 checks passed
@robinbb
robinbb deleted the robinbb-test-wrapped-with-transition branch April 27, 2026 00:45
Copilot AI pushed a commit that referenced this pull request Apr 27, 2026
…#14315)

## Summary

Per discussion on #14307 (closed): the new test added there was
redundant with `wrapped-transition.t/run.t`. Taking @rgrinberg's
suggestion to combine the two, this PR extends the existing
`wrapped-transition.t/run.t` in place rather than introducing a new
file.

The existing test covered only the failure mode: a consumer that
reaches for the bare-name compat shim without silencing deprecation
alerts fails to build with three errors.

This PR extends the test to also cover the success path: after
observing the failure, overwrite `dune` with a consumer that silences
`-alert -deprecated` and verify the build succeeds. One file, two
sides of the migration recipe.

Also clarifies the intro prose to describe `(wrapped (transition
"..."))`
behaviour and the two-sided test structure.

Related: closed #14307

Signed-off-by: Robin Bate Boerop <[email protected]>
Co-authored-by: Alizter <[email protected]>
@Alizter Alizter added this to the 3.24.0 milestone Jul 8, 2026
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