[Feature] Add package source mapping to package download#6885
Merged
Nigusu-Allehu merged 7 commits intodev-feature-package-downloadfrom Oct 31, 2025
Merged
[Feature] Add package source mapping to package download#6885Nigusu-Allehu merged 7 commits intodev-feature-package-downloadfrom
package download#6885Nigusu-Allehu merged 7 commits intodev-feature-package-downloadfrom
Conversation
Member
Author
|
I will mark this PR ready for review, once the following design spec NuGet/Home#14495 gets approved. Or will update the PR if there is design changes. |
package downloadpackage download
Member
Author
|
Also waiting on #6804 to merge first |
3 tasks
52f9b05 to
9ae9541
Compare
Base automatically changed from
dev-nyenework-packagedownload
to
dev-feature-package-download
October 28, 2025 00:58
cb7c906 to
00a03c1
Compare
e160332 to
4bd63e6
Compare
martinrrm
reviewed
Oct 29, 2025
martinrrm
reviewed
Oct 29, 2025
martinrrm
reviewed
Oct 29, 2025
martinrrm
approved these changes
Oct 30, 2025
nkolev92
reviewed
Oct 30, 2025
nkolev92
approved these changes
Oct 31, 2025
2d404a2
into
dev-feature-package-download
16 of 17 checks passed
3 tasks
aortiz-msft
reviewed
Nov 3, 2025
| null! | ||
| }; | ||
|
|
||
| // no --source, mapping -> B, allow insecure not enabled -> fail |
Collaborator
There was a problem hiding this comment.
We are missing a test with no --source, mapping -> A,B, B has latest -> retrieves the latest package from B.
| /// applying package source mapping | ||
| /// validating HTTP usage only on the *effective* sources. | ||
| /// </summary> | ||
| private static bool TryGetRepositoriesForPackage( |
Collaborator
There was a problem hiding this comment.
I'm finding this method really hard to read/maintain. There's too many nested control statements and three different code paths for a return statement. One suggestion would be to factor the foreach statement out into its own helper function. Ideally, there should be a single return statement.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#14607
Description
This PR
package downloadcommandTLDR
--sourceis specified, the command now prioritizes the provided source(s) and skips package source mapping--sourceis not specified, the command reads sources fromnuget.configand applies package source mapping to determine which source to use for each package.PR Checklist