diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index da3820fe4c..a711636aeb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -#### 5.0.0-alpha022 - 11.05.2017 +#### 5.0.0-alpha023 - 11.05.2017 * BUGFIX: Fixed dotnetcore integration: * Paket now properly understands runtime and reference assemblies * Paket now understands the runtime graph and restores runtime dependencies diff --git a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs index a554c2733a..0faf7239ea 100644 --- a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs +++ b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ [assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")] [assembly: AssemblyVersionAttribute("5.0.0")] [assembly: AssemblyFileVersionAttribute("5.0.0")] -[assembly: AssemblyInformationalVersionAttribute("5.0.0-alpha022")] +[assembly: AssemblyInformationalVersionAttribute("5.0.0-alpha023")] namespace System { internal static class AssemblyVersionInformation { internal const System.String AssemblyTitle = "Paket.Bootstrapper"; @@ -14,6 +14,6 @@ internal static class AssemblyVersionInformation { internal const System.String AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."; internal const System.String AssemblyVersion = "5.0.0"; internal const System.String AssemblyFileVersion = "5.0.0"; - internal const System.String AssemblyInformationalVersion = "5.0.0-alpha022"; + internal const System.String AssemblyInformationalVersion = "5.0.0-alpha023"; } } diff --git a/src/Paket.Core/AssemblyInfo.fs b/src/Paket.Core/AssemblyInfo.fs index d2cd0e26a8..533b6aa53e 100644 --- a/src/Paket.Core/AssemblyInfo.fs +++ b/src/Paket.Core/AssemblyInfo.fs @@ -8,7 +8,7 @@ open System.Reflection [] [] [] -[] +[] do () module internal AssemblyVersionInformation = @@ -18,4 +18,4 @@ module internal AssemblyVersionInformation = let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories." let [] AssemblyVersion = "5.0.0" let [] AssemblyFileVersion = "5.0.0" - let [] AssemblyInformationalVersion = "5.0.0-alpha022" + let [] AssemblyInformationalVersion = "5.0.0-alpha023" diff --git a/src/Paket.Core/Dependencies/PackageResolver.fs b/src/Paket.Core/Dependencies/PackageResolver.fs index c5476a75e5..cc848f2e86 100644 --- a/src/Paket.Core/Dependencies/PackageResolver.fs +++ b/src/Paket.Core/Dependencies/PackageResolver.fs @@ -157,29 +157,35 @@ module Resolution = |> Seq.toList let buildConflictReport (errorReport:StringBuilder) (conflicts:PackageRequirement list) = + let formatVR (vr:VersionRequirement) = + vr.ToString () + |> fun s -> if String.IsNullOrWhiteSpace s then ">= 0" else s + + let formatPR hasPrereleases (vr:VersionRequirement) = + if hasPrereleases && vr.PreReleases = PreReleaseStatus.No then " (no prereleases)" else + match vr.PreReleases with + | PreReleaseStatus.Concrete [x] -> sprintf " (%s)" x + | PreReleaseStatus.Concrete x -> sprintf " %A" x + | _ -> "" + match conflicts with | [] -> errorReport | req::conflicts -> + let hasPrereleases = List.exists (fun r -> r.VersionRequirement.PreReleases <> PreReleaseStatus.No) conflicts + match req.Parent with | DependenciesFile _ -> - errorReport.AddLine (sprintf " Could not resolve package %O %O (from dependencies file):" req.Name req.VersionRequirement.Range) + errorReport.AddLine (sprintf " Dependencies file requested package %O: %s%s" req.Name (formatVR req.VersionRequirement) (formatPR hasPrereleases req.VersionRequirement)) | Package (parentName,version,_) -> - errorReport.AddLine (sprintf " Could not resolve package %O %O (from %O %O):" req.Name req.VersionRequirement.Range parentName version) - let hasPrereleases = - conflicts |> List.exists (fun r -> r.VersionRequirement.PreReleases <> PreReleaseStatus.No) - + errorReport.AddLine (sprintf " %O %O package %O: %s%s" parentName version req.Name (formatVR req.VersionRequirement) (formatPR hasPrereleases req.VersionRequirement)) + let rec loop conflicts (errorReport:StringBuilder) = match conflicts with | [] -> errorReport | hd::tl -> - let vr = - hd.VersionRequirement.ToString () - |> fun s -> if String.IsNullOrWhiteSpace s then ">= 0" else s - let pr = if hasPrereleases && hd.VersionRequirement.PreReleases = PreReleaseStatus.No then " (no prereleases)" else - match hd.VersionRequirement.PreReleases with - | PreReleaseStatus.Concrete [x] -> sprintf " (%s)" x - | PreReleaseStatus.Concrete x -> sprintf " %A" x - | _ -> "" + let vr = formatVR hd.VersionRequirement + let pr = formatPR hasPrereleases hd.VersionRequirement + match hd.Parent with | DependenciesFile _ -> loop tl (errorReport.AppendLinef " - Dependencies file requested package %O: %s%s" req.Name vr pr) diff --git a/src/Paket/AssemblyInfo.fs b/src/Paket/AssemblyInfo.fs index 60201ef545..3e44f50cc4 100644 --- a/src/Paket/AssemblyInfo.fs +++ b/src/Paket/AssemblyInfo.fs @@ -8,7 +8,7 @@ open System.Reflection [] [] [] -[] +[] do () module internal AssemblyVersionInformation = @@ -18,4 +18,4 @@ module internal AssemblyVersionInformation = let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories." let [] AssemblyVersion = "5.0.0" let [] AssemblyFileVersion = "5.0.0" - let [] AssemblyInformationalVersion = "5.0.0-alpha022" + let [] AssemblyInformationalVersion = "5.0.0-alpha023" diff --git a/tests/Paket.Tests/Resolver/ConflictGraphSpecs.fs b/tests/Paket.Tests/Resolver/ConflictGraphSpecs.fs index 6b27a7e548..4be4207423 100644 --- a/tests/Paket.Tests/Resolver/ConflictGraphSpecs.fs +++ b/tests/Paket.Tests/Resolver/ConflictGraphSpecs.fs @@ -164,7 +164,7 @@ let ``should resolve simple config with servers with RC requirement``() = |> ignore failwith "expected exception" with - | exn when exn.Message.Contains " Could not resolve package My.Company.PackageA.Server" -> () + | exn when exn.Message.Contains " package My.Company.PackageA.Server" -> () let configWithServersWithVersionRequirement = """ source https://www.nuget.org/api/v2 @@ -183,7 +183,7 @@ let ``should resolve simple config with servers with version requirement``() = |> ignore failwith "expected exception" with - | exn when exn.Message.Contains " Could not resolve package My.Company.PackageA.Server" -> () + | exn when exn.Message.Contains " package My.Company.PackageA.Server" -> () let configWithServersWithoutVersionRequirement = """