ocamlformat: Add constraints on Dune 3.22#29568
Conversation
The behavior of the (diff) rules with non-existant files has changed in Dune 3.22, which break OCamlformat's testsuite.
|
Related change in Dune: ocaml/dune#13696 |
| "cmdliner" {>= "1.1.0" & < "2.0"} | ||
| "base" {>= "v0.12.0"} | ||
| "dune" {>= "2.8"} | ||
| "dune" {>= "2.8" & (>= "2.8" | < "3.22" & with-test)} |
There was a problem hiding this comment.
This does not work, in the right statement, left is true, so it remains true when not < 3.22
There was a problem hiding this comment.
I think the following should work
| "dune" {>= "2.8" & (>= "2.8" | < "3.22" & with-test)} | |
| "dune" {>= "2.8"} | |
| "dune" {< "3.22" & with-test} |
There was a problem hiding this comment.
Thanks!
I got this with the following in Dune:
(dune
(or
(>= 2.8)
(and
(< 3.22)
:with-test)))
Is it wrong too ?
There was a problem hiding this comment.
I think you need to add
(dune
(and
(< 3.22)
:with-test))
In any case, adding dune constraints to the dune file is brittle in my experience. Since dune always adds itself with the appropriate lower bound and since it does not reduce the constraints properly, if often ends up being messy (or wrong like in this case). The only way I can think of right now is be to use a template file.
Otherwise we can add a comment (say in the opam file with a template) to fix it manually on release.
There was a problem hiding this comment.
Thanks for your help :) I've lifted the constraints in the dev version so next release won't have the same issue.
|
In the meantime I suggest we merge this |
|
The issue happens in CI: https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/353fd9234f0397ed1edb6d612e5b9da8472dea1c/variant/compilers,5.4,ocamlformat-lib.0.28.1,revdeps,ocamlformat.0.28.1 |
|
It installs ocamlformat-lib without the "with-test" flag, so it picks up dune 3.22, then it re-installs ocamlformat with "with-test" and it seems that at this point it kind of ignores that conflict, but then the call to |
|
I propagated the change to |
|
The issue in the testsuite is gone but there are new errors that I don't understand. |
|
The remaining failures do not depend on this. Thanks! |
The behavior of the (diff) rules with non-existant files has changed in Dune 3.22, which break OCamlformat's testsuite.
I updated the constraints of all versions of
ocamlformat-libandocamlformat.0.24.1. Earlier versions ofocamlformathas a upper bound on Dune and later versions depend onocamlformat-lib.