Skip to content

fix(vscode): resolve @rstest/core from the rstack package for bridged projects - #23

Merged
fi3ework merged 1 commit into
mainfrom
fix/rstest-bridge-core-resolution
Aug 19, 2026
Merged

fix(vscode): resolve @rstest/core from the rstack package for bridged projects#23
fi3ework merged 1 commit into
mainfrom
fix/rstest-bridge-core-resolution

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Summary

A folder driven through rstack's Rstest config shim (rstack.config.* with no native rstest.config.*) resolved @rstest/core by walking node_modules up from the config directory. Under pnpm's isolated layout a project that depends on rstack alone has no node_modules/@rstest/core — the core sits beside rstack in the virtual store — so every bridged project logged Cannot find "@rstest/core" and Rstest was unusable. Reproduced in a real VS Code against pnpm add rstack@0.6.1 with default pnpm settings.

The lint stack already anchors its @rslint/core walk-up at the resolved rstack directory (stacks/lint/resolution.ts); the test stack now does the same:

  • resolveRstackShim returns the resolved rstack package directory, and the bridge threads it into RstestApi as the default @rstest/core / CLI-bin resolution anchor (rstestResolutionDir). Native projects keep the cwd anchor byte-for-byte; rstack.rstest.rstestPackagePath still overrides.
  • A missing core is reported once: createChildProcess throws ReportedRstestResolutionError, which the project initializer no longer re-logs as Failed to initialize project config.
  • E2E fixtures now install with pnpm's default isolated layout — the --config.publicHoistPattern=@rslint/core / @rstest/core flags in setupFixtures.mjs are removed. They hid this bug; and even without them the old walk-up escaped the fixture into this repo's own dev copy of @rstest/core, so the suite stayed green for the wrong reason. The rstest bridge suite now asserts the resolved core lives inside the fixture's node_modules; the lint bridge suite stages a project-visible @rslint/core (linked from the one rstack resolves) only for its native-ownership transition test.
  • Unit tests pin the anchor per project kind (native / bridged / configured) against a .pnpm-shaped tree.

Related Links

  • packages/vscode/AGENTS.md: the test × rstack.config.* bridge gotcha now records that bridged projects resolve @rstest/core from the rstack package directory, mirroring lint.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

… projects

A folder driven through rstack's Rstest config shim resolved `@rstest/core`
with a node_modules walk-up from the config directory. Under pnpm's isolated
layout a project that depends on `rstack` alone has no
`node_modules/@rstest/core` — the core sits beside `rstack` in the virtual
store — so every bridged project failed with "Cannot find @rstest/core" and
Rstest was unusable. The lint stack already anchors its core walk-up at the
resolved `rstack` directory; the test stack now does the same:

- `resolveRstackShim` returns the resolved `rstack` package directory and
  the bridge threads it into `RstestApi` as the default `@rstest/core` and
  CLI-bin resolution anchor. Native projects keep the cwd anchor and
  `rstack.rstest.rstestPackagePath` still overrides.
- A missing core is reported once: `createChildProcess` throws a marker
  error the project initializer no longer re-logs.
- E2E fixtures install with pnpm's default isolated layout — the
  `publicHoistPattern` flags for `@rslint/core` / `@rstest/core` are gone,
  since they hid this bug (and, without them, the walk-up used to escape the
  fixture into this repo's own dev copy). The rstest bridge suite now
  asserts the resolved core lives inside the fixture; the lint bridge suite
  stages a project-visible `@rslint/core` only for its native-ownership
  transition test.
- Unit tests pin the anchor per project kind (native / bridged / configured)
  against a `.pnpm`-shaped tree.
@fi3ework
fi3ework merged commit a42e222 into main Aug 19, 2026
3 checks passed
@fi3ework
fi3ework deleted the fix/rstest-bridge-core-resolution branch August 19, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant