Closed andreypopp closed 7 years ago
I thought that we do configure via env var OCAMLFIND_CONF
?
Right but instead of putting a findlib.conf
on filesystem we can just provide $OCAMLPATH
, $OCAMLFIND_DESTDIR
and so on...
I see. One benefit to having files is that environment variables are typically dynamically computed. As it is, you can inspect the findlib.conf
file to see where things point to. That has helped me debug stuff in the past. Alternatively we could have a findlibEnvVars.sh which is also inspectable.
The problem with having findlib.conf
is that you need to make sure it is emitted somewhere on filesystem and in-sync with environment. So that right now you can only use Esy env after you attempted esy build
which emitted findlib.conf
. With purely env var approach everything is contained in the emitted env
file (single file). Which you can inspect for debug purposes too!
I see! Good point.
Now we configure ocamlfind via
findlib.conf
which we generate for each project. Instead we should follow manual and configure it via environment variables (hint: we do same with$PATH
currently) which is less fragile.