-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ignore generic type parameter names when matching #40359
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
base: main
Are you sure you want to change the base?
Conversation
Generic type parameter names are not significant to compat. �Remove these from the matching key, but make the ParameterName rule compare them.
...Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeParameterName.cs
Show resolved
Hide resolved
src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs
Show resolved
Hide resolved
src/Compatibility/Microsoft.DotNet.ApiSymbolExtensions/SymbolExtensions.cs
Show resolved
Hide resolved
Looks to me like this might be hitting a real failure in source-build. My best guess is we mapped methods with different numbers of generic parameters - perhaps the name formatting isn't including the commas as expected? I'll add some tests to cover generic methods with different number of type parameters. |
Also introduce an exception instead of assert when members mapped with mismatched parameter counts.
Updating with where I am at in investigation --
So my change also ends up removing the |
Generic type parameter names are not significant to compat.
Remove these from the matching key, but make the
CannotChangeParameterName
rule compare them.