aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Update SDK

Open MackinnonBuck opened this issue 2 years ago • 8 comments

MackinnonBuck avatar Aug 01 '22 18:08 MackinnonBuck

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

ghost avatar Aug 01 '22 18:08 ghost

The aspnetcore-components-e2e and aspnetcore-ci (Build Source-Build (Managed)) checks have failed twice now because dotnet-install failed:

/home/vsts/.nuget/packages/microsoft.dotnet.arcade.sdk/7.0.0-beta.22379.10/tools/InstallDotNetCore.targets(15,5): error : dotnet-install failed [/home/vsts/.nuget/packages/microsoft.dotnet.arcade.sdk/7.0.0-beta.22379.10/tools/Tools.proj]

Not totally sure what the cause is at the moment. See https://dev.azure.com/dnceng/public/_build/results?buildId=1916161&view=logs&j=2f0d093c-1064-5c86-fc5b-b7b1eca8e66a&t=d2b639a6-cb19-5f1f-66fd-8047f66b3026&l=126

MackinnonBuck avatar Aug 01 '22 20:08 MackinnonBuck

I'd recommend checking out the binlog to see if there's more info (here). Looks like it's only in the source-build leg, so maybe there was a relevant change there in dotnet/sdk or dotnet/installer recently. @MichaelSimons might know more

wtgodbe avatar Aug 01 '22 20:08 wtgodbe

cc @dotnet/source-build-internal

MichaelSimons avatar Aug 01 '22 20:08 MichaelSimons

/azp run

dougbu avatar Aug 03 '22 01:08 dougbu

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Aug 03 '22 01:08 azure-pipelines[bot]

https://github.com/dotnet/arcade/issues/10311#issuecomment-1209629471

As it's now clear this is an MSBuild bug in this SDK (and thus not one users want to adopt) I am closing this issue.

I'll try a later SDK until this works.

Tratcher avatar Aug 09 '22 17:08 Tratcher

@Tratcher this SDK didn't work. Suggest watching https://maestro-prod.westus2.cloudapp.azure.com/2237/https:%2F%2Fgithub.com%2Fdotnet%2Finstaller/latest/graph for a build that includes dotnet/msbuild@f2d13c6261c25bfdf53b29f3b0c4f38d7274fcc4. Latest SDK (which, confusingly, we get from the dotnet/installer repo) includes msbuild commits from 6 days ago but we want a commit from 4 days ago.

dougbu avatar Aug 09 '22 17:08 dougbu

Updated to 7.0.100-rc.1.22410.15 to match latest SDK from installer.

TanayParikh avatar Aug 11 '22 16:08 TanayParikh

Suggest watching https://maestro-prod.westus2.cloudapp.azure.com/2237/https:%2F%2Fgithub.com%2Fdotnet%2Finstaller/latest/graph for a build that includes dotnet/msbuild@f2d13c6. Latest SDK (which, confusingly, we get from the dotnet/installer repo) includes msbuild commits from 6 days ago but we want a commit from 4 days ago.

Just did a trace and I believe 7.0.100-rc.1.22411.3 should now have everything we need. 🤞

TanayParikh avatar Aug 11 '22 23:08 TanayParikh

should now have everything we need

😞 unfortunately not. Source build still failing.

TanayParikh avatar Aug 12 '22 03:08 TanayParikh

Looks like we have a new breaking change now:

src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs(116,61): error IL2070: (NETCORE_ENGINEERING_TELEMETRY=Build) 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.MakeGenericType(params Type[])'. The parameter 'implementation' of method 'Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory.AlgorithmActivator.CreateFactory<T>(Type)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.

@JamesNK @BrennanConroy would you happen to have context on this?

TanayParikh avatar Aug 12 '22 22:08 TanayParikh

Looks like we have a new breaking change now:

I just discovered this in source-build and logged an issue for it - https://github.com/dotnet/aspnetcore/issues/43253

MichaelSimons avatar Aug 12 '22 23:08 MichaelSimons

I've added a possible fix for the warning - https://github.com/dotnet/aspnetcore/pull/43259

It might not fix the warning - ASP.NET Core isn't using the same SDK as source build so I can't test it - but if it's still a problem, then the follow-up change should be a minor fix.

JamesNK avatar Aug 13 '22 01:08 JamesNK

Might be easier to test your commit in this PR's branch @JamesNK

dougbu avatar Aug 13 '22 02:08 dougbu

@vitek-karas @sbomer What's going on with IL2121? A lot of them have shown up in the aspnetcore build. I tried to remove some of the suppressions, but they were correctly suppressing warnings.

I see you disabled this warning in dotnet/runtime@e65381b (#73410). Is IL2121 broken?

Should the incorrect suppression warning be suppressed because it's incorrect? 😆

JamesNK avatar Aug 13 '22 11:08 JamesNK

IL2121 is off by default, but that "off by default" part is in SDK - which runtime or asp.net don't use to run the linker 😢 Please suppress them for now.

That said I would be interested to see the cases where the suppression is necessary but linker produces IL2121 still. The only place where we've seen that happening was either around feature switches, or in code which uses ifdefs.

/cc @jkurdek

vitek-karas avatar Aug 13 '22 12:08 vitek-karas

@vitek-karas there is the suppression but we are still seeing errors. I did check that no suppression is overridden. Example: https://github.com/dotnet/aspnetcore/pull/43028/checks?check_run_id=7864889493

sebastienros avatar Aug 16 '22 19:08 sebastienros

@vitek-karas any update here?

javiercn avatar Aug 18 '22 09:08 javiercn

@sbomer there seems to be an ILinker issue that is triggering warnings despite suppresions, could you take a look at it as per https://github.com/dotnet/aspnetcore/pull/43028#issuecomment-1217090062?

javiercn avatar Aug 18 '22 09:08 javiercn

Would you be able to share a binlog or repro instructions of the case where it is warning even when NoWarn has IL2121?

sbomer avatar Aug 18 '22 19:08 sbomer

I do see a few places where the ILLink task is being called directly without passing in the NoWarn argument: https://github.com/dotnet/aspnetcore/blob/197c1693d3c830af52b587e8d88891bc9689be44/src/Tools/LinkabilityChecker/LinkabilityChecker.csproj#L47-L55 https://github.com/dotnet/aspnetcore/blob/197c1693d3c830af52b587e8d88891bc9689be44/src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj#L49-L57

These invocations should probably do what the SDK does, if they are intended to work with NoWarn: https://github.com/dotnet/linker/blob/696c2166078b1a70f12407840c3ab0f90d73211b/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets#L150

sbomer avatar Aug 18 '22 19:08 sbomer

@sbomer thanks, I updated these files with NoWarn="$(NoWarn)", let's see if that helps.

sebastienros avatar Aug 18 '22 20:08 sebastienros

I can see that there are no linker warnings being shown in the output, but the installer script is failing with a no-so-useful message

tlakollo avatar Aug 18 '22 23:08 tlakollo

The ILLINK warnings are gone, thanks

sebastienros avatar Aug 19 '22 17:08 sebastienros

@MichaelSimons I see you created https://github.com/dotnet/aspnetcore/issues/43253 for source build issues, do you know if there is something we can do in this PR to get it building? Wait/update to a new sdk?

sebastienros avatar Aug 19 '22 17:08 sebastienros

@sebastienros, Regarding https://github.com/dotnet/aspnetcore/issues/43253, that was specific to the linker issue that I see was already addressed in this PR.

In regards to the failing source-build CI leg, the symptoms appear to be similar to the original issue reported in https://github.com/dotnet/arcade/issues/10311. Perhaps @MattGal can comment on the situation.

MichaelSimons avatar Aug 19 '22 18:08 MichaelSimons

@sebastienros regarding the reported unnecessary suppression - it's complaining about this suppression: https://github.com/dotnet/aspnetcore/blob/61e1572ad518c82f6fd487e65852e41bccde1bc1/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml#L64

We've improved the linker to "blame" the XML file in a case like this, but the change probably didn't make it into this repo yet: https://github.com/dotnet/linker/commit/9332578bfd67d8b1e53a3cbf9e0f92d5af7186ac

vitek-karas avatar Aug 21 '22 19:08 vitek-karas

@vitek-karas should I remove the suppression in the meantime❔

dougbu avatar Aug 21 '22 20:08 dougbu

@dougbu if you want to, but with suppression of IL2121 there's nothing to do. Eventually we should go over all of the IL2121 warnings and clean it up. Basically aspnetcore equivalent of https://github.com/dotnet/runtime/pull/73238 in runtime.

The linker change will only produce the warning pointing to the XML file, but it will still produce the warning (just makes it easier to find).

/cc @jkurdek

vitek-karas avatar Aug 22 '22 15:08 vitek-karas