Presently, src/analyze/BuildSystem.re (and maybe a few other places, I haven't checked too deeply) does not allow a configurable path to find esy and assumes that esy is in $PATH (or system equivalent) on launch.
This prevents a few different workflows:
esy installed globally, but with a unique npm prefix set to a directory that's not in a default $PATH (This is what I'm seeing. It's installed in ~/.local/bin, which I must push into $PATH by hand on OSX)
esy installed globally without overriding prefix: This just means that /usr/local isn't in $PATH
esy installed locally (and thus in <project_root>/node_modules/.bin): This is also pretty common and works amazingly with direnv (but unless that shell also starts rls, we're in trouble.
I am, admittedly, blissfully unaware of how hard this would be. It looks like BuildSystem.inferPackageManager and BuildSystem.detectFull are the only two places that Error("Couldn't get esy version") is thrown, but I have no idea where those functions are used (or if there're any other non-qualified uses of esy)
Presently,
src/analyze/BuildSystem.re
(and maybe a few other places, I haven't checked too deeply) does not allow a configurable path to findesy
and assumes thatesy
is in$PATH
(or system equivalent) on launch.This prevents a few different workflows:
prefix
set to a directory that's not in a default$PATH
(This is what I'm seeing. It's installed in~/.local/bin
, which I must push into$PATH
by hand on OSX)prefix
: This just means that/usr/local
isn't in$PATH
<project_root>/node_modules/.bin
): This is also pretty common and works amazingly with direnv (but unless that shell also starts rls, we're in trouble.I am, admittedly, blissfully unaware of how hard this would be. It looks like
BuildSystem.inferPackageManager
andBuildSystem.detectFull
are the only two places thatError("Couldn't get esy version")
is thrown, but I have no idea where those functions are used (or if there're any other non-qualified uses ofesy
)