Skip to content

fix(vscode): treat any unresolved bare config import as not installed - #57

Merged
fi3ework merged 1 commit into
mainfrom
fix-config-import-not-installed
Sep 14, 2026
Merged

fix(vscode): treat any unresolved bare config import as not installed#57
fi3ework merged 1 commit into
mainfrom
fix-config-import-not-installed

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Summary

The not-installed classifier (shared/missingDependency.ts) decided whether pkg/subpath meant "package not installed" or "installed package, wrong subpath" by walking up the physical node_modules from 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 went disabled and 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 disabled not-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 covers disabled states. Relative, absolute and file: specifiers stay real errors.

  • classifyMissingDependencyMessage(message) loses resolveFrom; missingDependencyCause(code, message) is the code-gated entry point and missingDependencyCauseOf(error) its Error wrapper.
  • Rslint's ConfigDependencyObserver no longer needs resolveFrom.
  • Status wording becomes "<config> has an import Node cannot resolve — install the project dependencies, …"; the Output line is unchanged.
  • packages/vscode/AGENTS.md not-installed bullet updated to the new rule.

Related Links

Closes #52

Checklist

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

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".
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T09:37:07.338117Z cb2ef4f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fi3ework
fi3ework merged commit 42e6cfa into main Sep 14, 2026
3 checks passed
@fi3ework
fi3ework deleted the fix-config-import-not-installed branch September 14, 2026 10:37
@fi3ework fi3ework mentioned this pull request Sep 14, 2026
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.

Classify missing subpaths from the importer, not the workspace root

1 participant