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
It's possible to remove the dependency on opam-installer for projects that use build systems, that have a deep understanding of ocamlfind. jbuilder is one of these build systems. If it cannot find opam, it will use the $OCAMLFIND_DESTDIR variable. I found one issue, and I suspect another one will emerge:
Even if my project does not depend on opam-installer-bin, even if some other project depends on it, it will be added to my PATH while running build commands, and jbuilder will think that opam is installed, and will try to use opam-installer to install my library. A longer term (harder) fix is to distinguish those "build-time-only" dependencies which won't augment PATH transitively. I'm hoping there's a shorter term fix.
I'm not able to test if this is a problem due to number 1, but I think $OCAMLFIND_DESTDIR variable is configured slightly differently than it should be. Here's what it is for my ReasonNativeProject:
Inside of esy build-shell: the variable is set to /Users/jwalke/.esy/3.x.x________________________________________________________________/s/reason_native_project-0.0.1-a00bddbe/lib
With esy sh -c 'echo $OCAMLFIND_DESTDIR' it points to the cache: /Users/jwalke/github/ReasonNativeProject/node_modules/.cache/_esy/store/s/reason_native_project-0.0.1-a00bddbe/lib
I'm not sure if build-shell should also be pointing to the local project build cache.
But also notice that they have the trailing /lib. Is this expected? esy sh -c echo $cur__install prints the location of the local build cache but without the lib: /Users/jwalke/github/ReasonNativeProject/node_modules/.cache/_esy/store/s/reason_native_project-0.0.1-a00bddbe. I suspect if I had a workaround for number 1, this trailing /lib would cause a problem.
The text was updated successfully, but these errors were encountered:
Forget about this issue for now. It's hard to tell what jbuilder promises to do. Even if we remove opam-installer from the environment, I'm not confident jbuilder will even attempt its own solid version of opam-installer. I'm going to instead open another issue to discuss potentially making opam-installer work out of the box.
It's possible to remove the dependency on
opam-installer
for projects that use build systems, that have a deep understanding ofocamlfind
.jbuilder
is one of these build systems. If it cannot findopam
, it will use the$OCAMLFIND_DESTDIR
variable. I found one issue, and I suspect another one will emerge:opam-installer-bin
, even if some other project depends on it, it will be added to myPATH
while running build commands, andjbuilder
will think thatopam
is installed, and will try to useopam-installer
to install my library. A longer term (harder) fix is to distinguish those "build-time-only" dependencies which won't augment PATH transitively. I'm hoping there's a shorter term fix.$OCAMLFIND_DESTDIR
variable is configured slightly differently than it should be. Here's what it is for myReasonNativeProject
:esy build-shell
: the variable is set to/Users/jwalke/.esy/3.x.x________________________________________________________________/s/reason_native_project-0.0.1-a00bddbe/lib
esy sh -c 'echo $OCAMLFIND_DESTDIR'
it points to the cache: /Users/jwalke/github/ReasonNativeProject/node_modules/.cache/_esy/store/s/reason_native_project-0.0.1-a00bddbe/libI'm not sure if build-shell should also be pointing to the local project build cache.
But also notice that they have the trailing
/lib
. Is this expected?esy sh -c echo $cur__install
prints the location of the local build cache but without thelib
:/Users/jwalke/github/ReasonNativeProject/node_modules/.cache/_esy/store/s/reason_native_project-0.0.1-a00bddbe
. I suspect if I had a workaround for number 1, this trailing/lib
would cause a problem.The text was updated successfully, but these errors were encountered: