diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 858f353a7a..fe4550f198 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -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 diff --git a/src/Paket.Core/PackageResolver.fs b/src/Paket.Core/PackageResolver.fs index dd68bab48d..c3f5a1b8ee 100644 --- a/src/Paket.Core/PackageResolver.fs +++ b/src/Paket.Core/PackageResolver.fs @@ -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 @@ -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 @@ -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 ->