-
Notifications
You must be signed in to change notification settings - Fork 695
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
Apply source-build patches #4404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the SDK going to run under net6.0?
I thought the plan was net5.0, then net7.0 and skipping net6.0.
src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
Outdated
Show resolved
Hide resolved
Unfortunately we won't be able to skip net6 because Microsoft.Build 17.0.0 only supports net472 and net6. I logged dotnet/source-build#2745 to track these TFM changes and back them out once we can move to net7. |
<ItemGroup Condition=" '$(TargetFramework)' == '$(NETFXTargetFramework)' or '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'netstandard2.0' "> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.IO.Compression" /> | ||
<Reference Include="mscorlib" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the .NET SDK automatically add these BCL assembly references for .NET Standard projects? My gut feeling is that adding the netstandard2.0 condition to the item group should be unnecessary.
<ItemGroup Condition=" '$(TargetFramework)' == '$(NETFXTargetFramework)' or '$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'netstandard2.0' "> | ||
<Reference Include="System.Security" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment, doesn't the .NET SDK add these BCL references automatically for .NET Standard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The netstandard condition was removed from NuGet.Common.csproj, but not here.
<TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net45</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(TargetFrameworks);netstandard2.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if my suggestion in common.project.props can't be taken, given that the last two of these are opposites of each other, can we get rid of the first, non-conditioned, declaration, so MSBuild doesn't have to overwrite or re-evaulate the same property multiple times in all scenarios? I'm not enough of an MSBuild expert to know whether or not it has an actual performance benefit, but maybe it's clearer to readers to me because I will need to do less mental arithmetic to figure out which set declarations contribute to the final value.
@@ -6,6 +6,7 @@ | |||
<Description>Common utilities and interfaces for all NuGet libraries.</Description> | |||
<TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks> | |||
<TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net45</TargetFrameworks> | |||
<TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(TargetFrameworks);netstandard2.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
off topic for this PR, but given that common.project.props defines <IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
, should we use DotNetBuildFromSource
instead?
I'm the team's CI "expert", but it's not clear to me what is source-build specific, and what we do in our own CI differently on Windows vs Mac/Linux. I think if we removed IsBuildOnlyXPLATProjects
and used DotNetBuildFromSource
instead throughout our build scripts, it would be much easier to understand what is what.
@crummel You might need to rebase your branch. CI build 6.1.0.757 has an outdated build number. Current build numbers starts with 6.2. |
3edc826
to
d8e5521
Compare
The CI build is failing because Microsoft.Extensions.CommandLineUtis.Source can't be found. We recently opt our repo into package source mapping do we need to add a new mapping? Where is this package supposed to come from? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
The 1 or 2 changes that need addressed @zivkan can help with.
Don't block on me for merging.
@crummel 🔔 Do you need help? |
That would be great. Sorry, I've been working on this on and off but having some problems. Currently what I'm looking at is the |
It's hard to debug, but basically it's NuGet.Frameworks There's probably something empty in there. |
09639d8
to
e45613c
Compare
@nkolev92 @zivkan @dominoFire This passed an internal build (https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5876410&view=results) as well as a local build in the source-build overall. Let me know if there's any more changes to make. Thanks for your help and sorry I kept getting interrupted and dragged this out so long! |
I don't have merge permissions so whenever you are happy with this it's good to go. Thanks again! |
Bug
Fixes: dotnet/source-build#2708
Regression? No
Description
This PR moves the source-build patches from 6.0 back to NuGet. The patches are:
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
There should be no changed behavior in these patches in the NuGet repo. I will test this in the source-build build specifically.
Documentation