-
Notifications
You must be signed in to change notification settings - Fork 693
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
Add support for PrunePackageReference in the new resolver #6142
Merged
Conversation
This file contains 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
microsoft-github-policy-service
bot
added
the
Status:No recent activity
PRs that have not had any recent activity and will be closed if the label is not removed
label
Nov 21, 2024
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
from
November 22, 2024 01:34
2187307
to
b866f12
Compare
microsoft-github-policy-service
bot
removed
the
Status:No recent activity
PRs that have not had any recent activity and will be closed if the label is not removed
label
Nov 22, 2024
microsoft-github-policy-service
bot
added
the
Status:No recent activity
PRs that have not had any recent activity and will be closed if the label is not removed
label
Dec 2, 2024
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
from
December 3, 2024 01:20
b866f12
to
61467e5
Compare
microsoft-github-policy-service
bot
removed
the
Status:No recent activity
PRs that have not had any recent activity and will be closed if the label is not removed
label
Dec 3, 2024
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
4 times, most recently
from
December 4, 2024 18:06
dfa9d32
to
095a289
Compare
nkolev92
changed the title
Add support for PrunedPackageReference [Supplied by Platform]
Add support for PrunedPackageReference in the new resolver
Dec 7, 2024
nkolev92
changed the title
Add support for PrunedPackageReference in the new resolver
Add support for PrunePackageReference in the new resolver
Dec 7, 2024
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
2 times, most recently
from
December 10, 2024 17:17
12cf323
to
5e25b65
Compare
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
from
December 16, 2024 21:03
19fea10
to
8c30394
Compare
nkolev92
force-pushed
the
dev-nkolev92-suppliedByPlatform
branch
from
December 17, 2024 17:29
efcb1e0
to
8ec13b9
Compare
jeffkl
reviewed
Dec 17, 2024
src/NuGet.Core/NuGet.Commands/RestoreCommand/DependencyGraphResolver.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/DependencyGraphResolver.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/DependencyGraphResolver.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/DependencyGraphResolver.cs
Outdated
Show resolved
Hide resolved
zivkan
reviewed
Dec 17, 2024
zivkan
previously approved these changes
Dec 19, 2024
src/NuGet.Core/NuGet.Commands/RestoreCommand/DependencyGraphResolver.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/LockFileBuilderCache.cs
Outdated
Show resolved
Hide resolved
jeffkl
approved these changes
Dec 19, 2024
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#7344
Description
For reference, the design is at https://github.com/NuGet/Home/blob/dev/accepted/2024/prune-package-reference.md
This PR implements the full scope of the pruning in the new resolver.
Primary functions are not downloading and skipping packages to be pruned, and not representing them as dependencies in the targets section of the framework they were skipped for.
This PR does not add a list of pruned packages anywhere, and that's intentional at this point. The design lists that as a future possibility too.
Some pointers:
DependecyGraphResolver
. As we walk the graph, if a graph item is eligible (package and lower min version than the one specified in the PrunePackageReference, we skip it). We do that by tracking the indices of the packages we skip. This is the safe way, since it preserves the index calculation for the items in the graph.At flattening time, we then skip those dependencies and we "recreate" the RemoteResolveResult dependencies section to ensure the assets file contains the correct information.
PR Checklist