dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
259 stars 126 forks source link

Stage 2 Builds failing during runtime build #4355

Closed Winniexu01 closed 1 month ago

Winniexu01 commented 1 month ago

Build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2437450&view=logs&j=3121c41d-6088-53a5-4ef6-9a86f3460fe9&t=334539f4-dcef-5cad-a240-02997b3146e7

Error:

/vmr/src/runtime/artifacts/sb/package-cache/microsoft.dotnet.apicompat.task/9.0.100-preview.4.24223.12/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : API compatibility errors between 'ref/net9.0/System.Private.CoreLib.dll' (left) and 'lib/net9.0/System.Private.CoreLib.dll' (right): [/vmr/src/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/sb/package-cache/microsoft.dotnet.apicompat.task/9.0.100-preview.4.24223.12/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error CP0021: Cannot add constraint 'T:System.Enum' on type parameter 'TEnum' of 'System.Enum.TryFormat<TEnum>(TEnum, System.Span<char>, out int, System.ReadOnlySpan<char>)'. [/vmr/src/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/sb/package-cache/microsoft.dotnet.apicompat.task/9.0.100-preview.4.24223.12/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error CP0021: Cannot add constraint 'T:System.Enum' on type parameter 'T' of 'System.Collections.Generic.EnumEqualityComparer<T>'. [/vmr/src/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/sb/package-cache/microsoft.dotnet.apicompat.task/9.0.100-preview.4.24223.12/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : API breaking changes found. If those are intentional, the APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true' [/vmr/src/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
    0 Warning(s)
    4 Error(s)
dotnet-issue-labeler[bot] commented 1 month ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

oleksandr-didyk commented 1 month ago

@mthalman would you know by any chance who from runtime we should ping for this issue? I looked through runtime's issues but did find a mention for something similar

mthalman commented 1 month ago

cc @ViktorHofer, @ericstj

ViktorHofer commented 1 month ago

That's due to https://github.com/dotnet/sdk/commit/170fa21fc63444ead7d19062e87298dfd5c5b652. @ericstj has a reactionary change ready for runtime.

ericstj commented 1 month ago

I was planning to add those when we ingested APICompat to runtime. Instead I went ahead and made the fixes. I still think source build will be broken because it will insist on the suppressions being up to date / as will runtime. https://github.com/dotnet/runtime/pull/101504

ellahathaway commented 1 month ago

@ViktorHofer is adding a patch to disable APICompat in runtime which should resolve the issues temporarily.

MichaelSimons commented 1 month ago

[Triage] We are expecting this to be unblocked by the https://github.com/dotnet/source-build/issues/4362 that needs to be done in conjunction with with latest sdk flow.

ellahathaway commented 1 month ago

I think this was fixed since we rebootstrapped and the latest sdk flow went in. Leaving https://github.com/dotnet/source-build/issues/4362 open since we continue to rebootstrap to get builds green post the installer -> sdk merge.