From a675e1c2c4f46b98ecac1253223649d8f36d5da7 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 12 Mar 2020 07:47:09 -0700 Subject: [PATCH] Run APICompat against the previous release of NETCoreApp (#33300) * Run APICompat against the previous release of NETCoreApp * Remove redundant source build condition * Add APICompat specific attribute exclusion list. * Update to latest ApiCompat --- eng/ApiCompatExcludeAttributes.txt | 1 + eng/DefaultGenApiDocIds.txt | 1 + eng/Versions.props | 2 +- src/libraries/Directory.Build.props | 2 +- src/libraries/restore/dirs.proj | 3 +-- .../restore/netcoreapp/netcoreapp.depproj | 2 +- src/libraries/shims/ApiCompat.proj | 19 +++++++++++++++ .../ApiCompatBaseline.PreviousNetCoreApp.txt | 23 +++++++++++++++++++ 8 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 eng/ApiCompatExcludeAttributes.txt create mode 100644 src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt diff --git a/eng/ApiCompatExcludeAttributes.txt b/eng/ApiCompatExcludeAttributes.txt new file mode 100644 index 0000000000000..27c8942c9f39c --- /dev/null +++ b/eng/ApiCompatExcludeAttributes.txt @@ -0,0 +1 @@ +T:System.CLSCompliantAttribute diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index b1191db3770f2..d42e3fe429762 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -27,6 +27,7 @@ T:System.Runtime.CompilerServices.NullableAttribute T:System.Runtime.CompilerServices.NullableContextAttribute T:System.Runtime.CompilerServices.PreserveDependencyAttribute T:System.Runtime.CompilerServices.TypeForwardedFromAttribute +T:System.Runtime.ConstrainedExecution.PrePrepareMethodAttribute T:System.Runtime.ConstrainedExecution.ReliabilityContractAttribute T:System.Runtime.InteropServices.ClassInterfaceAttribute T:System.Runtime.InteropServices.ComDefaultInterfaceAttribute diff --git a/eng/Versions.props b/eng/Versions.props index 1d2e6ca842b4b..1da37c2dbf5fd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -60,7 +60,7 @@ - 5.0.0-beta.20160.4 + 5.0.0-beta.20161.5 5.0.0-beta.20160.4 5.0.0-beta.20160.4 5.0.0-beta.20160.4 diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 6a6d75ca80823..a5b0b26a8d668 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -154,7 +154,7 @@ $(IsSourceProject) $(IsSourceProject) - $(RepositoryEngineeringDir)DefaultGenApiDocIds.txt + $(RepositoryEngineeringDir)DefaultGenApiDocIds.txt,$(RepositoryEngineeringDir)ApiCompatExcludeAttributes.txt diff --git a/src/libraries/restore/dirs.proj b/src/libraries/restore/dirs.proj index d54794d38db3e..d006b65c8ff7e 100644 --- a/src/libraries/restore/dirs.proj +++ b/src/libraries/restore/dirs.proj @@ -4,8 +4,7 @@ - - + diff --git a/src/libraries/restore/netcoreapp/netcoreapp.depproj b/src/libraries/restore/netcoreapp/netcoreapp.depproj index 26965e38eab71..72e15fde6cdf6 100644 --- a/src/libraries/restore/netcoreapp/netcoreapp.depproj +++ b/src/libraries/restore/netcoreapp/netcoreapp.depproj @@ -5,7 +5,7 @@ Reference false true - netcoreapp2.0;netcoreapp2.1;netcoreapp3.0 + netcoreapp2.0;netcoreapp2.1;netcoreapp3.0;netcoreapp3.1 diff --git a/src/libraries/shims/ApiCompat.proj b/src/libraries/shims/ApiCompat.proj index a340a3d1a5aec..a261947c3bcd2 100644 --- a/src/libraries/shims/ApiCompat.proj +++ b/src/libraries/shims/ApiCompat.proj @@ -95,7 +95,26 @@ + + + netcoreapp3.1 + $([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(PreviousNetCoreApp)')) + <_previousNetCoreAppBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.PreviousNetCoreApp.txt + <_previousNetCoreAppBaselineParam>--baseline "$(_previousNetCoreAppBaselineFile)" + <_previousNetCoreAppBaselineParam Condition="'$(UpdatePreviousNetCoreAppBaseline)' == 'true'">> "$(_previousNetCoreAppBaselineFile)" + + + + + + + + diff --git a/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt b/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt new file mode 100644 index 0000000000000..5845d0932009c --- /dev/null +++ b/src/libraries/shims/ApiCompatBaseline.PreviousNetCoreApp.txt @@ -0,0 +1,23 @@ +Compat issues with assembly netstandard: +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerReportsProgress' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.Process.EnableRaisingEvents' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.Environment' in the contract but not the implementation. +CannotChangeAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' on 'System.Diagnostics.ProcessStartInfo.Verb' changed from '[DefaultValueAttribute(null)]' in the contract to '[DefaultValueAttribute("")]' in the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.WindowStyle' in the contract but not the implementation. +Compat issues with assembly System: +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerReportsProgress' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.Process.EnableRaisingEvents' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.Environment' in the contract but not the implementation. +CannotChangeAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' on 'System.Diagnostics.ProcessStartInfo.Verb' changed from '[DefaultValueAttribute(null)]' in the contract to '[DefaultValueAttribute("")]' in the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.WindowStyle' in the contract but not the implementation. +Compat issues with assembly System.ComponentModel.EventBasedAsync: +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerReportsProgress' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation' in the contract but not the implementation. +Compat issues with assembly System.Diagnostics.Process: +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.Process.EnableRaisingEvents' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.Environment' in the contract but not the implementation. +CannotChangeAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' on 'System.Diagnostics.ProcessStartInfo.Verb' changed from '[DefaultValueAttribute(null)]' in the contract to '[DefaultValueAttribute("")]' in the implementation. +CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultValueAttribute' exists on 'System.Diagnostics.ProcessStartInfo.WindowStyle' in the contract but not the implementation. +Total Issues: 18