opam
opam copied to clipboard
New operator '~' for semantic versioning
This follows #2976 as an attempt to implement the '~' operator. It requires another patch of opam-file-format.
Given the difference between this operator and the others, I tried to avoid it to go too deep in the opam internals. Thus, most of the changes are contained in opamFormat.ml where occurrences of the new operator are caught and rewrote from ~ v to >= v & < next(v) with the behavior of next defined in the issue.
I open the PR as a draft, as I feel the changes might need some more work to be satisfactory. Comments and reviews are most welcome.
Notes from dev meeting:
- The fact that older opam would silently interpret this as
>=means we don't feel this can be reliably used inopamfiles - However, it would be very useful to be able to use it with
--formula - Conclusion is to look at having this properly (in opam files as well) in opam 3.0