-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Do not report unchanged files in workspace-pull diagnostics #72529
Conversation
// | ||
// Note: if this is a workspace request, we can do nothing, as that will be interpreted by the | ||
// client as nothing having been changed for that document. | ||
if (!this.IsWorkspacePullDiagnosticsHandler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternative approach - allow CreateUnchangedReport to return a nullable value, and in workspace diagnostics return a null value always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair. it seemed about the same... i'll noodle on it.
I think some tests will need updating as well, e.g. TestWorkspaceDiagnosticsWithChangeInNotReferencedProject |
14bb65f
to
ac8e437
Compare
Will set to merge once we confirm that VSCode is ok. |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
if (!this.IsWorkspacePullDiagnosticsHandler) | ||
{ | ||
var previousParams = documentToPreviousDiagnosticParams[diagnosticSource.GetId()]; | ||
progress.Report(CreateUnchangedReport(previousParams.TextDocument, previousParams.PreviousResultId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have the before/after previousParams.TextDocument int versions to compare too? If the version is different, we need to be careful about skipping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not.
Small tweak that should ideally save a lot of unnecessary reports being created on the roslyn side and then parsed on the client side.