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

6.0 SDK diff: unnecessary files redisted in dotnet-format dir already present in shared fx #2583

Closed
dagood opened this issue Oct 26, 2021 · 5 comments
Labels
area-product-experience Improvements in the end-user's product experience

Comments

@dagood
Copy link
Member

dagood commented Oct 26, 2021

./sdk/6.0.100/DotnetTools/dotnet-format/System.Collections.Immutable.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Diagnostics.DiagnosticSource.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Reflection.Metadata.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Runtime.CompilerServices.Unsafe.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Text.Encoding.CodePages.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Text.Encodings.Web.dll
./sdk/6.0.100/DotnetTools/dotnet-format/System.Text.Json.dll

These are in the sharedfx and shouldn't need to be here.

https://github.com/dagood/source-build/pull/9/files/c16bba2273c1519dea0e1c2a031053f8269b8551#r736883570


There are some poisoned DLLs also showing up in this directory, but they are distinct from these ones, all Microsoft.Extensions.*:

@dagood
Copy link
Member Author

dagood commented Oct 26, 2021

It looks like these are all coming in because my build uses a 6.0.0-rc2 SDK to build, but dotnet/format has transitive references to 6.0.0 dotnet/runtime packages. This makes ResolvePackageFileConflicts resolve conflicts to the newer DLLs, causing them to be published, which actually makes sense:

Encountered conflict between
  'Platform:System.Collections.Immutable.dll' and
  'CopyLocal:/home/dagood/sb/6.0-internal/src/format.542a62ee97b76ea6ebd9b42515a1d61de2166e41/artifacts/source-build/self/package-cache/system.collections.immutable/6.0.0/lib/net6.0/System.Collections.Immutable.dll'.
  Choosing 'CopyLocal:/home/dagood/sb/6.0-internal/src/format.542a62ee97b76ea6ebd9b42515a1d61de2166e41/artifacts/source-build/self/package-cache/system.collections.immutable/6.0.0/lib/net6.0/System.Collections.Immutable.dll'
  because file version '6.0.21.52501'
  is greater than '6.0.21.42306'.

This should go away either:

  • When the Microsoft 6.0.0 SDK is available to use as stage 0.
  • When running the bootstrap process. A mostly-source-built 6.0.0 SDK is used to build the really-source-built 6.0.0 SDK, which should make the platform version win.

Something I'm not sure of is why this behavior doesn't repro in the Microsoft build.

/cc @eerhardt

@eerhardt
Copy link
Member

Nice analysis, @dagood. That makes sense that we have locally built NuGet packages with newer versions than what is in the platform.

@dagood
Copy link
Member Author

dagood commented Oct 27, 2021

Something I'm not sure of is why this behavior doesn't repro in the Microsoft build.

To close this out, I ran dotnet/format non-source-build locally. It uses 5.0.0 versions because it pulls them in through an old Microsoft.Build reference:

      "Microsoft.Build/16.11.0": {
        "type": "package",
        "dependencies": {
          "Microsoft.Build.Framework": "16.11.0",
          "Microsoft.NET.StringTools": "1.0.0",
          "Microsoft.Win32.Registry": "4.3.0",
          "System.Collections.Immutable": "5.0.0",

Then the 6.0.0-rc.1 platform assembly wins against 5.0.0. (Their global.json is rc.1.)

If the Microsoft.Build dependency were "live", it seems like the same diff could happen between rc.2 and RTM Microsoft-built SDKs, or perhaps between 6.0.100 and 6.0.101 Microsoft-built SDKs. I think another factor is which repos upgrade their prebuilt toolsets from 6.0.100-rc.2 to 6.0.100 before building 6.0.101.

@dagood
Copy link
Member Author

dagood commented Oct 27, 2021

Confirmed: these files are gone in a bootstrapped source-built SDK.

@MichaelSimons
Copy link
Member

These diffs are no longer present in .NET 8.0. Closing.

@github-project-automation github-project-automation bot moved this from 8.0 Preview 6 to Done in .NET Source Build Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-product-experience Improvements in the end-user's product experience
Projects
Archived in project
Development

No branches or pull requests

3 participants