Skip to content

Commit

Permalink
Warns when package is pinned
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinaldi committed Aug 19, 2015
1 parent c7aadd6 commit 493949f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Paket.Core/PackageResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,22 @@ let Resolve(getVersionsF, getPackageDetailsF, globalFrameworkRestrictions, rootD
exploredPackages.[(normalizedPackageName,version)] <- package
package
| _ -> package
| false,_ ->
| false,_ ->
let getPinnedVersion d =
match d.Parent with
| DependenciesFile _ ->
match d.VersionRequirement.Range with
| Specific v -> Some v
| OverrideAll v -> Some v
| _ -> None
| Package _ -> None
requirements
|> Set.filter (fun r -> NormalizedPackageName dependency.Name = NormalizedPackageName r.Name)
|> Set.map getPinnedVersion
|> Seq.choose id
|> Seq.tryHead
|> Option.iter (traceWarnfn " %O is pinned to version %O" dependency.Name)

tracefn " - %s %A" name version
let packageDetails : PackageDetails = getPackageDetailsF dependency.Sources dependency.Name version
let restrictedDependencies = DependencySetFilter.filterByRestrictions (dependency.Settings.FrameworkRestrictions @ globalFrameworkRestrictions) packageDetails.DirectDependencies
Expand Down

0 comments on commit 493949f

Please sign in to comment.