fix(vscode): treat any unresolved bare config import as not installed - #57
Merged
Conversation
The not-installed classifier proved a bare specifier's package was absent by walking up the physical node_modules from a fixed root (project root, config directory or workspace root). Under pnpm's isolated layout that walk cannot see a plugin's private dependency, so a real missing-subpath error (`dep/missing` where `dep` lives only under the plugin) was reported as "not installed" and the stack went disabled instead of surfacing it. Drop the filesystem lookup. Every Node module-not-found on a bare specifier, subpath included, is now the same disabled state, and the loader's own first line (which names the specifier and the importer) is the one warn line. Recovery is unchanged: the shell's poll already covers disabled states. Relative, absolute and file: specifiers stay real errors. - `classifyMissingDependencyMessage` loses its `resolveFrom` parameter; `missingDependencyCause(code, message)` is the code-gated entry point and `missingDependencyCauseOf(error)` its Error wrapper. - Rslint's config-dependency observer no longer needs `resolveFrom`. - Status wording: "<config> has an import Node cannot resolve".
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. |
Merged
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
The not-installed classifier (
shared/missingDependency.ts) decided whetherpkg/subpathmeant "package not installed" or "installed package, wrong subpath" by walking up the physicalnode_modulesfrom a fixed root. Under pnpm's isolated layout that walk cannot see a plugin's private dependency, so a real missing-subpath error was reported as "not installed": the stack wentdisabledand polled instead of surfacing the error.This PR drops the filesystem lookup instead of resolving from the importer. Every Node module-not-found on a bare specifier, subpath included, is now the same
disablednot-installed state; the loader's own first line, which names the specifier and the importer, is the one warn line. Recovery is unchanged because the shell's poll (ADR 0005) already coversdisabledstates. Relative, absolute andfile:specifiers stay real errors.classifyMissingDependencyMessage(message)losesresolveFrom;missingDependencyCause(code, message)is the code-gated entry point andmissingDependencyCauseOf(error)its Error wrapper.ConfigDependencyObserverno longer needsresolveFrom.<config>has an import Node cannot resolve — install the project dependencies, …"; the Output line is unchanged.packages/vscode/AGENTS.mdnot-installed bullet updated to the new rule.Related Links
Closes #52
Checklist