ocaml / ocamlfind

The OCaml findlib library manager
Other
30 stars 30 forks source link

Stop generating compiler META files for OCaml 5.0+ #52

Closed dra27 closed 2 years ago

dra27 commented 2 years ago

This is an update of #45, compatible with the latest version pushed to ocaml/ocaml#11007. The current proposal is that from OCaml 5.0.0~alpha1, the compiler installs its own META files in directories under the Standard Library directory.

The previous version was not able to guarantee the operation of Dune or opam's ocaml-system because there wasn't a mechanism for reliably determining the location of the compiler's META files. The latest revision proposes that the compiler's META are therefore always installed in the same place, with Dune and ocamlfind using that fact to change their default search paths for packages accordingly.

This PR, therefore:

The last part requires a small tweak for Windows to take advantage of the fact that cygpath knows how to translate PATH-style variables.

dra27 commented 2 years ago

@gerdstolpmann - OCaml 5.0.0~alpha1 is out. Would it be possible to have a 1.9.6 release with this and https://github.com/ocaml/ocamlfind/pull/54, please?

gerdstolpmann commented 2 years ago

@dra27 This looks good, just one suggestion for improvement. I can release on this weekend (btw., sorry for the delay, it was a very busy year so far).

dra27 commented 2 years ago

No problem at all, @gerdstolpmann! Rebased and updated. findlib hasn't supported OCaml 3.x since 1.8.0 when 23cafe184a5899946599ceda4583e3ee32cef69a introduced a use of String.map (which is a 4.00 stdlib function). I've hardened the configure script as suggested for OCaml 3.x, regardless - and also fixed a typo from an earlier OCaml 5 related change.

findlib has been 3.08+ since findlib 1.1! It's up to you, but 3.08-3.12 can be "re-supported" with these three commits which are in the "old-compilers" branch of my fork:

gerdstolpmann commented 2 years ago

Nice! I'll apply these patches.