Skip to content

Selective update resolves the graph for selected package - #957

Merged
forki merged 12 commits into
fsprojects:masterfrom
mrinaldi:selective_update
Aug 4, 2015
Merged

Selective update resolves the graph for selected package#957
forki merged 12 commits into
fsprojects:masterfrom
mrinaldi:selective_update

Conversation

@mrinaldi

@mrinaldi mrinaldi commented Aug 3, 2015

Copy link
Copy Markdown
Contributor

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 on Castle.Core >= 3.2.0
Castle.Core-log4net 3.3.3 depends on Castle.Core >= 3.3.3

If I try to update Castle.Core-log4net from 3.2.0 to 3.3.3, it would not succeed because Castle.Core is pinned to 3.2.0.

This PR only resolve the specified package graph.

@forki

forki commented Aug 4, 2015

Copy link
Copy Markdown
Member

selective update should unpin all transitive package dependencies right now. do you have a repro case?

@forki

forki commented Aug 4, 2015

Copy link
Copy Markdown
Member

OK, seems you are right and we have a regression.

I tested the following deps file:

source https://nuget.org/api/v2

nuget Castle.Core-log4net

with lock file:

NUGET
  remote: https://nuget.org/api/v2
  specs:
    Castle.Core (3.2.0)
    Castle.Core-log4net (3.2.0)
      Castle.Core (>= 3.2.0)
      log4net (1.2.10)
    log4net (1.2.10)

and it didn't update after paket update nuget Castle.Core-log4net. That is weird. I will now look into your PR.

Copy link
Copy Markdown
Member

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?

@forki

forki commented Aug 4, 2015

Copy link
Copy Markdown
Member

mhm from looking at the existing code I'm not that sure anymore that this worked before. maybe it only worked in my dreams.

so:

hug

@forki
forki merged commit 501a4dd into fsprojects:master Aug 4, 2015
@mrinaldi
mrinaldi deleted the selective_update branch August 4, 2015 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants