Skip to content

Conversation

@DecSmith42
Copy link
Owner

Updated GenerateInterfaceMembersSourceGenerator to exclude attributes within the System.Runtime.CompilerServices namespace from method parameter processing. This prevents unintended inclusion and ensures the generated code focuses on user-defined attributes.

Updated `GenerateInterfaceMembersSourceGenerator` to exclude attributes within the `System.Runtime.CompilerServices` namespace from method parameter processing. This prevents unintended inclusion and ensures the generated code focuses on user-defined attributes.
Copilot AI review requested due to automatic review settings December 17, 2025 02:46
Copy link
Contributor

Copilot AI left a comment

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 updates the GenerateInterfaceMembersSourceGenerator to filter out compiler-generated attributes from the System.Runtime.CompilerServices namespace when processing method parameters. The goal is to prevent these internal attributes from appearing in generated interface member implementations, ensuring the generated code only includes user-defined attributes.

Key changes:

  • Modified attribute collection logic to exclude System.Runtime.CompilerServices attributes using a LINQ filter
  • Changed from simple GetAttributes() to a filtered query with Where clause and ToArray() materialization

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

@DecSmith42 DecSmith42 enabled auto-merge December 17, 2025 02:51
@DecSmith42 DecSmith42 merged commit 5bbb80d into main Dec 17, 2025
37 of 39 checks passed
@DecSmith42 DecSmith42 deleted the fix/generate-interface-memebers-attribute-filter branch December 17, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant