From be78f81729e24ba965dd22c8aa8a9e14985ae328 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Tue, 20 Dec 2016 16:17:55 +0100 Subject: [PATCH 1/2] If we have ref and lib files then we prefer lib - closes #2072 --- RELEASE_NOTES.md | 3 +++ src/Paket.Core/InstallModel.fs | 16 +++++++++------- src/Paket.Core/PlatformMatching.fs | 4 ++-- src/Paket/Paket.fsproj | 4 ++-- .../Paket.Tests/InstallModel/ProcessingSpecs.fs | 8 ++++---- .../System.Security.Cryptography.Algorithms.fs | 12 ++++++------ 6 files changed, 26 insertions(+), 21 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 48fbf6985e..f5bb49f404 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 3.31.6 - 20.12.2016 +* BUGFIX: If we have ref and lib files then we prefer lib + #### 3.31.5 - 19.12.2016 * BUGFIX: Don't remove group with only remote files - https://github.com/fsprojects/Paket/pull/2089 * BUGFI: Fix displayed package name for packages found in another group - https://github.com/fsprojects/Paket/pull/2088 diff --git a/src/Paket.Core/InstallModel.fs b/src/Paket.Core/InstallModel.fs index 4453533a30..971d041e7f 100644 --- a/src/Paket.Core/InstallModel.fs +++ b/src/Paket.Core/InstallModel.fs @@ -138,10 +138,14 @@ module InstallModel = Analyzers = [] LicenseUrl = None } - let getReferenceFolders (installModel: InstallModel) = - if installModel.NewReferenceFileFolders.IsEmpty then - installModel.LegacyReferenceFileFolders - else installModel.NewReferenceFileFolders + let getReferenceFolders (installModel: InstallModel) = + installModel.LegacyReferenceFileFolders @ + (installModel.NewReferenceFileFolders + |> List.choose (fun r -> + match installModel.LegacyReferenceFileFolders |> List.tryFind (fun r2 -> r2.Targets = r.Targets) with + | None -> Some r + | _ -> None)) + let extractRefFolder packageName (path:string) = let path = path.Replace("\\", "/").ToLower() @@ -420,7 +424,7 @@ type InstallModel with static member EmptyModel (packageName, packageVersion) = InstallModel.emptyModel packageName packageVersion - member this.GetReferenceFolders () = InstallModel.getReferenceFolders this + member this.GetReferenceFolders() = InstallModel.getReferenceFolders this member this.MapFolders mapfn = InstallModel.mapFolders mapfn this @@ -449,8 +453,6 @@ type InstallModel with member this.AddTargetsFile(path, file) = InstallModel.addTargetsFile path file this member this.AddTargetsFiles targetsFiles = InstallModel.addTargetsFiles targetsFiles this - - //member this.AddPackageFile (path, file, references) = InstallModel.addPackageFile path file references this member this.AddFrameworkAssemblyReference reference = InstallModel.addFrameworkAssemblyReference this reference diff --git a/src/Paket.Core/PlatformMatching.fs b/src/Paket.Core/PlatformMatching.fs index 9742719fd5..cfca3afcc2 100644 --- a/src/Paket.Core/PlatformMatching.fs +++ b/src/Paket.Core/PlatformMatching.fs @@ -107,7 +107,7 @@ let platformsSupport = let findBestMatch = - let rec findBestMatch (paths : string list,targetProfile : TargetProfile) = + let rec findBestMatch (paths : string list, targetProfile : TargetProfile) = let requiredPlatforms = match targetProfile with | PortableProfile(_, platforms) -> platforms @@ -140,7 +140,7 @@ let findBestMatch = None | _ -> None) |> List.distinct - |> List.sortBy (fun (x, pen) -> pen, (extractPlatforms x).Length) // prefer portable platform whith less platforms + |> List.sortBy (fun (x, pen) -> pen, (extractPlatforms x).Length) // prefer portable platform with less platforms |> List.map fst |> List.tryHead | path -> path diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 76f27efa0c..e8ea2232c3 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -57,8 +57,8 @@ D:\temp\repo3 install -v D:\temp\IconPacksTestApp\src - install --keep-patch - D:\temp\paket + install + D:\temp\PaketWithProblem1 11 diff --git a/tests/Paket.Tests/InstallModel/ProcessingSpecs.fs b/tests/Paket.Tests/InstallModel/ProcessingSpecs.fs index f66d69398c..2242a5b81a 100644 --- a/tests/Paket.Tests/InstallModel/ProcessingSpecs.fs +++ b/tests/Paket.Tests/InstallModel/ProcessingSpecs.fs @@ -71,13 +71,13 @@ let ``should understand reference folder``() = let refs = model.GetLibReferences(SinglePlatform (DotNetStandard DotNetStandardVersion.V1_6)) refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\runtimes\win\lib\net46\System.Security.Cryptography.Algorithms.dll" - refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\lib\netstandard1.6\System.Security.Cryptography.Algorithms.dll" - refs |> shouldContain @"..\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll" + refs |> shouldContain @"..\System.Security.Cryptography.Algorithms\lib\netstandard1.6\System.Security.Cryptography.Algorithms.dll" + refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll" let refs = model.GetLibReferences(SinglePlatform (DotNetFramework FrameworkVersion.V4_6_3)) refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\runtimes\win\lib\net46\System.Security.Cryptography.Algorithms.dll" - refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\lib\netstandard1.6\System.Security.Cryptography.Algorithms.dll" - refs |> shouldContain @"..\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll" + refs |> shouldContain @"..\System.Security.Cryptography.Algorithms\lib\netstandard1.6\System.Security.Cryptography.Algorithms.dll" + refs |> shouldNotContain @"..\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll" [] let ``should understand aot in runtimes``() = diff --git a/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs b/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs index cc1ec4a906..92fa7d18ff 100644 --- a/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs +++ b/tests/Paket.Tests/InstallModel/Xml/System.Security.Cryptography.Algorithms.fs @@ -11,8 +11,8 @@ let expected = """ - ..\..\..\System.Security.Cryptography.Algorithms\ref\net46\System.Security.Cryptography.Algorithms.dll - False + ..\..\..\System.Security.Cryptography.Algorithms\lib\net46\System.Security.Cryptography.Algorithms.dll + True True @@ -20,8 +20,8 @@ let expected = """ - ..\..\..\System.Security.Cryptography.Algorithms\ref\net461\System.Security.Cryptography.Algorithms.dll - False + ..\..\..\System.Security.Cryptography.Algorithms\lib\net461\System.Security.Cryptography.Algorithms.dll + True True @@ -29,8 +29,8 @@ let expected = """ - ..\..\..\System.Security.Cryptography.Algorithms\ref\net463\System.Security.Cryptography.Algorithms.dll - False + ..\..\..\System.Security.Cryptography.Algorithms\lib\net463\System.Security.Cryptography.Algorithms.dll + True True From 101e841c286456b7cd2521963c7ff360fb4a14f4 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Tue, 20 Dec 2016 16:34:20 +0100 Subject: [PATCH 2/2] Bump version to 3.31.6 --- docs/content/paket-push.md | 10 +++++++--- src/Paket.Bootstrapper/Properties/AssemblyInfo.cs | 12 ++++++------ src/Paket.Core/AssemblyInfo.fs | 12 ++++++------ src/Paket.PowerShell/AssemblyInfo.fs | 12 ++++++------ src/Paket/AssemblyInfo.fs | 12 ++++++------ 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/docs/content/paket-push.md b/docs/content/paket-push.md index 14c811ceaf..a82f7e400d 100644 --- a/docs/content/paket-push.md +++ b/docs/content/paket-push.md @@ -9,13 +9,17 @@ OPTIONS: url Url of the NuGet feed. file Path to the package. - apikey Optionally specify your API key on the command line. Otherwise uses the value of the `nugetkey` environment variable. - endpoint Optionally specify a custom api endpoint to push to. Defaults to `/api/v2/package`. + apikey Optionally specify your API key on the command line. + Otherwise uses the value of the `nugetkey` + environment variable. + endpoint Optionally specify a custom api endpoint to push to. + Defaults to `/api/v2/package`. --verbose, -v Enable verbose console output for the paket process. --log-file Specify a log file for the paket process. --silent, -s Suppress console output for the paket process. --version Display the version. - --from-bootstrapper Call comming from the '--run' feature of the bootstrapper. + --from-bootstrapper Call comming from the '--run' feature of the + bootstrapper. --help display this list of options. If you add the `-v` flag, then Paket will run in verbose mode and show detailed information. diff --git a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs index 2439549980..f943e7bfe2 100644 --- a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs +++ b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs @@ -4,16 +4,16 @@ [assembly: AssemblyTitleAttribute("Paket.Bootstrapper")] [assembly: AssemblyProductAttribute("Paket")] [assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")] -[assembly: AssemblyVersionAttribute("3.31.5")] -[assembly: AssemblyFileVersionAttribute("3.31.5")] -[assembly: AssemblyInformationalVersionAttribute("3.31.5")] +[assembly: AssemblyVersionAttribute("3.31.6")] +[assembly: AssemblyFileVersionAttribute("3.31.6")] +[assembly: AssemblyInformationalVersionAttribute("3.31.6")] namespace System { internal static class AssemblyVersionInformation { internal const System.String AssemblyTitle = "Paket.Bootstrapper"; internal const System.String AssemblyProduct = "Paket"; internal const System.String AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."; - internal const System.String AssemblyVersion = "3.31.5"; - internal const System.String AssemblyFileVersion = "3.31.5"; - internal const System.String AssemblyInformationalVersion = "3.31.5"; + internal const System.String AssemblyVersion = "3.31.6"; + internal const System.String AssemblyFileVersion = "3.31.6"; + internal const System.String AssemblyInformationalVersion = "3.31.6"; } } diff --git a/src/Paket.Core/AssemblyInfo.fs b/src/Paket.Core/AssemblyInfo.fs index e8269900af..4fc2b40a04 100644 --- a/src/Paket.Core/AssemblyInfo.fs +++ b/src/Paket.Core/AssemblyInfo.fs @@ -6,9 +6,9 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = @@ -16,6 +16,6 @@ module internal AssemblyVersionInformation = let [] AssemblyProduct = "Paket" let [] AssemblyCompany = "Paket team" let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories." - let [] AssemblyVersion = "3.31.5" - let [] AssemblyFileVersion = "3.31.5" - let [] AssemblyInformationalVersion = "3.31.5" + let [] AssemblyVersion = "3.31.6" + let [] AssemblyFileVersion = "3.31.6" + let [] AssemblyInformationalVersion = "3.31.6" diff --git a/src/Paket.PowerShell/AssemblyInfo.fs b/src/Paket.PowerShell/AssemblyInfo.fs index 064c6aa049..b3fc6d0dc1 100644 --- a/src/Paket.PowerShell/AssemblyInfo.fs +++ b/src/Paket.PowerShell/AssemblyInfo.fs @@ -6,9 +6,9 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = @@ -16,6 +16,6 @@ module internal AssemblyVersionInformation = let [] AssemblyProduct = "Paket" let [] AssemblyCompany = "Paket team" let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories." - let [] AssemblyVersion = "3.31.5" - let [] AssemblyFileVersion = "3.31.5" - let [] AssemblyInformationalVersion = "3.31.5" + let [] AssemblyVersion = "3.31.6" + let [] AssemblyFileVersion = "3.31.6" + let [] AssemblyInformationalVersion = "3.31.6" diff --git a/src/Paket/AssemblyInfo.fs b/src/Paket/AssemblyInfo.fs index 3da09e3deb..58c18e47aa 100644 --- a/src/Paket/AssemblyInfo.fs +++ b/src/Paket/AssemblyInfo.fs @@ -6,9 +6,9 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = @@ -16,6 +16,6 @@ module internal AssemblyVersionInformation = let [] AssemblyProduct = "Paket" let [] AssemblyCompany = "Paket team" let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories." - let [] AssemblyVersion = "3.31.5" - let [] AssemblyFileVersion = "3.31.5" - let [] AssemblyInformationalVersion = "3.31.5" + let [] AssemblyVersion = "3.31.6" + let [] AssemblyFileVersion = "3.31.6" + let [] AssemblyInformationalVersion = "3.31.6"