Skip to content

Commit

Permalink
React to APICompat changes enabling reverse APICompat for facades (d…
Browse files Browse the repository at this point in the history
…otnet#37375)

* React to APICompat changes enabling reverse APICompat for facades

* Fix UAP and NETFX reverse APICompat issues

* Fix reverse APICompat baseline for allconfigurations build

* Manually update to latest APICompat

* Manually update to latest CoreCLR and fix issues

* Baseline System.Threading.Tasks

* Revert "Manually update to latest CoreCLR and fix issues"

This partially reverts commit ee80061.

I'm keeping the baseline changes which will be needed when we get a new update.

* Temporarily baseline DiagnosticCounter API gaps

This can be removed when get a new CoreCLR

That's currently blocked due to regressions in tests.
  • Loading branch information
ericstj authored May 8, 2019
1 parent 206c19b commit 0353437
Show file tree
Hide file tree
Showing 33 changed files with 290 additions and 16 deletions.
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<UseSharedCompilation>true</UseSharedCompilation>

<ToolSetCommonDirectory>$(MSBuildThisFileDirectory)artifacts\toolset\Common\</ToolSetCommonDirectory>
<IsSourceProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))">true</IsSourceProject>
<IsSourceProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))</IsSourceProject>
</PropertyGroup>

<!-- Define vNext UAP Moniker -->
Expand Down Expand Up @@ -167,7 +167,8 @@
<OutputType>Library</OutputType>
<!-- Default any assembly not specifying a key to use the Open Key -->
<StrongNameKeyId>Open</StrongNameKeyId>
<RunApiCompat>true</RunApiCompat>
<RunApiCompatForSrc>$(IsSourceProject)</RunApiCompatForSrc>
<RunMatchingRefApiCompat>$(IsSourceProject)</RunMatchingRefApiCompat>
<ApiCompatExcludeAttributeList>$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt</ApiCompatExcludeAttributeList>
<!-- Build as portable by default -->
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a7a250e9c13147134543c35fef2fb81f19592edf</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.19229.8">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.19256.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1b8589bbf53b9a5e819460798eff59830f39a3be</Sha>
<Sha>c31fac9f6899094226cb5cd77c85b8f60ecafa3d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19254.1">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19229.8</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19256.12</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetGenAPIPackageVersion>
<MicrosoftDotNetGenFacadesPackageVersion>1.0.0-beta.19254.1</MicrosoftDotNetGenFacadesPackageVersion>
Expand Down
6 changes: 3 additions & 3 deletions eng/references.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<ContractOutputPath>$(RefPath)</ContractOutputPath>
<FrameworkPathOverride>$(ContractOutputPath)</FrameworkPathOverride>
<AssemblySearchPaths>$(AssemblySearchPaths);$(ContractOutputPath);{RawFileName}</AssemblySearchPaths>
<ContractDependencyPaths>$(RefPath)</ContractDependencyPaths>
<FrameworkPathOverride>$(RefPath)</FrameworkPathOverride>
<AssemblySearchPaths>$(AssemblySearchPaths);$(RefPath);{RawFileName}</AssemblySearchPaths>
<!-- Disable RAR from transitively discovering dependencies for References -->
<_FindDependencies>false</_FindDependencies>
<!--
Expand Down
15 changes: 12 additions & 3 deletions eng/resolveContract.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
<ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject>
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
<ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(ContractOutputPath)/$(MSBuildProjectName).dll</ContractAssemblyPath>
<ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(RefPath)/$(MSBuildProjectName).dll</ContractAssemblyPath>

<!-- Disable API compat if the project doesn't have reference assembly -->
<RunApiCompat Condition="'$(HasMatchingContract)' != 'true'">false</RunApiCompat>
</PropertyGroup>

<ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
Expand All @@ -17,7 +20,13 @@
<!-- intentionally empty since we no longer need a target -->
<Target Name="ResolveMatchingContract" />

<Target Name="VerifyMatchingContract" AfterTargets="ResolveReferences">
<Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." />
<!-- Disable matching ref API compat for aot runtime refencing libs, these have a lot of public API
only by implementation and we don't intend to start new API development on AOT -->
<Target Name="DisableRunMatchingRefApiCompat"
BeforeTargets="CoreCompile"
Condition="'$(TargetsAot)' == 'true' AND '@(ReferenceFromRuntime)' != ''">
<PropertyGroup>
<RunMatchingRefApiCompat>False</RunMatchingRefApiCompat>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static void ThrowsAny<TFirstExceptionType, TSecondExceptionType>(System.A
public static void ThrowsAny<TFirstExceptionType, TSecondExceptionType, TThirdExceptionType>(System.Action action) where TFirstExceptionType : System.Exception where TSecondExceptionType : System.Exception where TThirdExceptionType : System.Exception { }
public static System.Threading.Tasks.Task<T> ThrowsAsync<T>(string paramName, System.Func<System.Threading.Tasks.Task> testCode) where T : System.ArgumentException { throw null; }
public static void ThrowsIf<T>(bool condition, System.Action action) where T : System.Exception { }
public static T Throws<T>(System.Action action) where T : System.Exception { throw null; }
public static void Throws<T>(System.Action action, string message) where T : System.Exception { }
public static T Throws<T>(string paramName, System.Action action) where T : System.ArgumentException { throw null; }
public static T Throws<T>(string paramName, System.Func<object> testCode) where T : System.ArgumentException { throw null; }
Expand All @@ -42,13 +43,13 @@ public static partial class PlatformDetection
public static bool ClientWebSocketPartialMessagesSupported { get { throw null; } }
public static bool HasWindowsShell { get { throw null; } }
public static System.Version ICUVersion { get { throw null; } }
public static bool Is32BitProcess { get { throw null; } }
public static bool IsAlpine { get { throw null; } }
public static bool IsArgIteratorNotSupported { get { throw null; } }
public static bool IsArgIteratorSupported { get { throw null; } }
public static bool IsArm64Process { get { throw null; } }
public static bool IsArmOrArm64Process { get { throw null; } }
public static bool IsArmProcess { get { throw null; } }
public static bool Is32BitProcess { get { throw null; } }
public static bool IsCentos6 { get { throw null; } }
public static bool IsDebian { get { throw null; } }
public static bool IsDebian8 { get { throw null; } }
Expand Down Expand Up @@ -156,6 +157,7 @@ namespace System.IO
public abstract partial class FileCleanupTestBase : System.IDisposable
{
protected FileCleanupTestBase() { }
protected static bool IsProcessElevated { get { throw null; } }
protected string TestDirectory { get { throw null; } }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<EnablePInvokeAnalyzer>false</EnablePInvokeAnalyzer>
<RunMatchingRefApiCompat>false</RunMatchingRefApiCompat>
<NoWarn Condition="'$(TargetGroup)' == 'netstandard'">$(NoWarn);CS3021</NoWarn>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">Test Utilities are not supported on this platform</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Unix-Debug;netcoreapp2.0-Unix-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
Expand Down
9 changes: 9 additions & 0 deletions src/System.AppContext/src/MatchingRefApiCompatBaseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Compat issues with assembly System.AppContext:
MembersMustExist : Member 'System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation.
Total Issues: 7
8 changes: 8 additions & 0 deletions src/System.Collections/src/MatchingRefApiCompatBaseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Compat issues with assembly System.Collections:
CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
TypesMustExist : Type 'System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyValuePairComparer' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.KeyList' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.SortedList<TKey, TValue>.ValueList' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Collections.Generic.TreeSet<T>' does not exist in the reference but it does exist in the implementation.
Total Issues: 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Compat issues with assembly System.Diagnostics.Debug:
MembersMustExist : Member 'System.Diagnostics.Debug.SetProvider(System.Diagnostics.DebugProvider)' does not exist in the reference but it does exist in the implementation.
Total Issues: 1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Compat issues with assembly System.Diagnostics.Tracing:
CannotSealType : Type 'System.Diagnostics.Tracing.DiagnosticCounter' is effectively (has a private constructor) sealed in the reference but not sealed in the implementation.
MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter..ctor(System.String, System.Diagnostics.Tracing.EventSource)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter.WritePayload(System.Single, System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'Family' in the reference but 'Public' in the implementation.
CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'Family' in the reference but 'Public' in the implementation.
Total Issues: 7
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Compat issues with assembly System.Diagnostics.Tracing:
CannotRemoveBaseTypeOrInterface : Type 'System.Diagnostics.Tracing.EventCounter' does not inherit from base type 'System.Diagnostics.Tracing.DiagnosticCounter' in the reference but it does in the implementation.
MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Double)' does not exist in the reference but it does exist in the implementation.
CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'Family' in the reference but 'Public' in the implementation.
CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'Family' in the reference but 'Public' in the implementation.
Total Issues: 6
18 changes: 18 additions & 0 deletions src/System.Linq.Expressions/src/MatchingRefApiCompatBaseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Compat issues with assembly System.Linq.Expressions:
CannotMakeTypeAbstract : Type 'System.Linq.Expressions.DynamicExpressionVisitor' is abstract in the reference but is not abstract in the implementation.
CannotMakeMoreVisible : Visibility of member 'System.Linq.Expressions.DynamicExpressionVisitor..ctor()' is 'Family' in the reference but 'Public' in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.ElementInit.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.ElementInit.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.IndexExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.IndexExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.InvocationExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.InvocationExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.MethodCallExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.MethodCallExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.NewExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Linq.Expressions.NewExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Linq.Expressions.Interpreter.LightLambda' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.CallSiteOps' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.Closure' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'System.Runtime.CompilerServices.RuntimeOps' does not exist in the reference but it does exist in the implementation.
Total Issues: 16
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Compat issues with assembly System.Numerics.Vectors:
MembersMustExist : Member 'System.Numerics.Vector<T>..ctor(System.ReadOnlySpan<System.Byte>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Numerics.Vector<T>..ctor(System.ReadOnlySpan<T>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Numerics.Vector<T>.CopyTo(System.Span<System.Byte>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Numerics.Vector<T>.CopyTo(System.Span<T>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Numerics.Vector<T>.TryCopyTo(System.Span<System.Byte>)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Numerics.Vector<T>.TryCopyTo(System.Span<T>)' does not exist in the reference but it does exist in the implementation.
Total Issues: 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Compat issues with assembly System.Reflection.Emit.ILGeneration:
MembersMustExist : Member 'System.Reflection.Emit.ILGenerator.MarkSequencePoint(System.Diagnostics.SymbolStore.ISymbolDocumentWriter, System.Int32, System.Int32, System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Reflection.Emit.LocalBuilder.SetLocalSymInfo(System.String)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Reflection.Emit.LocalBuilder.SetLocalSymInfo(System.String, System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Reflection.Emit.ParameterBuilder.GetToken()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Reflection.Module, System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the reference but it does exist in the implementation.
Total Issues: 6
Loading

0 comments on commit 0353437

Please sign in to comment.