fix(vscode): resolve @rstest/core from the rstack package for bridged projects - #23
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A folder driven through rstack's Rstest config shim (
rstack.config.*with no nativerstest.config.*) resolved@rstest/coreby walkingnode_modulesup from the config directory. Under pnpm's isolated layout a project that depends onrstackalone has nonode_modules/@rstest/core— the core sits besiderstackin the virtual store — so every bridged project loggedCannot find "@rstest/core"and Rstest was unusable. Reproduced in a real VS Code againstpnpm add rstack@0.6.1with default pnpm settings.The lint stack already anchors its
@rslint/corewalk-up at the resolvedrstackdirectory (stacks/lint/resolution.ts); the test stack now does the same:resolveRstackShimreturns the resolvedrstackpackage directory, and the bridge threads it intoRstestApias the default@rstest/core/ CLI-bin resolution anchor (rstestResolutionDir). Native projects keep the cwd anchor byte-for-byte;rstack.rstest.rstestPackagePathstill overrides.createChildProcessthrowsReportedRstestResolutionError, which the project initializer no longer re-logs asFailed to initialize project config.--config.publicHoistPattern=@rslint/core/@rstest/coreflags insetupFixtures.mjsare 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'snode_modules; the lint bridge suite stages a project-visible@rslint/core(linked from the onerstackresolves) only for its native-ownership transition test..pnpm-shaped tree.Related Links
packages/vscode/AGENTS.md: the test ×rstack.config.*bridge gotcha now records that bridged projects resolve@rstest/corefrom the rstack package directory, mirroring lint.Checklist