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

LSP does not resolve jsr: specifiers pointing to a single workspace JSR package to itself #22694

Closed
lucacasonato opened this issue Mar 4, 2024 · 1 comment · Fixed by #24121
Assignees
Labels
bug Something isn't working correctly lsp related to the language server

Comments

@lucacasonato
Copy link
Member

Version: Deno 1.41.1

// mod.ts
export function add(a: number, b: number): number {
  return a + b;
}
// deno.json
{
  "name": "@luca/add2",
  "version": "1.0.0",
  "exports": "./mod.ts",
  "imports": {
    "@luca/add2": "jsr:@luca/add2"
  }
}
// mod_test.ts
import { add } from "@luca/add2";
const x: number = add(1, 2); // 3

The CLI correctly resolves when you deno run mod_test.ts, but the LSP errors because @luca/add2 is not published to JSR.

@lucacasonato lucacasonato added bug Something isn't working correctly lsp related to the language server labels Mar 4, 2024
@dsherret dsherret added needs discussion this topic needs further discussion to determine what action to take and removed bug Something isn't working correctly labels Mar 4, 2024
@dsherret
Copy link
Member

dsherret commented Mar 4, 2024

See #22667 for discussion

Edit: going with bug after discussion with Luca

@dsherret dsherret added bug Something isn't working correctly and removed needs discussion this topic needs further discussion to determine what action to take labels Mar 4, 2024
@nayeemrmn nayeemrmn self-assigned this Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly lsp related to the language server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants