Skip to content

APICompat is showing noisy diffs where it shouldn't (regarding Parameter Modifiers) #2136

@ahsonkhan

Description

@ahsonkhan

These two netfx dlls are showing up in ApiCompat runs even when they are identical:

  • Microsoft.VisualC.STLCLR.dll
  • System.Printing.dll

The diffs themselves are all around ParameterModifiersCannotChange and seem non-actionable anyway:

netfx
Compat issues with assembly Microsoft.VisualC.STLCLR:
ParameterModifiersCannotChange : Custom modifiers on parameter '_Right' on method 'Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>..ctor(Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter '_Right' on method 'Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>.op_Assign(Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter '_Right' on method 'Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>.swap(Microsoft.VisualC.StlClr.GenericPair<TValue1, TValue2>)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter '_Where' on method 'Microsoft.VisualC.StlClr.IDeque<TValue>.erase(Microsoft.VisualC.StlClr.Generic.ContainerRandomAccessIterator<TValue>, 
...
Compat issues with assembly System.Printing:
ParameterModifiersCannotChange : Custom modifiers on parameter 'attribRef' on method 'System.Printing.IndexedProperties.PrintBooleanProperty.op_Implicit(System.Printing.IndexedProperties.PrintBooleanProperty)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter 'attribRef' on method 'System.Printing.IndexedProperties.PrintByteArrayProperty.op_Implicit(System.Printing.IndexedProperties.PrintByteArrayProperty)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter 'attribRef' on method 'System.Printing.IndexedProperties.PrintDateTimeProperty.op_Implicit(System.Printing.IndexedProperties.PrintDateTimeProperty)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
ParameterModifiersCannotChange : Custom modifiers on parameter 'attribRef' on method 'System.Printing.IndexedProperties.PrintDriverProperty.op_Implicit(System.Printing.IndexedProperties.PrintDriverProperty)' are 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the implementation but 'System.Runtime.CompilerServices.IsImplicitlyDereferenced' in the contract.
...
Total Issues: 151

Comparing all netfx refs corefx\bin\ref\netfx, net45+, ...

See: dotnet/corefx#35557

fc "..\master\bin\ref\netfx\Microsoft.VisualC.STLCLR.dll" "..\branch\bin\ref\netfx\Microsoft.VisualC.STLCLR.dll"
Comparing files ..\MASTER\BIN\REF\NETFX\Microsoft.VisualC.STLCLR.dll and ..\BRANCH\BIN\REF\NETFX\MICROSOFT.VISUALC.STLCLR.DLL
FC: no differences encountered

To reproduce:

  • Build corefx (all configuration, or netfx config)
  • Run APICompat on the bin\ref\netfx folder against itself.
    dotnet "Microsoft.DotNet.ApiCompat.dll" "bin\ref\netfx" -i "bin\ref\netfx"

cc @ericstj

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructure-librariesArea maintained by .NET libraries team: APICompat, AsmDiff, GenAPI, GenFacades, PkgProj, etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions