Skip to content

Revert "[Analyzer] Add analyzer for conflicting [ID] attribute usage#9841

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/undo-id-analyzer
Jun 4, 2026
Merged

Revert "[Analyzer] Add analyzer for conflicting [ID] attribute usage#9841
tobias-tengler merged 1 commit into
mainfrom
tte/undo-id-analyzer

Conversation

@tobias-tengler

@tobias-tengler tobias-tengler commented Jun 4, 2026

Copy link
Copy Markdown
Member

I didn't account for input object types when building the analyzer. Since there's no reliable way to tell if something will become an input or not, I'll revert the analyzer for now.

This reverts commit f9e257a.

@tobias-tengler tobias-tengler marked this pull request as ready for review June 4, 2026 06:39
Copilot AI review requested due to automatic review settings June 4, 2026 06:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reverts the recently added Roslyn analyzer that detected conflicting [ID] attribute usages, because the analyzer did not correctly account for input object types and there isn’t a reliable way to determine input vs output at analysis time.

Changes:

  • Removes ConflictingIdAttributeAnalyzer from the analyzer set executed in the analyzer test harness.
  • Deletes the ConflictingIdAttributeAnalyzer implementation and its associated HC0115 diagnostic/resource entries.
  • Removes the analyzer’s unit tests and all related snapshot files.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/HotChocolate/Core/test/Types.Analyzers.Tests/TestHelper.cs Stops executing the reverted analyzer in analyzer-enabled test runs.
src/HotChocolate/Core/test/Types.Analyzers.Tests/ConflictingIdAttributeAnalyzerTests.cs Removes tests that were specific to the reverted analyzer.
src/HotChocolate/Core/test/Types.Analyzers.Tests/snapshots/ConflictingIdAttributeAnalyzerTests.*.md Removes snapshot baselines generated for the reverted analyzer diagnostics.
src/HotChocolate/Core/src/Types.Analyzers/WellKnownAttributes.cs Removes IDAttribute well-known attribute constants that were only needed by the reverted analyzer.
src/HotChocolate/Core/src/Types.Analyzers/Properties/SourceGenResources.resx Removes the ConflictingIdAttribute resource string used by HC0115.
src/HotChocolate/Core/src/Types.Analyzers/Properties/SourceGenResources.Designer.cs Removes the generated strongly-typed accessor for the deleted resource.
src/HotChocolate/Core/src/Types.Analyzers/Errors.cs Removes the HC0115 diagnostic descriptor definition.
src/HotChocolate/Core/src/Types.Analyzers/ConflictingIdAttributeAnalyzer.cs Deletes the analyzer implementation being reverted.
Files not reviewed (1)
  • src/HotChocolate/Core/src/Types.Analyzers/Properties/SourceGenResources.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobias-tengler tobias-tengler merged commit 431455e into main Jun 4, 2026
146 checks passed
@tobias-tengler tobias-tengler deleted the tte/undo-id-analyzer branch June 4, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants