diff --git a/src/Paket.Core/PackageResolver.fs b/src/Paket.Core/PackageResolver.fs index a2e6fc90ba..21092383ed 100644 --- a/src/Paket.Core/PackageResolver.fs +++ b/src/Paket.Core/PackageResolver.fs @@ -223,6 +223,25 @@ let Resolve(getVersionsF, getPackageDetailsF, globalFrameworkRestrictions, rootD package | _ -> package | false,_ -> + let warnPinned v = + match v with + | Some v -> traceWarnfn " %O is pinned to version %O" dependency.Name v + | None -> () + 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 + |> warnPinned + tracefn " - %s %A" name version let packageDetails : PackageDetails = getPackageDetailsF dependency.Sources dependency.Name version let restrictedDependencies = DependencySetFilter.filterByRestrictions (dependency.Settings.FrameworkRestrictions @ globalFrameworkRestrictions) packageDetails.DirectDependencies