Write-Warning instead of returning artificial DiagnosticRecord when type parsing errors occurs since those DiagnosticRecords cannot be suppressed.#1126
Closed
bergmeister wants to merge 4 commits intoPowerShell:developmentfrom
Conversation
…ype parsing errors occurs since those DiagnosticRecords cannot be suppressed.
…nalyzer into TypeNotFound_UseWarningInsteadOfReturningDiagnosticRecords
JamesWTruher
suggested changes
Jan 16, 2019
Contributor
JamesWTruher
left a comment
There was a problem hiding this comment.
I'm pretty sure this isn't the right approach here. We could create different types of diagnostic records, or create some way to suppress these, but these shouldn't be taking these out of the result stream. They're important, and by putting them in the warning stream, they're completely lost.
Collaborator
Author
|
@JamesWTruher I tried looking into a way of suppressing them at first but struggled to do so due to the suppression logic being so complex, maybe you can give it a try please? |
Collaborator
Author
|
Will close this in favour of #1130 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Fixes #1041 as per title and enhances message.
I tried looking into being able to support suppressions for a
DiagnosticRecordbut this did not seem to be possible or very complicated. SinceTypeNotFoundis not a rule, I think it was confusing anyway to return an object. Consumers like PowerShellEditorServices should check their warning streams to propagate the information to their users. cc @TylerLeonhardt @rjmholtThe failing tests on Ubuntu happen on
developmentas well and seem to be due to an image update (again)PR Checklist
.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.