Skip to content

Commit

Permalink
Keep GetPackageDetails traffic low
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Dec 22, 2015
1 parent 078ef01 commit df75ff2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### 2.37.2 - 22.12.2015
#### 2.37.3 - 22.12.2015
* PERFORMANCE: Keep traffic for GetVersions and GetPackageDetails low

#### 2.37.1 - 21.12.2015
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Core/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, stra
try
getPackageDetailsF [preferredSource] dependency.Name version
with
| _ -> getPackageDetailsF packageSources dependency.Name version
| _ -> getPackageDetailsF (List.filter (fun x -> x <> preferredSource) packageSources) dependency.Name version

let filteredDependencies = DependencySetFilter.filterByRestrictions newRestrictions packageDetails.DirectDependencies

Expand Down Expand Up @@ -351,7 +351,7 @@ let Resolve(groupName:GroupName, sources, getVersionsF, getPackageDetailsF, stra
match currentRequirement.Parent with
| PackageRequirementSource.Package(_,_,parentSource) ->
Seq.singleton (v,Some parentSource, sources)
| _ -> Seq.singleton (v,None,sources)
| _ -> Seq.singleton (v,Seq.tryHead sources,sources)

availableVersions :=
match currentRequirement.VersionRequirement.Range with
Expand Down

0 comments on commit df75ff2

Please sign in to comment.