From e4aca7329920031ce62094b9cdc8d77214ee04d8 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Tue, 14 Apr 2015 22:08:53 +0200 Subject: [PATCH] Fix smart install when we add a pinned version - fixes #777 --- RELEASE_NOTES.md | 3 +++ src/Paket.Core/DependencyChangeDetection.fs | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5ed1b19592..f664fba66b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +## 0.41.3 - 14.04.2015 +* BUGFIX: Fix smart install when we add a pinned version - https://github.com/fsprojects/Paket/issues/777 + #### 0.41.2 - 14.04.2015 * Trace NuGet server response in verbose mode - https://github.com/fsprojects/Paket/issues/775 diff --git a/src/Paket.Core/DependencyChangeDetection.fs b/src/Paket.Core/DependencyChangeDetection.fs index 276fe29e2d..0fea74f1dd 100644 --- a/src/Paket.Core/DependencyChangeDetection.fs +++ b/src/Paket.Core/DependencyChangeDetection.fs @@ -10,8 +10,12 @@ let findChangesInDependenciesFile(dependenciesFile:DependenciesFile,lockFile:Loc let added = dependenciesFile.DirectDependencies - |> Seq.map (fun d -> NormalizedPackageName d.Key) - |> Seq.filter (lockFile.ResolvedPackages.ContainsKey >> not) + |> Seq.map (fun d -> NormalizedPackageName d.Key,d.Value) + |> Seq.filter (fun (name,vr) -> + match lockFile.ResolvedPackages.TryFind name with + | Some p -> not (vr.IsInRange p.Version) + | _ -> true) + |> Seq.map fst |> Set.ofSeq let modified =