Skip to content

Commit

Permalink
Reduce pressure from call stack - references #1392
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 15, 2016
1 parent cbbf122 commit a4c95c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.44.2 - 15.01.2016
* BUGFIX: Reduce pressure from call stack - https://github.com/fsprojects/Paket/issues/1392

#### 2.44.1 - 15.01.2016
* BUGFIX: Symbols package fix for projects that contained linked files - https://github.com/fsprojects/Paket/pull/1390

Expand Down
20 changes: 12 additions & 8 deletions src/Paket.Core/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,12 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, stra
if Seq.isEmpty compatibleVersions then
boostConflicts (filteredVersions,currentRequirement,conflictStatus)

let tryToImprove useUnlisted =
let allUnlisted = ref true
let state = ref conflictStatus
let ready = ref false
let state = ref conflictStatus
let useUnlisted = ref false
let allUnlisted = ref true

while not !ready do
let trial = ref 0
let forceBreak = ref false

Expand All @@ -461,7 +464,7 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, stra
versionsToExplore := Seq.tail !versionsToExplore
let exploredPackage = getExploredPackage(currentRequirement,versionToExplore)

if exploredPackage.Unlisted && not useUnlisted then
if exploredPackage.Unlisted && not !useUnlisted then
()
else
let newFilteredVersions = Map.add currentRequirement.Name ([versionToExplore],globalOverride) filteredVersions
Expand All @@ -478,11 +481,12 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, stra

allUnlisted := exploredPackage.Unlisted && !allUnlisted

!allUnlisted,!state
if not !useUnlisted && !allUnlisted && not (isOk()) then
useUnlisted := true
else
ready := true

match tryToImprove false with
| true,Resolution.Conflict(_) -> tryToImprove true |> snd
| _,x -> x
!state

match step (false, Map.empty, Map.empty, Set.empty, rootDependencies) with
| Resolution.Conflict(_) as conflict ->
Expand Down

0 comments on commit a4c95c3

Please sign in to comment.