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

Update to 5.0 GA #1845

Merged
merged 26 commits into from
Nov 3, 2020
Merged

Update to 5.0 GA #1845

merged 26 commits into from
Nov 3, 2020

Conversation

dseefeld
Copy link
Contributor

No description provided.

@dseefeld dseefeld self-assigned this Oct 28, 2020
eng/Version.Details.xml Outdated Show resolved Hide resolved
repos/linker.proj Show resolved Hide resolved
repos/runtime.proj Outdated Show resolved Hide resolved
@crummel crummel self-requested a review November 2, 2020 21:06
@runfoapp runfoapp bot mentioned this pull request Nov 2, 2020
Include patch to remove import of restore/harvestPackages.targets
in runtime libraries build to fix issue with portable build
@dseefeld
Copy link
Contributor Author

dseefeld commented Nov 3, 2020

@dagood @crummel Any more comments on this? I think it will be ready to merge as soon as it goes green.

@dagood
Copy link
Member

dagood commented Nov 3, 2020

Filed an issue for my remaining comment from earlier. Going through it again now.

@@ -20,7 +20,7 @@
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == ''">x64</Platform>

<UseStableVersions Condition="'$(UseStableVersions)' == ''">false</UseStableVersions>
<UseStableVersions Condition="'$(UseStableVersions)' == ''">true</UseStableVersions>
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete this line? #1627

Copy link
Contributor Author

@dseefeld dseefeld Nov 3, 2020

Choose a reason for hiding this comment

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

No. Without it, Roslyn wasn't building stable versions.

Copy link
Member

Choose a reason for hiding this comment

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

Roslyn wasn't building stable versions.

Why is that a goal? The Microsoft Roslyn build didn't produce stable versions.
https://maestro-prod.westus2.cloudapp.azure.com/1297/https:%2F%2Fgithub.com%2Fdotnet%2Froslyn/68310/graph

image

And in Version.Details.xml, <Dependency Name="Microsoft.NETCore.Compilers" Version="3.8.0-5.20519.18" ...

vs.

  [14:25:41.87] Building 'roslyn'...done
  New NuGet package(s) after building roslyn:
    -> Microsoft.CodeAnalysis.Build.Tasks 3.8.0
    -> Microsoft.CodeAnalysis.Common 3.8.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... A later repo was looking for a stable version and wasn't finding it. I was mistaken in my fix for that.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to leave #1627 tracking it for followup but wanted to dig into any issues to make it easier to tackle later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without the patch, the production build produces Microsoft.NETCore.Compilers.3.8.0-dev.20519.18.nupkg. The "dev" version doesn't seem right.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds like a missing -ci or OfficialBuildId or something along those lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't change roslyn.proj. It has OfficialBuild=true here:

<BuildCommandArgs>$(BuildCommandArgs) /p:OfficialBuild=true</BuildCommandArgs>

Copy link
Contributor Author

@dseefeld dseefeld Nov 3, 2020

Choose a reason for hiding this comment

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

Adding --ci to roslyn.proj caused it to generate the desired version. Microsoft.Net.Compilers.Toolset.3.8.0-5.20519.18.nupkg I'll fix this under #1627 once this PR is merged

tools-local/prebuilt-baseline-offline.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@crummel crummel left a comment

Choose a reason for hiding this comment

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

LGTM, just one question about the ASP.NET version.

@dseefeld dseefeld merged commit dd02c2f into dotnet:master Nov 3, 2020
@dseefeld dseefeld deleted the 5.0GA branch November 3, 2020 22:34
results in an error:
An item with the same key has already been added.
Key: (System.Security.Cryptography.Cng, 5.0.0)
---
Copy link
Member

Choose a reason for hiding this comment

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

@dseefeld @dagood does this mean something doesn't allow us to consume System.Security.Cryptography.Cng 5.0.0 to produce System.Security.Cryptography.Cng 5.0.0?

Copy link
Contributor Author

@dseefeld dseefeld Nov 13, 2020

Choose a reason for hiding this comment

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

Yes, that's what I was seeing. Here's the error I was seeing without this patch:

3000 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error : An item with the same key has already been added. Key: (System.Security.Cryptography.Cng, 5.0.0) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3001 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3002 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at System.Linq.Enumerable.ToDictionary[TSource,TKey](List`1 source, Func`2 keySelector, IEqualityComparer`1 comparer) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3003 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.LockFileBuilder.CreateLockFile(LockFile previousLockFile, PackageSpec project, IEnumerable`1 targetGraphs, IReadOnlyList`1 localRepositories, RemoteWalkContext context) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3004 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3005 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3006 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreRunner.ExecuteAndCommitAsync(RestoreSummaryRequest summaryRequest, CancellationToken token) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3007 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3008 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreRunner.RunAsync(IEnumerable`1 restoreRequests, RestoreArgs restoreContext, CancellationToken token) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3009 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Commands.RestoreRunner.RunAsync(RestoreArgs restoreContext, CancellationToken token) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3010 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Build.Tasks.BuildTasksUtility.RestoreAsync(DependencyGraphSpec dependencyGraphSpec, Boolean interactive, Boolean recursive, Boolean noCache, Boolean ignoreFailedSources, Boolean disableParallel, Boolean force, Boolean forceEvaluate, Boolean hideWarningsAndErrors, Boolean restorePC, Boolean cleanupAssetsForUnsupportedProjects, ILogger log, CancellationToken cancellationToken) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]
3011 /src/tb-5.0GA/.dotnet/sdk/5.0.100-rc.1.20452.10/NuGet.RestoreEx.targets(10,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.RestoreAsync(String entryProjectFilePath, IDictionary`2 globalProperties, IReadOnlyDictionary`2 options) [/src/tb-5.0GA/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/Build.proj]

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this happen for a lot of packages since we're consuming 5.0.0 prebuilt packages to build 5.0.0 source-built packages? Or is issue somehow specific to the Cng package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why this issue popped up for this specific package. We could certainly try to remove the patch and see if the issue repros. It may have been a "point in time" issue.

Copy link
Member

@dagood dagood Nov 13, 2020

Choose a reason for hiding this comment

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

Here's some more info from our old chat about it. dotnet/runtime seems to be doing something specific that aggravates some NuGet bug. It won't be a point in time issue, I doubt the NuGet issue will be fixed in our timeline. I was able to put together a simplified repro, but we dropped it because we probably don't actually need a fix here. (And we always want to cut work because time is not something we have much of.)

dagood: [in response to a binlog] Yeah, good old RestoreTaskEx... another issue we have with static restore is #1825 FWIW, but unrelated.

...

Seems like we might be running into NuGet/Home#6795 ? But not sure why we would but the Microsoft build wouldn't...

[10/30 9:51 AM] Davis Goodin
Hmm, noticed a few things earlier in those RestoreTaskEx logs:

Could not parse version  for LatestPackage System.Security.Cryptography.Cng, will use latest stable.
...
Installing System.Security.Cryptography.Cng 5.0.0.

(And actually the lines do seem scrambled around that installing line, so not sure which project it's coming from.)

​[10/30 9:52 AM] Davis Goodin
I guess some other project is referring to the Cng package. Not totally sure that's important though.

​[10/30 9:55 AM] Davis Goodin
Hmm. Wonder if it's choking on this, where in the prod build we don't have a PVP value but in the tarball build we're overwriting it?
https://github.com/dotnet/runtime/blob/7ef6d50b312217d2f7c17b9697891fa8ab98a19d/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj#L639-L642

 <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2.0'))">
 <PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
 <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
 <PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />

​[10/30 9:57 AM] Davis Goodin
For a sanity check... does the PVP being passed in in your local build have SystemSecurityCryptographyCngVersion defined?

[10/30 9:58 AM] Dan Seefeldt
Yes.
​[10/30 9:59 AM] Dan Seefeldt
The difference between production and tarball is that production build has it defined as 4.7.0 while the tarball build is 5.0.0.

[10/30 10:40 AM] Davis Goodin
Got it, looks like TargetFrameworks is part of the key for NuGet to mash them together and fail: https://github.com/dagood/repro/tree/repro-static-restore-ref-mashup

Oh huh. Static restore is not necessary to repro.

(I was wondering if we could also fix it by disabling static restore.)

After mulling over what Tom's suggesting (and Wes suggested in the past) I think the real long term fix is to stop building all TFMs except net5.0... (so that we don't have this PackageReference to begin with) [referring to #1763]

dseefeld: BTW, forcing System.Security.Cryptography.Cng to 4.7.0 fixed the issue.

4.7.0 isn't a problem because we should be able to build it in SBRP, so we should be able to leave it at that.

This info probably should have made it to the patch, or an issue linked to from the patch. (But we're rushing.)

Copy link
Member

Choose a reason for hiding this comment

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

@dagood since you have a small reproducer, it seems worth filing a bug in https://github.com/NuGet/Home (even if it won't be fixed for our 5.0).

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, but I don't feel I have time to make it make enough sense for discussion. Filed #1888 to track it though.

Copy link
Member

Choose a reason for hiding this comment

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

FYI, I've filed the issue for this: NuGet/Home#10368.

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

Successfully merging this pull request may close these issues.

4 participants