codecentric / net_automatic_interface

.Net Source Generator for Automatic Interfaces
MIT License
62 stars 14 forks source link

Interfaces generated for classes with `override` or `new` events contain duplicates #53

Closed FinnAngelo closed 3 months ago

FinnAngelo commented 3 months ago

Currently the code generates a duplicate event for events that have overrides or new

Issue #50 fixed this problem for methods, so we can use the same approach Check the fix used in PR #33, particularly the feat: dedupe property names by name, add tests commit

Note: This was found with the following test code using the 2.5.0 nuget package:

file class GenerateAutomaticInterface : Attribute;

[GenerateAutomaticInterface]
file class MyButton : System.Windows.Forms.Button;
FinnAngelo commented 3 months ago

Hi @ChristianSauer I've made the changes on a fork with a PR at https://github.com/FinnAngelo/net_automatic_interface/pull/1 What are the protocols/processes to get it to merge into the codecentric repo?

FinnAngelo commented 3 months ago

FYI, in my code I renamed one of the tests because it had a duplicate name that prevented it building - it will be obvious in the PR which one... What do you want done there?

ChristianSauer commented 3 months ago

Hi FinnAngelo, your PR looks good to me. I noticed some errors in the code itself and then tightened the checks for the test code. Well finally I produced a breaking change in 4.00, which also contains your fixes for events. Thanks a lot and hope you don't mind that I took over, sorry ;)

ChristianSauer commented 3 months ago

Closing for now