Skip to content

Fix diagnostic serialization crash #47604

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

Merged
merged 2 commits into from
Jan 26, 2022
Merged

Conversation

andrewbranch
Copy link
Member

Fixes #46277

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 25, 2022
@andrewbranch andrewbranch requested a review from sandersn January 25, 2022 22:38
@andrewbranch andrewbranch changed the title Bug/46277 Fix diagnostic serialization crash Jan 25, 2022
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Seems OK although I'd like to know the precise culprit.

@@ -1071,6 +1071,15 @@ namespace ts {
};
}

export function createDiagnosticMessageChainFromDiagnostic(diagnostic: DiagnosticRelatedInformation): DiagnosticMessageChain {
return typeof diagnostic.messageText === "string" ? {
Copy link
Member

Choose a reason for hiding this comment

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

I assume the true branch excludes some property of DiagnosticRelatedInformation that caused the circularity? Was it file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange output from tsc noEmit - unclear where error stems from within app,
3 participants