-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use NuGet.config for restore during package testing #53837
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -45,6 +45,9 @@ | |||
<TestSupportFiles Include="$(LibrariesProjectRoot)shims\netfxreference.props"> | ||||
<DestinationFolder>$(TestToolsDir)</DestinationFolder> | ||||
</TestSupportFiles> | ||||
<TestSupportFiles Include="$(RepoRoot)NuGet.config"> | ||||
<DestinationFolder>$(TestSupportDir)</DestinationFolder> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you expecting this to be picked up by the test project as well or just by test.msbuild? The former would not see this file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There appears to be no directory in common with Helix payload structure and local structure. If this is changed to I'm debating just removing nuget.config entirely. We actually don't need to hit any feeds except nuget.org. The only place we need an additional feed is runtime/src/libraries/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets Line 4 in 54fdd26
Thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just put the NuGet.config into a central location and point to it during the restore? There is a switch available for that. I'm changing the layout slightly with #53439 so I would recommend to wait for that to go in (which hopefully will in 1-2h). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any thoughts on this NuGet.config being more than we need for package restore in testing?
In fact, we probably don't want our packages depending on things from the internal feeds. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Nope I think that's fine. We follow the same approach in the installer tests in the runtime repo (they copy the NuGet.config over and add to it).
That's right, but we don't reference any internal feeds from our NuGet.config. |
||||
</TestSupportFiles> | ||||
<TestSupportFiles Include="$(RepositoryEngineeringDir)versions.props"> | ||||
<DestinationFolder>$(TestToolsDir)eng/</DestinationFolder> | ||||
</TestSupportFiles> | ||||
|
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.
nit: why not replace the LocalPackagesPath property with RestoreAdditionalProjectSources?
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.
I think
LocalPackagesPath
is easier to remember when running package tests locally?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.
That property isn't supposed to be passed in by the user. It's already passed in and by default points to the artifacts packages dir:
runtime/src/libraries/pkg/test/testPackages.proj
Line 169 in 6058cb7
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.
Good point. For some reason I thought it was for local testing, I forgot we generated the test restore command.
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.
Specifying known properties as global properties can make them effectively readonly in the evaluation, which could break other props/targets which were trying to append to them. This was the case with RestoreSources previously. I'm inclined to keep these seperate since it's not the intent of this to specify all additional restore sources, only one that we want to add.