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

Generate GenerateAutomaticInterfaceAttribute #47

Conversation

crwsolutions
Copy link
Contributor

Generate GenerateAutomaticInterfaceAttribute instead of asking that of the user.

See cookbook:
https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.cookbook.md#generated-class

If you're feeling adventurous, it is possible to remove the namespace from the generated attribute (so remove 'namespace AutomaticInterface'). That would give even more convenience. Given the name of the attribute I think there is very little change of type conflicts.

Copy link
Collaborator

@ChristianSauer ChristianSauer left a comment

Choose a reason for hiding this comment

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

Also please increment the major version - this is a breaking change

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@crwsolutions
Copy link
Contributor Author

Just to dust off this PR :): Hi, I've added a step in the README, to add the using statement. So if you are happy with it this can be merged now in my opinion. But it is also possible to remove the namespace for some extra convenience (would be mine preference). I would also like to highlight in that case, that the generated Attribute is internal. So the probability of conflicts is really about zero.

@ccHanibal
Copy link

Any chance that this gets merged and released in a foreseeable time frame @ChristianSauer? I would really like to start working on some new features (like custom interface name and get only properties in interfaces), but I consider this a prerequisite.

@ChristianSauer ChristianSauer merged commit 509ffda into codecentric:master Aug 4, 2024
3 checks passed
@ChristianSauer
Copy link
Collaborator

@ccHanibal @crwsolutions I've finally merged it. Sorry, where a shitty few months

@crwsolutions crwsolutions deleted the feature/generate-interface-attribute branch August 5, 2024 09:30
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.

3 participants