sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[main] Update dependencies from dotnet/msbuild

Open dotnet-maestro[bot] opened this issue 1 year ago • 16 comments

This pull request updates the following dependencies

From https://github.com/dotnet/msbuild

  • Subscription: 51256791-e30b-4b96-f2b9-08daf1d75f3f
  • Build: 20240829.1
  • Date Produced: August 29, 2024 5:02:23 PM UTC
  • Commit: 01e53f4161996ce73408117d012f24c2c1737e58
  • Branch: refs/heads/main

dotnet-maestro[bot] avatar Aug 09 '24 12:08 dotnet-maestro[bot]

@dotnet/kitten @maridematte

I noticed on this line that you changed the name of a constraint on a public type. It looks like it's in the M.B.Experimental namespace, so I don't think the change needs to be reverted, but it seems to be causing trouble with the VMR build:

/vmr/.dotnet/sdk/9.0.100-preview.7.24380.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0021: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot remove constraint 'T:Microsoft.Build.Experimental.BuildCheck.AnalysisData' on type parameter 'T' of 'Microsoft.Build.Experimental.BuildCheck.BuildCheckDataContext<T>'.

What do we need to do to resolve that?

Forgind avatar Aug 12 '24 19:08 Forgind

We renamed our BuildCheck structure from Analyzers to Check, and since it is a public class we would like to keep the consistency with the CheckData name. What I'm wondering is why this is just coming up on the SDK insertion and nowhere else.

maridematte avatar Aug 14 '24 08:08 maridematte

@dotnet/source-build-internal It looks like MSBuild has some API changes in its experimental namespace, and this is failing an API compatibility check in the VMR build. Is it possible to an exception for those APIs for the compat check?

dsplaisted avatar Aug 20 '24 00:08 dsplaisted

@dotnet/source-build-internal It looks like MSBuild has some API changes in its experimental namespace, and this is failing an API compatibility check in the VMR build. Is it possible to an exception for those APIs for the compat check?

The source-build leg appears to be passing. This is a unified build question is better suited for @dotnet/product-construction

MichaelSimons avatar Aug 20 '24 13:08 MichaelSimons

From what I can tell, this did show up in the PR which is why this file got checked in by @JanKrivanek: https://github.com/dotnet/msbuild/pull/10491/commits/600c4a6e3f16cb3446bd33c27d6fcce6dba70141

We need to figure out why the suppression isn't honored in the VMR build.

ViktorHofer avatar Aug 20 '24 13:08 ViktorHofer

Ah i know why. This is a new compatibility analysis rule that was added to APICompat / Package Validation in the .NET 9 timeframe. The MSBuild repo is still on an 8.0 SDK. But inside the VMR, we build everything with a .NET 9 SDK.

When you update your repo to a .NET 9 SDK you will see the error. I recommend to update the suppression file and add these new errors.

dotnet pack src\Build /p:ApiCompatGenerateSuppressionFile=true with a .NET 9 SDK (ideally the latest released one, P7)

ViktorHofer avatar Aug 20 '24 13:08 ViktorHofer

Ah i know why. This is a new compatibility analysis rule that was added to APICompat / Package Validation in the .NET 9 timeframe. The MSBuild repo is still on an 8.0 SDK. But inside the VMR, we build everything with a .NET 9 SDK.

When you update your repo to a .NET 9 SDK you will see the error. I recommend to update the suppression file and add these new errors.

dotnet pack src\Build /p:ApiCompatGenerateSuppressionFile=true with a .NET 9 SDK (ideally the latest released one, P7)

If I'm understanding correctly, this needs to be done in MSBuild. /cc @dotnet/kitten

dsplaisted avatar Aug 20 '24 17:08 dsplaisted

Correct

ViktorHofer avatar Aug 20 '24 17:08 ViktorHofer

I think https://github.com/dotnet/msbuild/pull/10484 will have taken care of this. @MichalPavlik is anything blocking that?

rainersigwald avatar Aug 20 '24 18:08 rainersigwald

should we add a VMR patch in the meantime?

akoeplinger avatar Aug 22 '24 08:08 akoeplinger

I think dotnet/msbuild#10484 will have taken care of this. @MichalPavlik is anything blocking that?

IIRC https://github.com/dotnet/arcade/issues/14991 needs to be resolved. @f-alizada has more info.

MichalPavlik avatar Aug 23 '24 07:08 MichalPavlik

Hello. The PR is in progress: https://github.com/dotnet/msbuild/pull/10484 The conflicts and PR reviews are being addressed at the moment. I would say that the completion % is 95

f-alizada avatar Aug 26 '24 15:08 f-alizada

should we add a VMR patch in the meantime?

It sounds like the VMR patch would just need to be the updated suppression file from the MSBuild PR. On the other hand it sounds like the MSBuild PR itself is close to being merged.

dsplaisted avatar Aug 26 '24 19:08 dsplaisted

The .NET 9 PR is in but required a couple of changes on the SDK side in https://github.com/dotnet/sdk/pull/43078. We either need to port them or wait for the merge https://github.com/dotnet/sdk/pull/43065.

cc 🐈 @MichalPavlik (today)/ @maridematte (next month)

rainersigwald avatar Aug 30 '24 14:08 rainersigwald

The .NET 9 PR is in but required a couple of changes on the SDK side in #43078. We either need to port them or wait for the merge #43065.

I was not aware of that, my bad. Could you please point to the changes you are refering to? I was looking at the: https://github.com/dotnet/sdk/blob/048b3711c3d1fafe4de09a49e0ec96acfce61e85/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj#L26-L29 projects description. Is it expected that the targeted framework to be .net8 for the project?

f-alizada avatar Aug 30 '24 15:08 f-alizada

No, that's a change that needs to be pulled here--we don't have to support VSMac as of tomorrow :)

rainersigwald avatar Aug 30 '24 15:08 rainersigwald