Do not include compiler packages flagged with avoid-version/deprecated in the invariant when calling 'opam switch create [name] <version>'#6494
Merged
kit-ty-kate merged 2 commits intoocaml:masterfrom May 2, 2025
Conversation
1e97dc5 to
d6cb6ba
Compare
d6cb6ba to
5ab94c8
Compare
…oid-version/deprecated packages
…d in the invariant when calling 'opam switch create [name] <version>'
5ab94c8 to
cf31f73
Compare
rjbou
approved these changes
May 2, 2025
Comment on lines
+753
to
+754
| not (OpamFile.OPAM.has_flag Pkgflag_AvoidVersion opam) && | ||
| not (OpamFile.OPAM.has_flag Pkgflag_Deprecated opam)) |
Collaborator
There was a problem hiding this comment.
There is several places in the code where there is an avoid version || deprecated or its negation. It may worth to have a function that returns, in order to factorise. Not necessary for this PR though.
|
|
||
| <><> Upgrading repositories from older opam format ><><><><><><><><><><><><><><> | ||
| Upgrading repository "from-link"... | ||
| ### :a: switch create <version> should not have packages tagged with |
Collaborator
There was a problem hiding this comment.
Suggested change
| ### :a: switch create <version> should not have packages tagged with | |
| ### :C: Invariant setting of newly created switch, with avoid version & deprecated flag | |
| ### :C:a: switch create <version> should not have packages tagged with |
Member
Author
There was a problem hiding this comment.
This reftest does not have sections
| -> installed ocaml-system.5.3.0 | ||
| -> installed reverse-ocaml.5.3.0 | ||
| Done. | ||
| ### :b: switch create <version> should not have packages tagged with |
Collaborator
There was a problem hiding this comment.
Suggested change
| ### :b: switch create <version> should not have packages tagged with | |
| ### :C:b: switch create <version> should not have packages tagged with |
kit-ty-kate
added a commit
to kit-ty-kate/opam-repository
that referenced
this pull request
May 4, 2025
This makes sure opam switches do not end up with ocaml-system unknowingly. opam switches can still use it as long as that requirement is explicit. This fixes a large number of issues encountered by users. See ocaml/opam#6494 and ocaml/opam#6307
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.
Yet another alternative to #6465 #6466 and #6493