-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Remove unused diagnostic methods #72445
Remove unused diagnostic methods #72445
Conversation
@@ -197,169 +195,6 @@ private void OnCleared(object? sender, EventArgs e) | |||
RaiseDiagnosticsCleared((IDiagnosticUpdateSource)sender!); | |||
} | |||
|
|||
public ValueTask<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync( |
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.
no actual product code called the two public methods below. removed them and all tehir supporting helpers.
Await waiter.ExpeditedWaitAsync() | ||
|
||
Dim diagnosticService = environment.ExportProvider.GetExportedValue(Of IDiagnosticService) | ||
Dim diagnostics = Await diagnosticService.GetDiagnosticsAsync( |
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.
this test called through the service to then do work that it validated. so the service existed just to make this code pass. it was otherwise not observable. Removed entirely.
src/Features/LanguageServer/Protocol/Features/Diagnostics/DiagnosticService.cs
Show resolved
Hide resolved
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.
These methods had no callers except for in tests. Removed them, and the complexity around them.
Note: IDiagnosticService is ancient. For getting diagnostics it was superseded by several other better services. It exists now only as an eventing source to know when diagnostics change.