Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary suppressions #89186

Closed
wants to merge 1 commit into from
Closed

Conversation

mthalman
Copy link
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
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