Hello! Reporting back
!
First, I want to note that, IMO, we should have coordinated on the plans for this change with concerned parties before moving forward with the change – it shouldn’t have come as surprise. I’ll put this on the agenda for our next dev meeting to see if can ensure this is coordinated better in the future.
I think we should also make sure we are addressing the problem you’re raising! IIUC, the annoyance comes from the fact that some packages in the opam repository will have an upper bound on versions of OCaml < 14.0 and they have no upper bound on their dune dependency, and want to continue using the latest version of dune. Is that correct?
Insofar as this is the concern, I’ve tried to gauge the scope of the impact. This is an imperfect method, but it seems to indicate that only a handful of packages are in this situation:
[17:41:41 ~/Repos/ocaml/opam-repository]
$ rg '"ocaml".*<.*"4.14.0"' -l | xargs rg '"dune".*[^<]' -l
packages/owl-zoo/owl-zoo.1.0.1/opam
packages/owl-zoo/owl-zoo.0.7.1/opam
packages/binaryen/binaryen.0.16.0/opam
packages/owl-zoo/owl-zoo.0.7.0/opam
packages/ppx_tools/ppx_tools.6.4/opam
packages/lutils/lutils.1.54.1/opam
packages/owl-zoo/owl-zoo.0.8.0/opam
packages/camelot/camelot.2.0.1/opam
packages/owl-zoo/owl-zoo.1.0.0/opam
packages/owl-zoo/owl-zoo.0.4.0/opam
packages/ppx_cstubs/ppx_cstubs.0.6.1.2/opam
packages/owl-zoo/owl-zoo.0.7.2/opam
packages/ppx_cstubs/ppx_cstubs.0.5.0.2/opam
packages/owl-zoo/owl-zoo.0.10.0/opam
packages/owl-zoo/owl-zoo.0.9.0/opam
packages/p5scm/p5scm.0.1.0/opam
packages/owl-zoo/owl-zoo.0.5.0/opam
packages/owl-zoo/owl-zoo.1.0.2/opam
packages/binaryen/binaryen.0.17.0/opam
↳[0]
[17:41:50 ~/Repos/ocaml/opam-repository]
$ rg '"ocaml".*<.*"4.14.0"' -l | xargs rg '"dune".*[^<]' -l | wc -l
19
Please let us know if there is a wider concern or I am misunderstanding the problem you anticipate.
The motive for this change is to reduce the dune maintenance burden. But I think it is safe to say that we also want to support as much flexibility as we can and to continue contributing to the culture of strong backward compatibility and long term stability.
To this end, @Alizter has proposed the following change for inclusion in a 3.23.1 patch release: fix: support building dune with ocamlfind-secondary on older OCaml switches by Alizter · Pull Request #14443 · ocaml/dune · GitHub . This should allow packages that require an older version of the OCaml compiler to continue depending on the latest versions of dune, by falling back to the secondary compiler at 4.14 to build dune when needed.
This can be tested in a switch using an ocaml version older than 4.14 with
opam pin dune.dev git@github.com:Alizter/dune.git#push-rwztynqnpuro
We would be keen to get your view on whether this is a suitable solution or if you foresee other problems!
(Incidentally, I was not able to test this on the first two systems I tried, because they cannot install OCaml versions older than 4.14 due to lack of support for recent gcc toolchains :)).