rescript-lang / rescript-lang/rescript-vscode

Better way to resolve binary path when `node_modules/` doesn't exist

Open
#1,170 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

The issue is similar to https://github.com/rescript-lang/rescript-vscode/issues/638.

Affected setup
  • Native Deno project, where packages are only installed into Deno's global cache and no node_modules/ compatibility directory is exposed.
  • Yarn-berry project in PnP mode (pnpm also supports this setup) where all dependencies are installed into Yarn's global cache as ZIP archives and they are resolved using a JS loader file at project root.
  • The user might want to use rescript/rewatch binary packaged by a downstream distribution (.e.g Nixpkgs)

Setting a custom value for settings.platformPath / settings.binaryPath is undesirable since the parent directory of the binary might not be obvious (in case 2 and 3 above).

Suggestion

We could have special logic to deal with Deno and PnP cases, and optionally search the user's PATH for the binary if they want to.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how settings.platformPath and settings.binaryPath currently resolve the rescript/rewatch binary, then compare that flow with the native Deno and Yarn PnP setups described here. Done means a decided resolution strategy for those cases, including optional PATH lookup, with behavior verified for the affected setups.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, nodejs
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.