[API Compat] AttributeDifference is reported when same attribute appears multiple times with different ctor args #7585
Labels
area-Infrastructure-libraries
Area maintained by .NET libraries team: APICompat, AsmDiff, GenAPI, GenFacades, PkgProj, etc
help wanted
Take the following values:
Left:
Right:
We would get an error:
There should be no error here.
The problem seems to be as we group attributes by constructor documentation ID, and then when comparing the groups, we noticed the right group has 2 entries and the left 1, and thus it is marked as changed:
arcade/src/Microsoft.Cci.Extensions/Mappings/AttributesMapping.cs
Line 43 in 7f52af2
And we always use the first attribute on the group for the error string:
arcade/src/Microsoft.DotNet.ApiCompat/src/Rules/Compat/AttributeDifference.cs
Lines 144 to 145 in 7f52af2
cc: @ericstj @steveisok
The text was updated successfully, but these errors were encountered: