Skip to content

Remove build-only diagnostics functionality no longer used in product#72941

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:simplifyDiagnostics
Apr 8, 2024
Merged

Remove build-only diagnostics functionality no longer used in product#72941
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:simplifyDiagnostics

Conversation

@CyrusNajmabadi
Copy link
Contributor

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 8, 2024 19:44
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 8, 2024
{
private readonly object _gate = new();
private readonly Dictionary<DocumentId, ImmutableArray<DiagnosticData>> _documentDiagnostics = [];
private readonly Dictionary<ProjectId, ImmutableArray<DiagnosticData>> _projectDiagnostics = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

data in this was never read in any product code. only in a single test. remove it, and updated codepaths affected by it.

}

public void AddBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableArray<DiagnosticData> diagnostics)
public void AddBuildOnlyDiagnostics(DocumentId documentId, ImmutableArray<DiagnosticData> diagnostics)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since nothing was reading the project side, we only need to call this for teh document side of things.

}

public void ClearBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId)
public void ClearBuildOnlyDiagnostics(Project project, DocumentId? documentId)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

passing in a project-id here meant 'clear out project diags, and all diags for any document in this project'. So, maintaining that logic here.

}
}

public ImmutableArray<DiagnosticData> GetBuildOnlyDiagnostics(ProjectId projectId)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

only called in a single test method, no other product code called this.

@CyrusNajmabadi CyrusNajmabadi requested a review from mavasani April 8, 2024 19:47
@CyrusNajmabadi
Copy link
Contributor Author

@ToddGrun @dibarbet ptal.

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 April 8, 2024 20:12
@CyrusNajmabadi CyrusNajmabadi merged commit 4218188 into dotnet:main Apr 8, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 8, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the simplifyDiagnostics branch April 8, 2024 22:12
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 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