Skip to content

Allow configuring esy path #452

@bbenne10

Description

@bbenne10

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions