Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Diff Microsoft-built vs. source-built 6.0.100 SDK #9

Open
wants to merge 4 commits into
base: base-6.0.1xx
Choose a base branch
from

Conversation

dagood
Copy link
Owner

@dagood dagood commented Oct 23, 2021

Version replacements to minimize diff a little:

  • /6.0.0-rtm.21522.1/ -> /6.0.0-rtm.21521.10/
  • /6.0.100-rtm.21521.16/ -> /6.0.100-rtm.21522.10/

Version replacements to minimize diff a little:

* /6.0.0-rtm.21522.1/ -> /6.0.0-rtm.21521.10/
* /6.0.100-rtm.21521.16/ -> /6.0.100-rtm.21522.10/
Copy link
Owner Author

@dagood dagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding comments that people started to make on these diffs before I sent this out as a PR.

@@ -3848,7 +2985,6 @@
./shared/Microsoft.NETCore.App/6.0.0/System.Xml.XmlSerializer.dll
./shared/Microsoft.NETCore.App/6.0.0/System.Xml.XPath.dll
./shared/Microsoft.NETCore.App/6.0.0/System.Xml.XPath.XDocument.dll
./shared/Microsoft.NETCore.App/6.0.0/.version
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[@omajid]
I can't see anything that uses the runtime's .version file (though I do see some users of the SDK's version file). Still, this seems like something that might break callers?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this file is intended to be purely informational--it would contain the commit hash on the first line and then the version number on a second line. IMO would be good to put back in place for parity, although I doubt it would cause problems with "ordinary" SDK/sharedfx usage.

Copy link
Owner Author

@dagood dagood Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./sdk/6.0.100/testhost.x86.deps.json
./sdk/6.0.100/testhost.x86.dll
./sdk/6.0.100/testhost.x86.dll.config
./sdk/6.0.100/testhost.x86.runtimeconfig.json
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[@omajid]
This one looks somewhat interesting:

+./sdk/6.0.100/testhost.deps.json
+./sdk/6.0.100/testhost.dll
+./sdk/6.0.100/testhost.dll.config
+./sdk/6.0.100/testhost.runtimeconfig.json
+./sdk/6.0.100/testhost.x86
+./sdk/6.0.100/testhost.x86.deps.json
+./sdk/6.0.100/testhost.x86.dll
+./sdk/6.0.100/testhost.x86.dll.config
+./sdk/6.0.100/testhost.x86.runtimeconfig.json

The name is not what I expected: x86 instead of x64? In RC2,
testhost.x86 was also a native binary that doesn't have debug info, so I am not even sure where that was coming from. That it's also missing in the Microsoft-built SDK is very strange. Is that something you folks are investigating?

Copy link
Owner Author

@dagood dagood Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./sdk/6.0.100/de/MSBuild.resources.dll
./sdk/6.0.100/de/NuGet.Build.Tasks.Console.resources.dll
./sdk/6.0.100/de/NuGet.Build.Tasks.resources.dll
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[@omajid]
For the localization stuff, do you have a plan to "fix" it so that source-build and Microsoft-built SDKs have the same resources (eg -./sdk/6.0.100/de/NuGet.Build.Tasks.resources.dll) at some point?

Copy link
Owner Author

@dagood dagood Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contents.txt Outdated Show resolved Hide resolved
@@ -2202,6 +1794,7 @@
./sdk/6.0.100/Sdks/FSharp.NET.Sdk/Sdk/Sdk.props
./sdk/6.0.100/Sdks/FSharp.NET.Sdk/Sdk/Sdk.targets
./sdk/6.0.100/Sdks/Microsoft.Docker.Sdk/
./sdk/6.0.100/Sdks/Microsoft.Docker.Sdk/microsoft.docker.sdk.1.1.0.csproj
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[@omajid]
This file seems like something didn't get filtered out. Could this break any users? It just won't get used, right?

Copy link
Owner Author

@dagood dagood Oct 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think .csproj would be automatically picked up by anything, so I think it's safe. This issue tracks fixing this kind of file being included from SBRP:

It's currently in dotnet-sdk-5.0 in Fedora 34:

/usr/lib64/dotnet/sdk/5.0.206/Sdks/Microsoft.Docker.Sdk/Microsoft.Docker.Sdk.csproj

contents.txt Outdated Show resolved Hide resolved
./sdk/6.0.100/Extensions/ko/Microsoft.TestPlatform.TestHostRuntimeProvider.resources.dll
./sdk/6.0.100/Extensions/ko/Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.resources.dll
./sdk/6.0.100/Extensions/ko/Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.resources.dll
./sdk/6.0.100/Extensions/Microsoft.Diagnostics.NETCore.Client.dll
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[@eerhardt]
who knows about vstest stuff? the diffs in that area seem interesting as well

RE: This line, and also the testhost diffs.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For diff reduction:

6.0.0-rtm.21525.1 -> 6.0.0-rtm.21521.10

6.0.100-rtm.21523.6 -> 6.0.100-rtm.21522.10
@@ -5,6 +5,10 @@
./host/fxr/6.0.0/
./host/fxr/6.0.0/libhostfxr.so
./LICENSE.txt
./metadata/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these? Were they here previously?

Copy link

@omajid omajid Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are source-build specific changes to enable non-root users to install SDK workloads. See dotnet/installer#12021 and dotnet/installer#12104 for more details. It's safe to ignore them.

contents.txt Outdated Show resolved Hide resolved
./sdk/6.0.100/FSharp/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll
./sdk/6.0.100/FSharp/System.CodeDom.dll
./sdk/6.0.100/FSharp/System.Configuration.ConfigurationManager.dll
./sdk/6.0.100/FSharp/System.Drawing.Common.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are .... interesting. Do we have F# smoke tests to ensure F# still works?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm giving this a try locally. There are F# smoke-tests, but run is not in the list right now because of some known failures (with the Microsoft build, too).

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm able to get F# to run a dotnet new web --language F# project fine, with workaround from the above issue.

I'm not able to find any product problems that happen because of the missing files, but I'm not sure what F# SDK features would be using these assemblies, so I could easily be missing something. 😕

For System.Drawing.Common.dll in particular, there's an existing diff in 5.0 that isn't resolved:

For followup on 6.0.0, running more tests, filed:

@@ -1666,7 +1479,6 @@
./sdk/6.0.100/Microsoft.DotNet.NativeWrapper.dll
./sdk/6.0.100/Microsoft.DotNet.SdkResolver.dll
./sdk/6.0.100/Microsoft.DotNet.TemplateLocator.dll
./sdk/6.0.100/Microsoft.Extensions.CommandLineUtils.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - note that this was caused by https://github.com/dotnet/installer/pull/12356/files#diff-df188b804ce1fd62bb0ed1f6bfd73e010e4b6f92295bab371f35e8879783dab5R30.

It took me a while to find it, so I wanted to note it here, in case someone else was interested here.

./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/ko/
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/ko/Microsoft.NET.Sdk.Publish.Tasks.resources.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/Microsoft.Bcl.AsyncInterfaces.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/Microsoft.NET.Sdk.Publish.Tasks.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, this would mean some "publish" things won't work in OmniSharp. Not sure if that is a problem or not.

@vijayrkn - do you know if there is any way to get these "publish" tasks invoked in OmniSharp? If so, we will probably need to update

https://github.com/dotnet/sdk/blob/a30e465a2e2ea4e2550f319a2dc088daaafe5649/src/WebSdk/Publish/Tasks/Microsoft.NET.Sdk.Publish.Tasks.csproj#L14

And start building these tasks for net472 as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net472 based assemblies are only used by msbuild invoked within VS. None of the msbuild/sdk core scenarios use these assemblies.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net472 based assemblies are only used by msbuild invoked within VS.

On non-Windows, OmniSharp runs on a mono-based msbuild. This means it acts like a .NET Framework msbuild.exe process, and thus will load the net472 based assemblies.

See https://github.com/OmniSharp/omnisharp-roslyn#introduction

and Mono on OSX/Linux. It targets the net472 target framework. For platforms other than Windows, OmniSharp ships with an embedded Mono which is based on version 6.12.0, includes MSBuild 16.8.0...

There are plans to change this in the future, but for today that's how it works. For the future plans see:

dotnet/vscode-csharp#4843
dotnet/vscode-csharp#4360 (comment)


Chatting offline, @JoeRobich let me know that OmniSharp does a design time build of CoreCompile and Compile targets. So I don't believe these Publish tasks will need to be built for net472 in source-build.

Looking at a diff of 5.0, they weren't built for netfx there either.

./sdk/6.0.100/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/zh-Hans/NuGet.Build.Tasks.Pack.resources.dll
./sdk/6.0.100/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/zh-Hant/
./sdk/6.0.100/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/zh-Hant/NuGet.Build.Tasks.Pack.resources.dll
./sdk/6.0.100/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/NuGet.Commands.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is odd. Why would these NuGet assemblies be needed in source-build, but be absent in the MSFT distribution?

cc @nkolev92 @zivkan - do you know why these assemblies are showing up here in the source-built SDK, but not in the MSFT distribution?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ilmerge into NuGet.Build.Tasks.Pack.dll, and the equivalent is not possible in source build.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the info, @nkolev92.

contents.txt Outdated
Comment on lines 998 to 1002
./sdk/6.0.100/DotnetTools/dotnet-format/runtimes/browser/lib/net6.0/System.Text.Encodings.Web.dll
./sdk/6.0.100/DotnetTools/dotnet-format/runtimes/win/
./sdk/6.0.100/DotnetTools/dotnet-format/runtimes/win/lib/
./sdk/6.0.100/DotnetTools/dotnet-format/runtimes/win/lib/net6.0/
./sdk/6.0.100/DotnetTools/dotnet-format/runtimes/win/lib/net6.0/System.Text.Encoding.CodePages.dll
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagood
Copy link
Owner Author

dagood commented Oct 27, 2021

I just tried to update the diff against the official offline build from https://dnceng.visualstudio.com/internal/_build/results?buildId=1442031&view=results ("final" bits), but it's identical to what we have here. 😄 (After ordinary version number replacement.)

6.0.0-rtm.21527.1 -> 6.0.0-rtm.21521.10

6.0.100-rtm.21526.8 -> 6.0.100-rtm.21522.10
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/pt-BR/System.CommandLine.resources.dll
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/ref/
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/ref/dotnet-watch.dll
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anyone know more about assemblies showing up in build output as ref/foo.dll? I heard it's a new SDK feature, but I don't know what it's for.

It seems hard to imagine a meaning for "ref" that involves someone referencing this DLL... but I want to make sure to point this out.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to be coming from $(ProduceReferenceAssembly) being true. See dotnet/sdk#12720.

Why it is not being produced for source-build I don't know. Can you check a binlog of the sdk and see what value $(ProduceReferenceAssembly) has for dotnet-watch?

In general, I don't think this ref assembly needs to be in the official product. I'm not sure how dotnet-watch is laid into the SDK, but maybe @dsplaisted @sfoslund can help?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check a binlog of the sdk and see what value $(ProduceReferenceAssembly) has for dotnet-watch?

Will do.

I also noticed a lot more instances when I was scanning through a diff again:

./sdk/6.0.100/Microsoft/Microsoft.NET.Build.Extensions/tools/net6.0/ref/Microsoft.NET.Build.Extensions.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/tools/net6.0/ref/Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Publish/tools/net6.0/ref/Microsoft.NET.Sdk.Publish.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk/tools/net6.0/ref/Microsoft.NET.Build.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Web.ProjectSystem/tools/net6.0/ref/Microsoft.NET.Sdk.Web.ProjectSystem.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Web/tools/net6.0/ref/Microsoft.NET.Sdk.Web.Tasks.dll
./sdk/6.0.100/Sdks/Microsoft.NET.Sdk.Worker/tools/net6.0/ref/Microsoft.NET.Sdk.Worker.Tasks.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how dotnet-watch is laid into the SDK

I don't have a great understanding in that area either, @pranavkm would probably know?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This was done intentionally in source-build's repos/sdk.proj:

    <!-- The sdk repo is building with an older version of the SDK where this property is
         defaulted to false.  The SDK that source-build is using defaults it to true.
         Set it to false to get old behavior for building the sdk repo. -->
    <BuildCommandArgs>$(BuildCommandArgs) /p:ProduceReferenceAssembly=false</BuildCommandArgs>

I suppose dotnet/sdk updated to a newer version of the .NET SDK as stage 0 since this comment was written, so the Microsoft build started using the new default. Then this line suddenly introduced diffs rather than fixing them. 😄

I'll create a source-build issue to track this and submit a PR to remove those lines, for servicing consideration.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contents.txt Outdated
@@ -1223,7 +1207,6 @@
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/System.Composition.Hosting.dll
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/System.Composition.Runtime.dll
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/System.Composition.TypedParts.dll
./sdk/6.0.100/DotnetTools/dotnet-watch/6.0.100-rtm.21522.10/tools/net6.0/any/System.IO.Pipelines.dll

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this good / expected?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.IO.Pipelines isn't in the shared fx. So if dotnet-watch needs this assembly, this might break it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in the Microsoft-built SDK, according to the overall diff. I can try to track down what was bringing this in the non-bootstrapped build.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to track down what was bringing this in the non-bootstrapped build.

Not getting into this for now. This change makes us have the same DLLs as the Microsoft-built SDK, so we'll assume including it in the non-bootstrapped build was just some version-related issue that bootstrapping fixed.

@dagood
Copy link
Owner Author

dagood commented Oct 27, 2021

I've pushed a few diffs while leaving content.txt alone to avoid potentially wrecking comment context.

I wanted to check the final SDK vs. source-built bootstrap SDK, so I pushed a .diff file that contains that diff. (See final-base-6.0.100...dagood:final-diff-6.0.100 for better colorization.) I also pushed a .diff file for the old Microsoft-built SDK. I diffed those two .diff files against each other to see what changed. It's not fun to read, but I didn't think it was worth spending too much time figuring out a much better way.

-./sdk/6.0.100/cs/NuGet.Versioning.resources.dll
-./sdk/6.0.100/cs/NuGet.VisualStudio.Contracts.resources.dll
./sdk/6.0.100/cs/System.CommandLine.resources.dll
--./sdk/6.0.100/cs/Test.Utility.resources.dll
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This -- line means that the old diff had -./sdk/6.0.100/cs/Test.Utility.resources.dll, but the new diff doesn't have that line. Since the bootstrap SDK didn't change, this means the Microsoft-built SDK has dropped this file.

tar -tf msft-dotnet-sdk-6.0.100-linux-x64.tar.gz | grep Test.Utility shows no results. So: no Test.Utility.resources.dll, and also no Test.Utility.dll files that would be associated with the resource DLLs.

This brings the source-build and Microsoft-build SDKs closer, so no problem here as far as we're concerned.

(Mentioning it to show an example of what the diff-diff tells us and because I did a grep to make sure.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants