-
Notifications
You must be signed in to change notification settings - Fork 525
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
Selective update resolves the graph for selected package #957
Conversation
SelectiveUpdate does not resolve the whole dependency graph, hence it needs the version constraint of the dependencies in paket.lock to update paket.lock correctly.
selective update should unpin all transitive package dependencies right now. do you have a repro case? |
OK, seems you are right and we have a regression. I tested the following deps file:
with lock file:
and it didn't update after |
@@ -47,12 +47,12 @@ let ``should parse lock file``() = | |||
packages.[1].Source |> shouldEqual PackageSources.DefaultNugetSource | |||
packages.[1].Name |> shouldEqual (PackageName "Castle.Windsor-log4net") | |||
packages.[1].Version |> shouldEqual (SemVer.Parse "3.3") | |||
packages.[1].Dependencies |> shouldEqual (Set.ofList [PackageName "Castle.Windsor", VersionRequirement.AllReleases, []; PackageName "log4net", VersionRequirement.AllReleases, []]) | |||
packages.[1].Dependencies |> shouldEqual (Set.ofList [PackageName "Castle.Windsor", VersionRequirement(Minimum(SemVer.Parse "2.0"), PreReleaseStatus.No), []; PackageName "log4net", VersionRequirement(Minimum(SemVer.Parse "1.0"), PreReleaseStatus.No), []]) |
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.
why did these tests change?
This PR fixes the behavior of selective update (update specifying a package).
The current behavior is to pin the version for all packages, except the one specified, and resolve the whole graph.
This would cause the dependencies of the specified package to be pinned and the package would not be updated if it requires that one or more dependencies need to be updated as well.
For example:
Castle.Core-log4net 3.2.0
depends onCastle.Core >= 3.2.0
Castle.Core-log4net 3.3.3
depends onCastle.Core >= 3.3.3
If I try to update
Castle.Core-log4net
from3.2.0
to3.3.3
, it would not succeed becauseCastle.Core
is pinned to3.2.0
.This PR only resolve the specified package graph.