-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Proposal: New 'revision' field and variable #4566
Comments
This could solve the problem; having one opam-file handling the multiple revisions is indeed a good idea. Here are a few drawbacks that I could see:
Re. ocaml/opam-repository#10531, we may need to differentiate between maintenance fixes (only changing opam metadata), and source fixes (changing the original tarball, adding patches, etc.). In the opam files, at the moment, there is no way to add filters to |
Current state of things
In ocaml/opam-repository#10531, users are rightfully pointing that any changes made in opam-repository can break things.
The only workaround for users that we have is "try to find the git commit that broke things and
opam repository set-url
it", which isn't ideal.The only workaround for opam-repository maintainers that we have is "try not to break things and if a new package is modified in a significant way, try to create a new
<pkg>.<ver>-1
package with the changes", which is both not ideal and very annoying because:= "1.0.1"
or<= "1.0.1"
type of constraints. We try to invite people to avoid them but some still go through (e.g. some tezos packages) or are advised (e.g.{= version}
)The proposal
To fix all this issue I'm proposing that next time we break the opam file compatibility (most likely opam 3.0), a new
revision
field and variable would be added.What would they do?
The new
revision
field would:0
if not set<pkg>.<ver>-<revision>
package an alias to<pkg>.<ver>
(at the revision<revision>
)-
could be used to avoid breaking compatibility. e.g.:
This field would work in tandem with its variable counterpart.
The new
revision
variable would:revision
variable if not givenopam install <pkg>.<ver>-<revision>
Example
Drawbacks
That I could think of, I think the main drawback from having this would be the build up of unmaintained bits in the opam files.
With time this might get out of hand.
Should partially fix ocaml/opam-repository#10531
The text was updated successfully, but these errors were encountered: