Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lsp): workspace jsr resolution #24121

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

nayeemrmn
Copy link
Collaborator

Fixes #22694.

If you import a jsr package in the same workspace, the local one will be used. If the version doesn't match the specified req then resolution will fail.

We are still constrained to one deno.json / resolver scope i.e. the workspace root deno.json must be at the project root, and only the import map etc. from there will be respected. However for the purpose of JSR resolution, the referenced member deno.jsons will be read for package metadata and they can import each other and themselves with jsr: specifiers.

This works for deno_std.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM. In the future we'll need to get this working for even when someone opens only a specific package in a workspace instead of the whole workspace.

@nayeemrmn nayeemrmn merged commit 7c5dbd5 into denoland:main Jun 10, 2024
17 checks passed
@nayeemrmn nayeemrmn deleted the lsp-jsr-workspace-resolution branch June 10, 2024 16:03
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.

LSP does not resolve jsr: specifiers pointing to a single workspace JSR package to itself
2 participants