-
Notifications
You must be signed in to change notification settings - Fork 30
Stop generating compiler META files for OCaml 5.0+ #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
64141d6 to
57690a7
Compare
|
@gerdstolpmann - OCaml 5.0.0~alpha1 is out. Would it be possible to have a 1.9.6 release with this and #54, please? |
configure
Outdated
| # Find out standard library location | ||
|
|
||
| ocaml_core_stdlib=`get_stdlib` | ||
| ocaml_major="`ocamlc -vnum | cut -f1 -d.`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since ocamlfind also supports old versions of the compiler, the question arises how to figure out the version:
-vnumis available since 3.12.0-versionis available since 3.06
Maybe:
ocaml_major="`ocamlc -vnum 2>/dev/null | cut -f1 -d.`"
if [ -z "$ocaml_major" ]; then ocaml_major=3; fi # -vnum was introduced in OCaml-3.12.0
I am absolutely sure you cannot use ocamlfind with anything before OCaml-3, but it is a bit unclear what the first supported version really is. I am reluctant to remove support for very old versions because ocamlfind is so central in the ecosystem.
|
@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). |
Since OCaml 5.0 installs its own
Only the bytes package META file is ever generated for 5.0
OCaml 5.0 ships its own META files which are installed in subdirectories of the Standard Library. Add the OCaml Standard Library directory to the path setting in findlib.conf unless findlib is configure'd with `-sitelib $(ocamlc -where)`
57690a7 to
6cbb0fa
Compare
|
No problem at all, @gerdstolpmann! Rebased and updated. findlib hasn't supported OCaml 3.x since 1.8.0 when 23cafe1 introduced a use of 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:
|
|
Nice! I'll apply these patches. |
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
METAfiles in directories under the Standard Library directory.The previous version was not able to guarantee the operation of Dune or opam's
ocaml-systembecause there wasn't a mechanism for reliably determining the location of the compiler'sMETAfiles. The latest revision proposes that the compiler'sMETAare 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:
runtime_eventsMETAfile, since findlib never needs to build itconfigurenever to generateMETAfiles for the compiler for 5.0+pathinfindlib.conf(unless findlib is configured with-sitelib $(ocamlc -where)as this is then unnecessary)The last part requires a small tweak for Windows to take advantage of the fact that
cygpathknows how to translatePATH-style variables.