Skip to content

fix(catalog): resolve definition for unopened workspace files#97

Merged
9romise merged 2 commits intomainfrom
fix-definition
Apr 2, 2026
Merged

fix(catalog): resolve definition for unopened workspace files#97
9romise merged 2 commits intomainfrom
fix-definition

Conversation

@9romise
Copy link
Copy Markdown
Member

@9romise 9romise commented Apr 1, 2026

Fix go to definition silently failing for catalog dependencies when the workspace file was never opened in the editor.
Caused by #91

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 18fcc106-9ebb-4893-bad4-b29d6fbf9289

📥 Commits

Reviewing files that changed from the base of the PR and between 4b650f8 and 8a48c29.

📒 Files selected for processing (1)
  • packages/language-service/src/utils/document.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/language-service/src/utils/document.ts

📝 Walkthrough

Walkthrough

The PR changes workspace/document resolution to prefer the language server’s in-memory documents: createLanguageServerAdapter now accepts a LanguageServer and readFile checks server.documents before falling back to disk. The language-service gains a new utils/document.ts exporting getDocumentByUri and getResolvedDependencyAtOffset; callers in catalog, hover and version-completion were updated to import and use these helpers. The workspace wiring and adapter call sites were updated to pass the server, and the workspace package.json/pnpm catalog adds vscode-languageserver-textdocument.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the bug being fixed: 'go to definition' failing for catalog dependencies when workspace files were not opened, and references the causing issue #91.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-definition

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a187603-2917-4019-96b8-dd67761ba5c7

📥 Commits

Reviewing files that changed from the base of the PR and between 225bde7 and 4b650f8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • packages/language-server/src/workspace.ts
  • packages/language-service/package.json
  • packages/language-service/src/plugins/catalog.ts
  • packages/language-service/src/plugins/hover.ts
  • packages/language-service/src/plugins/version-completion.ts
  • packages/language-service/src/utils/document.ts
  • packages/language-service/src/utils/range.ts
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • packages/language-service/src/utils/range.ts

@9romise 9romise added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 88cc930 Apr 2, 2026
11 checks passed
@9romise 9romise deleted the fix-definition branch April 2, 2026 01:34
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