Repository navigation
Conversation
Let a workspace point at an rstack installation the node_modules walk-up cannot see, e.g. a monorepo that installs its tooling under infra/ while rstack.config.* sits at the root. One resource-scoped setting covers the fmt server and the lint and test stacks bridged through rstack.config.*; a path that does not resolve is reported as a setting error, not as a missing install. The root config's own `import 'rstack'` cannot see that installation either, so while the setting is set every spawned process that loads rstack.config.* preloads a small resolve hook (NODE_OPTIONS=--import) that resolves `rstack` and `rstack/*` from inside the configured package through Node's own resolver. Configs that need load-config's jiti fallback still require Node >= 24.15, where module.registerHooks covers require.resolve. Closes #103
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5f48da1f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Deliver the resolve hook as an explicit --import node arg, with the rstack package.json path in the hook URL's query, instead of NODE_OPTIONS plus an env var. The arg reaches exactly the spawned process and also fits Rstest's Run in Terminal command line, which previously ran without the hook.
The rstack package resolution now records whether the setting chose it and carries the parsed package.json, so the hook gate no longer re-reads the setting and no consumer reads the same package.json twice. Fold the hook helper into rstackPackage.ts, share one path-setting reader with rstack.nodeExecutable, and pass the not-installed hint from the rstack callers instead of special-casing the package name.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83c056e878
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Drop the abstractions the setting did not need: the source union, the carried package.json, the options object, the one-line setting reader module, the hint parameter and the split hook helper. Each stack now derives "chosen by the setting" from its own single read of it. Remove the unit test that only restated the hook URL composition.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5efbe9856
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lves A missing rstack.rstackCli.packagePath latched a crash under the bridge's config directory, and the successful resolution only retired the not-installed and mismatch latches, so Rstest stayed crashed after the path appeared (e.g. after an install) until a restart.
Summary
A monorepo can install
rstackin a subdirectory (e.g.infra/node_modules/rstack) whilerstack.config.*sits at the workspace root. Thenode_moduleswalk-up from the folder root never sees that installation, so fmt, bridged lint and bridged test all reported rstack as not installed.New resource-scoped setting
rstack.rstackCli.packagePath: an rstack package directory or itspackage.json, relative to the workspace folder (${workspaceFolder}supported). It sits in its own group because rstack-cli is one of the parallel tools, besiderstack.rslint.*andrstack.rstest.*.Why the hook. Resolving the package only fixes which
rs.jsthe editor starts. The root config's ownimport { define } from 'rstack'still resolves from the config file and fails the same way: in a terminal it only works through the package manager's.binshim. The hook (module.registerHooks) resolvesrstackandrstack/*as if from inside the configured package, through its ownexports. It does not reproduce shim behavior (NODE_PATH) or name files insiderstack, so it works the same for pnpm, npm and Yarnnode-moduleslayouts. It is appended to any existingNODE_OPTIONSand injected only while the setting is set.Known limit. A config that Node cannot load natively (non-erasable TS syntax such as
enum, or extensionless relative imports) falls back to load-config's jiti path, which usesrequire.resolve. Before Node 24.15,registerHooksdoes not seerequire.resolve, so on Node 22 such configs still fail. Configs written like the create-rstack templates load natively and work on every supported Node. The README states the limit.Measured on Node 22.23.3 / 24.22.0 / 26.11.1, with pnpm, npm and Yarn
node-moduleslayouts, andrs fmt/rs lint/rs testeach:Related Links
Closes #103
Checklist
NODE_OPTIONScomposition; new E2E launchrstack-cli-package-path(in thevscodeslice) runs fmt, lint and test against a fixture whose rstack lives only underinfra/, from a copy outside the repo so no walk-up can find one.