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

[Not Ready] [typespec-vscode] Show emitter internal msg in tspconfig #6197

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

mzhongl524
Copy link
Member

Fix:#5761

Mark emitter internal errors in diagnostics to the tspconfig.yaml file

@mzhongl524 mzhongl524 added the ide Issues for VS, VSCode, Monaco, etc. label Feb 28, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Feb 28, 2025
@azure-sdk
Copy link
Collaborator

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/compiler
Show changes

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

const sourceFile = await serverHost.compilerHost.readFile(configFilePath);
const emitterName = err.info.metadata.name;
const lineAndChar = sourceFile.getLineAndCharacterOfPosition(
sourceFile.text.indexOf(emitterName),
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use yaml to load the doc and get the pos? indexof may not return the right string if user has that text in other places

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.

3 participants