Skip to content

Commit

Permalink
Simplify resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 16, 2015
1 parent f545c3c commit c6f6af2
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/Paket.Core/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,14 @@ let calcOpenRequirements (exploredPackage:ResolvedPackage,globalFrameworkRestric
Parent = Package(dependency.Name, versionToExplore)
Settings = { dependency.Settings with FrameworkRestrictions = newRestrictions } })
|> Set.filter (fun d ->
if Set.contains d stillOpen then false else
if Set.contains d closed then false else
if closed |> Seq.exists (fun x ->
stillOpen
|> Seq.append closed
|> Seq.exists (fun x ->
x.Name = d.Name &&
(x.VersionRequirement.Range.IsIncludedIn d.VersionRequirement.Range ||
x.VersionRequirement.Range.IsGlobalOverride)) then
false
else
stillOpen |> Seq.exists (fun x ->
x.Name = d.Name &&
(x.VersionRequirement.Range.IsIncludedIn d.VersionRequirement.Range ||
x.VersionRequirement.Range.IsGlobalOverride)) |> not)
(x = d ||
x.VersionRequirement.Range.IsIncludedIn d.VersionRequirement.Range ||
x.VersionRequirement.Range.IsGlobalOverride))
|> not)
|> Set.union rest

type Resolved = {
Expand Down

0 comments on commit c6f6af2

Please sign in to comment.