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

Remove unused diagnostic methods #72445

Merged
merged 12 commits into from
Mar 8, 2024

Conversation

CyrusNajmabadi
Copy link
Member

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.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 7, 2024 22:20
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 7, 2024
@@ -197,169 +195,6 @@ private void OnCleared(object? sender, EventArgs e)
RaiseDiagnosticsCleared((IDiagnosticUpdateSource)sender!);
}

public ValueTask<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Copy link
Member Author

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(
Copy link
Member Author

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.

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge March 7, 2024 22:41
@CyrusNajmabadi CyrusNajmabadi merged commit c759290 into dotnet:main Mar 8, 2024
25 of 27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 8, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the removeDiagFunctionality branch March 8, 2024 01:24
@RikkiGibson RikkiGibson modified the milestones: Next, 17.10 P3 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants