You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install num.1.5 in findlib directory as well as stdlib
Num does a bit of an unusual thing for findlib packages as it installs
into (what it considers) the OCaml stdlib.
This works as long as the stdlib is in `%{lib_root}%/ocaml` and thus it
doesn't findlib to add it to the compiler search path. In the new dune
package management `%{lib_root}%/ocaml` will not point to the ocaml
compiler stdlib thus `num` will not be found unless its installation
directory is added to the search path (via findlib or dune or any other
mechanism that evaluates META files).
In OCaml 5.0 this is the default already, `num` is never installed in
the stdlib but always into its package folder.
This patch changes the behavior for OCaml 4.x where before `num` was
only installed into the stdlib folder (and didn't need to be stated as
dependency) but referencing it via findlib did not hurt to install it in
*both* the stdlib and the package folder.
This way if a package depends on num in the stdlib without referencing
num it will find num in the stdlib, but if `num` is referenced via
findlib it will add the package folder to the search path and find
either copy.
This patch has been merged upstream, see the discussion at
ocaml/num#40 for more details. This patch just
backports the change to the latest released `num` version as future
versions of `num` will come with this change. The next num release might
be some time off given `num` is mostly "done" therefore this patch is
meant to bridge the gap and a recommendation from @dra27 who is
maintaining `num` upstream.
0 commit comments