Repository navigation
test(opam): reproduce missing promotion after source deletion - #16232
Merged
Merged
Conversation
Signed-off-by: Ali Caglayan <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds a focused cram regression test reproducing stale @opam action caching after deleting a generated source OPAM file.
Changes:
- Creates and promotes
foo.opam. - Deletes it and verifies the missing creation promotion.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Alizter
force-pushed
the
opam-source-deletion-repro
branch
from
August 28, 2026 13:26
9e6d2e7 to
5a9ae0f
Compare
Alizter
added a commit
that referenced
this pull request
Aug 31, 2026
## Description Run generated OPAM-file diff actions in a sandbox. After a generated OPAM file is deleted, the stale build-tree copy is no longer a declared dependency and is therefore excluded from the sandbox. The diff then treats the source as missing and records a creation promotion. The regression test was added separately in #16232. This PR updates its expectations to cover the fix. ## Related Issue and Motivation Fixes #16233 Deleting a generated OPAM file should allow `@opam` to regenerate and promote it again. ## Testing - `dune build @check @fmt` - `dune runtest test/blackbox-tests/test-cases/dune-project-meta`
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.
Description
Reproduction case for #16233.
Add a minimal cram regression test for generated OPAM files. The test primes
the
@opamdiff action whilefoo.opamexists, removes the source file, andcaptures the current behavior:
dune build @opamsucceeds without registeringa creation promotion, leaving
foo.opammissing.The fix is in #16234.
Related Issue and Motivation
This was reported while upgrading to Dune 3.24.2 with
(lang dune 3.24)and(generate_opam_files). Removing a generated OPAM file should cause@opamtooffer the regenerated file for promotion.
Testing
dune build @check @fmtdune runtest test/blackbox-tests/test-cases/dune-project-meta