opam icon indicating copy to clipboard operation
opam copied to clipboard

New operator '~' for semantic versioning

Open Keryan-dev opened this issue 4 years ago • 1 comments

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.

Keryan-dev avatar Feb 08 '21 11:02 Keryan-dev

Notes from dev meeting:

  • The fact that older opam would silently interpret this as >= means we don't feel this can be reliably used in opam files
  • 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

dra27 avatar Feb 11 '22 10:02 dra27