Skip to content

Upgrade opam root: add conditionnal hard upgrade#6949

Open
rjbou wants to merge 2 commits into
ocaml:masterfrom
rjbou:conditional-upgrade-opamroot
Open

Upgrade opam root: add conditionnal hard upgrade#6949
rjbou wants to merge 2 commits into
ocaml:masterfrom
rjbou:conditional-upgrade-opamroot

Conversation

@rjbou
Copy link
Copy Markdown
Collaborator

@rjbou rjbou commented May 29, 2026

For #6625, we need to perform an hard upgrade for a specific case that is not common.
We add then a in this PR a mechanism to perform conditional hard upgrade, like that most people are not affected by the hard upgrade.
We also add some invariant on conditional hard upgrade, if there is a conditional hard upgrade on a version X:

  • there is no defined light upgrade in the upgrade code for version X
  • there is an automatic generation of a no-op light upgrade, that sets the opam root to version X

In the story of #6625

@rjbou rjbou added this to the 2.6.0~alpha1 milestone May 29, 2026
Comment thread src/state/opamFormatUpgrade.ml Outdated
Comment thread src/state/opamFormatUpgrade.ml Outdated
Comment thread src/state/opamFormatUpgrade.ml Outdated
Comment thread src/state/opamFormatUpgrade.ml Outdated
Comment thread src/state/opamFormatUpgrade.ml Outdated
Comment thread src/state/opamFormatUpgrade.ml Outdated
@rjbou rjbou force-pushed the conditional-upgrade-opamroot branch from 1cc3b11 to 8b8f5d9 Compare May 29, 2026 16:03
Comment on lines +1297 to +1298
v, f, cond
)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
v, f, cond
)
v, f, cond)

@rjbou
Copy link
Copy Markdown
Collaborator Author

rjbou commented May 29, 2026

Reviewed by @kit-ty-kate: lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant