Skip to content

Commit

Permalink
Update APICompat to be able to pass in multiple suppression files (do…
Browse files Browse the repository at this point in the history
…tnet#78610)

* Update APICompat to be able to pass in multiple suppression files
  • Loading branch information
ViktorHofer authored Nov 21, 2022
1 parent 1ab2c4a commit d5d9954
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
4 changes: 0 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80b6be47e1425ea90c5febffac119250043a0c92</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="8.0.0-beta.22554.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80b6be47e1425ea90c5febffac119250043a0c92</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="8.0.0-beta.22554.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80b6be47e1425ea90c5febffac119250043a0c92</Sha>
Expand Down
3 changes: 1 addition & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@
<PropertyGroup>
<StaticCsVersion>0.2.0</StaticCsVersion>
<!-- SDK dependencies -->
<MicrosoftDotNetApiCompatTaskVersion>8.0.100-alpha.1.22511.23</MicrosoftDotNetApiCompatTaskVersion>
<MicrosoftDotNetApiCompatTaskVersion>8.0.100-alpha.1.22571.3</MicrosoftDotNetApiCompatTaskVersion>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>8.0.0-beta.22554.2</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.22554.2</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>8.0.0-beta.22554.2</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>8.0.0-beta.22554.2</MicrosoftDotNetGenAPIVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<FeatureWasmThreads>false</FeatureWasmThreads>
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="System.Threading.Thread.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Threading\ref\System.Threading.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<FeatureWasmThreads>false</FeatureWasmThreads>
</PropertyGroup>

<PropertyGroup Condition="'$(WasmEnableThreads)' == 'true' or
'$(MonoWasmBuildVariant)' == 'multithread'">
<ItemGroup Condition="'$(WasmEnableThreads)' == 'true' or
'$(MonoWasmBuildVariant)' == 'multithread'">
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
but this contract still does since we only expose the wasm threading through System.Diagnostics.Threading.Thread.WebAssembly.Threading
so we need to baseline the ApiCompat errors related to that -->
<CompatibilitySuppressionFilePath>$(MSBuildThisFileDirectory)CompatibilitySuppressions.Threading.xml</CompatibilitySuppressionFilePath>
</PropertyGroup>
so we need to baseline the ApiCompat errors related to that. -->
<ApiCompatSuppressionFile Include="$(MSBuildThisFileDirectory)CompatibilitySuppressions.Threading.xml" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(CoreLibProject)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<FeatureWasmThreads>false</FeatureWasmThreads>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="System.Threading.ThreadPool.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Threading.Overlapped\ref\System.Threading.Overlapped.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>

<ItemGroup Condition="'$(WasmEnableThreads)' == 'true' or
'$(MonoWasmBuildVariant)' == 'multithread'">
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
but this contract still does since we only expose the wasm threading through System.Diagnostics.Threading.ThreadPool.WebAssembly.Threading
so we need to baseline the ApiCompat errors related to that. -->
<ApiCompatSuppressionFile Include="$(MSBuildThisFileDirectory)CompatibilitySuppressions.Threading.xml" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(CoreLibProject)" />
</ItemGroup>
<PropertyGroup Condition="'$(WasmEnableThreads)' == 'true' or '$(MonoWasmBuildVariant)' == 'multithread'">
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
but this contract still does since we only expose the wasm threading through System.Diagnostics.Threading.ThreadPool.WebAssembly.Threading
so we need to baseline the ApiCompat errors related to that -->
<CompatibilitySuppressionFilePath>$(MSBuildThisFileDirectory)CompatibilitySuppressions.Threading.xml</CompatibilitySuppressionFilePath>
</PropertyGroup>

</Project>
12 changes: 6 additions & 6 deletions src/libraries/apicompat/ApiCompat.proj
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
LeftAssemblies="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netcore.app.ref', '$(NetCoreAppLatestStablePackageBaselineVersion)', 'ref', '$(NetCoreAppLatestStable)'))"
RightAssemblies="@(ReferencePathWithRefAssemblies)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
GenerateCompatibilitySuppressionFile="$(GenerateCompatibilitySuppressionFile)"
CompatibilitySuppressionFilePath="$(ApiCompatNetCoreAppLatestStableBaselineFile)"
GenerateSuppressionFile="$(ApiCompatGenerateSuppressionFile)"
SuppressionFiles="$(ApiCompatNetCoreAppLatestStableBaselineFile)"
EnableRuleAttributesMustMatch="$(ApiCompatEnableRuleAttributesMustMatch)"
ExcludeAttributesFiles="@(ApiCompatExcludeAttributesFile)"
LeftAssembliesTransformationPattern="@(ApiCompatNetCoreAppLatestStableLeftAssembliesTransformationPattern)"
Expand All @@ -63,8 +63,8 @@
LeftAssemblies="$(NETStandard21RefPath)netstandard.dll"
RightAssemblies="@(ReferencePathWithRefAssemblies)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
GenerateCompatibilitySuppressionFile="$(GenerateCompatibilitySuppressionFile)"
CompatibilitySuppressionFilePath="$(ApiCompatNetStandard21BaselineFile)"
GenerateSuppressionFile="$(ApiCompatGenerateSuppressionFile)"
SuppressionFiles="$(ApiCompatNetStandard21BaselineFile)"
EnableRuleAttributesMustMatch="$(ApiCompatEnableRuleAttributesMustMatch)"
ExcludeAttributesFiles="@(ApiCompatExcludeAttributesFile)"
LeftAssembliesTransformationPattern="@(ApiCompatNetStandard21LeftAssembliesTransformationPattern)"
Expand All @@ -75,8 +75,8 @@
LeftAssemblies="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'netstandard.library', '$(NetStandardLibraryVersion)', 'build', 'netstandard2.0', 'ref'))"
RightAssemblies="@(ReferencePathWithRefAssemblies)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
GenerateCompatibilitySuppressionFile="$(GenerateCompatibilitySuppressionFile)"
CompatibilitySuppressionFilePath="$(ApiCompatNetStandard20BaselineFile)"
GenerateSuppressionFile="$(ApiCompatGenerateSuppressionFile)"
SuppressionFiles="$(ApiCompatNetStandard20BaselineFile)"
EnableRuleAttributesMustMatch="$(ApiCompatEnableRuleAttributesMustMatch)"
ExcludeAttributesFiles="@(ApiCompatExcludeAttributesFile)"
LeftAssembliesTransformationPattern="@(ApiCompatNetStandard20LeftAssembliesTransformationPattern)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<WasmBuildNative>true</WasmBuildNative>
<FeatureWasmPerfTracing>true</FeatureWasmPerfTracing>
<WasmEnablePerfTracing>true</WasmEnablePerfTracing>
<FeatureWasmThreads Condition="false">true</FeatureWasmThreads>
<!-- <FeatureWasmThreads>true</FeatureWasmThreads> -->
<NoWarn>$(NoWarn);CA2007</NoWarn> <!-- consider ConfigureAwait() -->
</PropertyGroup>

Expand Down

0 comments on commit d5d9954

Please sign in to comment.