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): jsr support first pass #22382

Merged
merged 10 commits into from Feb 12, 2024
Merged

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Feb 11, 2024

This implementation heavily depends on there being a lockfile, meaning JSR specifiers will always diagnose as uncached unless it's there. In practice this affects cases where a deno.json isn't being used. Our NPM specifier support isn't subject to this.

The reason for this is that the version constraint solving code is currently buried in deno_graph and not usable from the LSP, so the only way to reuse that logic is the solved-version map in the lockfile's packages.specifiers.

@lucacasonato lucacasonato changed the title feat(lsp): jsp support first pass feat(lsp): jsr support first pass Feb 11, 2024
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 for a first pass.

cli/lsp/jsr_resolver.rs Outdated Show resolved Hide resolved
@nayeemrmn nayeemrmn merged commit 49d82e6 into denoland:main Feb 12, 2024
17 checks passed
@nayeemrmn nayeemrmn deleted the lsp-jsr-first-pass branch February 14, 2024 02:38
littledivy pushed a commit that referenced this pull request Feb 15, 2024
This implementation heavily depends on there being a lockfile, meaning
JSR specifiers will always diagnose as uncached unless it's there. In
practice this affects cases where a `deno.json` isn't being used. Our
NPM specifier support isn't subject to this.

The reason for this is that the version constraint solving code is
currently buried in `deno_graph` and not usable from the LSP, so the
only way to reuse that logic is the solved-version map in the lockfile's
`packages.specifiers`.
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.

None yet

2 participants