Skip to content

Conversation

@mzhongl524
Copy link
Member

Fix: #8539.

show NoTarget diagnostic message in vscode

@mzhongl524 mzhongl524 added the ide Issues for VS, VSCode, Monaco, etc. label Oct 17, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Oct 17, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 17, 2025

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@8757

commit: 0a54b94

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Show NoTarget diagnostic message in vscode

@azure-sdk
Copy link
Collaborator

azure-sdk commented Nov 3, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

let message = diagnostic.message;
if (root === undefined) {
let emitterName: string | undefined = undefined;
if (diagnostic.code === "import-not-found") {
Copy link
Contributor

Choose a reason for hiding this comment

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

this 'if' (import-not-found error) should include both tspconfig case and the ide settings case we want to have special handling. and the 'no associated location' should apply to all other cases as a fallback for other cases that no location found. Current code depending on emitterName makes the logic a little confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler ide Issues for VS, VSCode, Monaco, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ide] misconfigured emiter in vscode won't be reported in vscode and it will also block the linter rules to run silently

4 participants