Skip to content

Commit

Permalink
Force resolver to look into deeper levels - fixes #1520
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Mar 16, 2016
1 parent 579a2e7 commit 355708f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#### 2.52.9 - 16.03.2016
* USABILITY: Improved error message when paket.dependencies can't be found - https://github.com/fsprojects/Paket/pull/1519
* BUGFIX: Force resolver to look into deeper levels - https://github.com/fsprojects/Paket/issues/1520

#### 2.52.8 - 15.03.2016
* USABILITY: Better error message when paket.lock an paket.dependencies are out of sync.
Expand Down
7 changes: 5 additions & 2 deletions integrationtests/Paket.IntegrationTests/UpdatePackageSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ let ``#1432 update doesn't throw Stackoverflow``() =
directPaket "pack templatefile paket.D.template version 1.0.0-prerelease output bin" scenario |> ignore
directPaket "update" scenario|> ignore


[<Test>]
let ``#1500 don't detect framework twice``() =
update "i001500-auto-detect" |> ignore
Expand All @@ -123,4 +122,8 @@ let ``#1500 don't detect framework twice``() =

[<Test>]
let ``#1501 download succeeds``() =
update "i001510-download" |> ignore
update "i001510-download" |> ignore

[<Test>]
let ``#1520 update with pinned dependency succeeds``() =
update "i001520-pinned-error" |> ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source https://nuget.org/api/v2
nuget Microsoft.ApplicationInsights.WindowsServer = 1.2.3
14 changes: 8 additions & 6 deletions src/Paket.Core/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,14 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, glob

let newResolution = Map.add exploredPackage.Name exploredPackage currentResolution

state := step (relax,newFilteredVersions,newResolution,Set.add currentRequirement closedRequirements,newOpen)
match !state with
| Resolution.Conflict (_,_,stillOpen,_,_)
when stillOpen |> Set.exists (fun r -> r = currentRequirement || r.Graph |> List.contains currentRequirement) |> not ->
forceBreak := true
| _ -> ()
let newClosed = Set.add currentRequirement closedRequirements

state := step (relax,newFilteredVersions,newResolution,newClosed,newOpen)
// match !state with
// | Resolution.Conflict(resolved,closed,stillOpen,lastPackageRequirement,getVersionF)
// when stillOpen |> Set.exists (fun r -> r = currentRequirement || r.Graph |> List.contains currentRequirement) |> not ->
// forceBreak := true
// | _ -> ()

allUnlisted := exploredPackage.Unlisted && !allUnlisted

Expand Down
4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</DocumentationFile>
<StartAction>Project</StartAction>
<StartProgram>paket.exe</StartProgram>
<StartArguments>install</StartArguments>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001427-content-once-remove\temp</StartWorkingDirectory>
<StartArguments>update</StartArguments>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001520-pinned-error\temp</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down

0 comments on commit 355708f

Please sign in to comment.