Skip to content

Remove unnecessary suppressions#89186

Closed
mthalman wants to merge 1 commit into
dotnet:mainfrom
mthalman:suppressions
Closed

Remove unnecessary suppressions#89186
mthalman wants to merge 1 commit into
dotnet:mainfrom
mthalman:suppressions

Conversation

@mthalman

Copy link
Copy Markdown
Member

When attempting to build the runtime repo with the latest build of .NET 8 Preview 7 SDK, it produces the following errors:

/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : Unnecessary suppressions found. The APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true' [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0001 (Target: 'T:System.Diagnostics.DebuggerGuidedStepThroughAttribute') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0001 (Target: 'T:System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0016 (Target: 'M:System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant``1(System.IntPtr)->T?:[T:System.Diagnostics.CodeAnalysis.MaybeNullAttribute]') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]

This is fixed by removing the unnecessary suppressions from System.Private.CoreLib's CompatibilitySuppressions.xml file.

@mthalman

Copy link
Copy Markdown
Member Author

Interesting. These seem to be needed for Windows builds but not Linux. This was originally caught from the VMR source-build, which is Linux only. I'll log this as an issue instead since this isn't as straightforward as I thought.

I've logged #89206 instead.

@mthalman mthalman closed this Jul 19, 2023
@mthalman mthalman deleted the suppressions branch July 19, 2023 19:14
@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant