From 2390168e7ceba38416fb453f5a8a342f9ba99a90 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 10:34:32 +0100 Subject: [PATCH 01/12] Create regression test for #140 --- .../FrameworkRestrictionsSpecs.fs | 17 +++++++++++++++++ .../Paket.IntegrationTests.fsproj | 1 + .../before/paket.dependencies | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 integrationtests/Paket.IntegrationTests/FrameworkRestrictionsSpecs.fs create mode 100644 integrationtests/scenarios/i000140-resolve-framework-restrictions/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/FrameworkRestrictionsSpecs.fs b/integrationtests/Paket.IntegrationTests/FrameworkRestrictionsSpecs.fs new file mode 100644 index 0000000000..71000845ae --- /dev/null +++ b/integrationtests/Paket.IntegrationTests/FrameworkRestrictionsSpecs.fs @@ -0,0 +1,17 @@ +module Paket.IntegrationTests.FrameworkRestrictionsSpecs + +open Fake +open Paket +open System +open NUnit.Framework +open FsUnit +open System +open System.IO +open Paket.Domain +open Paket.Requirements + +[] +let ``#140 windsor should resolve framework dependent dependencies``() = + let lockFile = update "i000140-resolve-framework-restrictions" + lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "TaskParallelLibrary"].Settings.FrameworkRestrictions + |> shouldEqual [FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V3_5))] \ No newline at end of file diff --git a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj index b0aa420d85..0c263e7449 100644 --- a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj +++ b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj @@ -85,6 +85,7 @@ + diff --git a/integrationtests/scenarios/i000140-resolve-framework-restrictions/before/paket.dependencies b/integrationtests/scenarios/i000140-resolve-framework-restrictions/before/paket.dependencies new file mode 100644 index 0000000000..89e7883653 --- /dev/null +++ b/integrationtests/scenarios/i000140-resolve-framework-restrictions/before/paket.dependencies @@ -0,0 +1,15 @@ +source http://nuget.org/api/v2 + +# Core Dependencies +nuget FParsec ~> 1.0.1 +nuget FSharp.Core.Microsoft.Signed ~> 3.1.1 +nuget MathNet.Numerics.FSharp ~> 3.2.1 + +# Development Dependencies +nuget FsUnit ~> 1.3 + +# Tools +nuget FAKE ~> 3.5 +nuget NUnit.Runners ~> 2.6 +nuget FSharp.Formatting !~> 2.4 +nuget NuGet.CommandLine \ No newline at end of file From f017fb3e9a41232cd1f28ad3cd749c39941fe03b Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 11:09:46 +0100 Subject: [PATCH 02/12] Create regression test for #183 --- .../Paket.IntegrationTests/GroupSpecs.fs | 2 +- .../Paket.IntegrationTests/InitSpecs.fs | 2 +- .../Paket.IntegrationTests/OutdatedSpecs.fs | 27 +++++++++++++++++++ .../Paket.IntegrationTests.fsproj | 15 ++++++----- .../SemVerUpdateSpecs.fs | 6 ++--- .../Paket.IntegrationTests/TestHelper.fs | 3 ++- .../before/paket.dependencies | 4 +++ .../before/paket.lock | 13 +++++++++ paket.lock | 6 ++--- 9 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs create mode 100644 integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.dependencies create mode 100644 integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.lock diff --git a/integrationtests/Paket.IntegrationTests/GroupSpecs.fs b/integrationtests/Paket.IntegrationTests/GroupSpecs.fs index d1e9a91392..817698ba27 100644 --- a/integrationtests/Paket.IntegrationTests/GroupSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/GroupSpecs.fs @@ -10,7 +10,7 @@ open System.Diagnostics [] let ``#1018 should resolve Newtonsoft.Json from two groups``() = - update "i001018-legacy-groups" + update "i001018-legacy-groups" |> ignore let path = scenarioTempPath "i001018-legacy-groups" File.Exists(Path.Combine(path,"packages","Newtonsoft.Json","Newtonsoft.Json.7.0.1.nupkg")) diff --git a/integrationtests/Paket.IntegrationTests/InitSpecs.fs b/integrationtests/Paket.IntegrationTests/InitSpecs.fs index ce53d30490..beffb80b91 100644 --- a/integrationtests/Paket.IntegrationTests/InitSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/InitSpecs.fs @@ -10,7 +10,7 @@ open System.Diagnostics [] let ``#1040 init should download release version of bootstrapper``() = - paket "init" "i001040-init-downloads-bootstrapper" + paket "init" "i001040-init-downloads-bootstrapper" |> ignore let bootstrapperPath = Path.Combine(scenarioTempPath "i001040-init-downloads-bootstrapper",".paket","paket.bootstrapper.exe") let productVersion = FileVersionInfo.GetVersionInfo(bootstrapperPath).ProductVersion diff --git a/integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs b/integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs new file mode 100644 index 0000000000..04f621512f --- /dev/null +++ b/integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs @@ -0,0 +1,27 @@ +module Paket.IntegrationTests.OutdatedSpecs + +open Fake +open System +open NUnit.Framework +open FsUnit +open System +open System.IO +open System.Diagnostics + +[] +let ``#183 outdated without params``() = + let msg = paket "outdated" "i000183-outdated-with-special-parameters" + msg |> shouldContainText "Newtonsoft.Json 6.0.7 -> 6.0.8" + msg |> shouldContainText "FSharp.Formatting 2.4 ->" + +[] +let ``#183 outdated --ignore-constraint``() = + let msg = paket "outdated --ignore-constraints" "i000183-outdated-with-special-parameters" + msg.Contains("Newtonsoft.Json 6.0.7 -> 6.0.8") |> shouldEqual false + + +[] +let ``#183 outdated --include-prereleases``() = + let msg = paket "outdated --include-prereleases" "i000183-outdated-with-special-parameters" + msg |> shouldContainText "Newtonsoft.Json 6.0.7 ->" + msg.Contains("Newtonsoft.Json 6.0.7 -> 6.0.8") |> shouldEqual false \ No newline at end of file diff --git a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj index 0c263e7449..2df8163a50 100644 --- a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj +++ b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj @@ -84,6 +84,7 @@ + @@ -103,6 +104,13 @@ + + + Paket.Core + {7bab0ae2-089f-4761-b138-a717aa2f86c5} + True + + @@ -175,11 +183,4 @@ True - - - Paket.Core - {7bab0ae2-089f-4761-b138-a717aa2f86c5} - True - - \ No newline at end of file diff --git a/integrationtests/Paket.IntegrationTests/SemVerUpdateSpecs.fs b/integrationtests/Paket.IntegrationTests/SemVerUpdateSpecs.fs index f6a99a3452..d4964cb27d 100644 --- a/integrationtests/Paket.IntegrationTests/SemVerUpdateSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/SemVerUpdateSpecs.fs @@ -11,7 +11,7 @@ open Paket.Domain [] let ``#1125 Should keep minor versions``() = - paket "update --keep-minor" "i001125-update-and-keep-minor" + paket "update --keep-minor" "i001125-update-and-keep-minor" |> ignore let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock")) let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version v.Major |> shouldEqual 2u @@ -20,7 +20,7 @@ let ``#1125 Should keep minor versions``() = [] let ``#1125 Should keep major versions``() = - paket "update --keep-major" "i001125-update-and-keep-minor" + paket "update --keep-major" "i001125-update-and-keep-minor" |> ignore let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock")) let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version v.Major |> shouldEqual 2u @@ -28,7 +28,7 @@ let ``#1125 Should keep major versions``() = [] let ``#1125 Should keep patch versions``() = - paket "update --keep-patch" "i001125-update-and-keep-minor" + paket "update --keep-patch" "i001125-update-and-keep-minor" |> ignore let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock")) let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version v.Major |> shouldEqual 2u diff --git a/integrationtests/Paket.IntegrationTests/TestHelper.fs b/integrationtests/Paket.IntegrationTests/TestHelper.fs index 0d110b9685..084f7932ef 100644 --- a/integrationtests/Paket.IntegrationTests/TestHelper.fs +++ b/integrationtests/Paket.IntegrationTests/TestHelper.fs @@ -27,9 +27,10 @@ let paket command scenario = if result.ExitCode <> 0 then let errors = String.Join(Environment.NewLine,result.Errors) failwith errors + String.Join(Environment.NewLine,result.Messages) let update scenario = - paket "update" scenario + paket "update" scenario |> ignore LockFile.LoadFrom(Path.Combine(scenarioTempPath scenario,"paket.lock")) let updateShouldFindPackageConflict packageName scenario = diff --git a/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.dependencies b/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.dependencies new file mode 100644 index 0000000000..b0017ad9bb --- /dev/null +++ b/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.dependencies @@ -0,0 +1,4 @@ +source http://nuget.org/api/v2 + +nuget FSharp.Formatting ~> 2.4 +nuget Newtonsoft.Json ~> 6.0.7 \ No newline at end of file diff --git a/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.lock b/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.lock new file mode 100644 index 0000000000..b89f35babb --- /dev/null +++ b/integrationtests/scenarios/i000183-outdated-with-special-parameters/before/paket.lock @@ -0,0 +1,13 @@ +NUGET + remote: http://nuget.org/api/v2 + specs: + FSharp.Compiler.Service (1.4.2.1) + FSharp.Formatting (2.4) + FSharp.Compiler.Service (>= 0.0.20) + Microsoft.AspNet.Razor (>= 2.0.30506.0) + RazorEngine (>= 3.3.0) + Microsoft.AspNet.Razor (3.2.3) + Newtonsoft.Json (6.0.7) + RazorEngine (3.7.3) + Microsoft.AspNet.Razor (>= 3.0.0) - framework: >= net45 + Microsoft.AspNet.Razor (2.0.30506.0) - framework: net40 diff --git a/paket.lock b/paket.lock index 51914a1994..9e0d97c38d 100644 --- a/paket.lock +++ b/paket.lock @@ -7,7 +7,7 @@ NUGET GITHUB remote: fsharp/FAKE specs: - src/app/FakeLib/Globbing/Globbing.fs (0cedad490fa06bd072823b2215f3f05cf917a7ba) + src/app/FakeLib/Globbing/Globbing.fs (494c549c61dc15ab798b7b92cb4ac6e981267f49) remote: fsprojects/Chessie specs: src/Chessie/ErrorHandling.fs (1f23b1caeb1f87e750abc96a25109376771dd090) @@ -34,7 +34,7 @@ NUGET GITHUB remote: fsharp/FAKE specs: - modules/Octokit/Octokit.fsx (0cedad490fa06bd072823b2215f3f05cf917a7ba) + modules/Octokit/Octokit.fsx (494c549c61dc15ab798b7b92cb4ac6e981267f49) Octokit GROUP Test NUGET @@ -45,4 +45,4 @@ NUGET GITHUB remote: forki/FsUnit specs: - FsUnit.fs (81d27fd09575a32c4ed52eadb2eeac5f365b8348) \ No newline at end of file + FsUnit.fs (2b809d33e4a06da78babd838abc817dd559c9c41) \ No newline at end of file From e49610c05d208045abd07b530bfe000e5d34afba Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 13:09:18 +0100 Subject: [PATCH 03/12] Create regression tests for #220 --- .../Paket.IntegrationTests/BasicResolverSpecs.fs | 6 ++++++ .../before/paket.dependencies | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 integrationtests/scenarios/i000220-use-exactly-this-constraint/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs index ef974fe93d..55015c22ae 100644 --- a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs @@ -64,6 +64,12 @@ let ``#173 should resolve primary dependency optimistic``() = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version |> shouldEqual (SemVer.Parse "2.12.0") +[] +let ``#220 should respect the == operator``() = + let lockFile = update "i000220-use-exactly-this-constraint" + lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.AspNet.Razor"].Version + |> shouldEqual (SemVer.Parse "2.0.30506.0") + [] let ``#1177 should resolve with pessimistic strategy correctly``() = let lockFile = update "i001177-resolve-with-pessimistic-strategy" diff --git a/integrationtests/scenarios/i000220-use-exactly-this-constraint/before/paket.dependencies b/integrationtests/scenarios/i000220-use-exactly-this-constraint/before/paket.dependencies new file mode 100644 index 0000000000..ecbb73e614 --- /dev/null +++ b/integrationtests/scenarios/i000220-use-exactly-this-constraint/before/paket.dependencies @@ -0,0 +1,10 @@ +source http://nuget.org/api/v2 + +nuget FAKE +nuget FSharp.Compiler.Service +nuget CommandLineParser 1.9.71 +nuget Microsoft.AspNet.Razor == 2.0.30506.0 +nuget RazorEngine.N 3.5.0 +nuget NUnit +nuget NUnit.Runners +nuget NuGet.CommandLine \ No newline at end of file From ab11eebe498a8896741806acc4c6563462f5c627 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 13:17:00 +0100 Subject: [PATCH 04/12] Create regression tests for #263 --- .../Paket.IntegrationTests/BasicResolverSpecs.fs | 6 ++++++ .../i000263-semver-prereleases/before/paket.dependencies | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 integrationtests/scenarios/i000263-semver-prereleases/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs index 55015c22ae..003a45cd49 100644 --- a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs @@ -70,6 +70,12 @@ let ``#220 should respect the == operator``() = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.AspNet.Razor"].Version |> shouldEqual (SemVer.Parse "2.0.30506.0") +[] +let ``#263 should respect SemVer prereleases``() = + let lockFile = update "i000263-semver-prereleases" + lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Ninject"].Version + |> shouldEqual (SemVer.Parse "3.2.3-unstable-001") + [] let ``#1177 should resolve with pessimistic strategy correctly``() = let lockFile = update "i001177-resolve-with-pessimistic-strategy" diff --git a/integrationtests/scenarios/i000263-semver-prereleases/before/paket.dependencies b/integrationtests/scenarios/i000263-semver-prereleases/before/paket.dependencies new file mode 100644 index 0000000000..4b05ba27dd --- /dev/null +++ b/integrationtests/scenarios/i000263-semver-prereleases/before/paket.dependencies @@ -0,0 +1,3 @@ +source http://nuget.org/api/v2 + +nuget Ninject == 3.2.3-unstable-001 \ No newline at end of file From 663d5673e44d6ad17919e57790b04212a72c336d Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 13:39:52 +0100 Subject: [PATCH 05/12] Save nCrunch settings --- .../Paket.IntegrationTests.v2.ncrunchproject | Bin 0 -> 3014 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.v2.ncrunchproject diff --git a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.v2.ncrunchproject b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.v2.ncrunchproject new file mode 100644 index 0000000000000000000000000000000000000000..ddaf8800c8b10457ebb523f19c4022613ac1c9c6 GIT binary patch literal 3014 zcmb_e!A{#i5S=qp|Dk6NlwK;NMwVQl5(h*?f_mW+90y!t8`%zppKtr#Y?iUH19pNe zONn=9-kaGsGyCuFNXAk~F25y~NGdtT?@Shw$gQlfGQ+n-zXkG1_T)33k^I0~B1@U8 zHP;LLujE+*`6`F{jO5Fk`^+0LA7Fb44hy^m-VAJF_z$JT6H6*Lz)SF}lqvTAQp|h& zdjLo74PZON9_}XgM|o}X%-}x(FS0ySmdsZK+?B38Vr7cAL^eugKL#ttkYL|!C(GS^ z8b_XH3^qAX=e;u;fNg;YT;{g*VJt#0AcsG4f^*HlB}M#^o(Xg3R7Omm9aVRSuaVrp zWU0<)cW+(HCct&-9>S}sF=Mu!w=Q1H4RaJ~-j>K8wNti~W7wN5%>Nm*mubyVpLgn! zb}8zI3TDN*>gSgw{#SU3{<^Mq@nn21p|(uBM_lU?r^5OnlXkp)EZY8ac&Y{>ylrC` zu1+42%Ur9U+47ySk_o;=c-RX{^rn^81oK(f_O?EZ1-lSqWc{Y=>@~aQYs`KYhTu86 zlbIl1YRUDp3q;mNYgWl{d&90*K`f{8ga{)<>Zj5aJQy|gQqSuUJ3~8xC+eO($yGFa z(uJzBK%}mxHIe$-7z*?6CI;)g-Z|P6u+%BjHSOxrevC(B$e4JB)NJ)K&wQ?__6qs_ zwx0BdI&b^g7{(ROtX}(WCUoCCIM0Xd-;6RwMC|$t?S(0#=6yUe4D>=^#8P)h~0!T#)Z$Xgh1H=$-d$3!)a8u$0C4ecC?^EVVu0($3N zA=H~x0bJijyfTSSn^1GLoxS1v4(aZWIihtPa&zQQas;h0*5S5>8zRQJ=GEP2XHddV z{O7E5cgkiJ1#*Dr8f#?8I}Go*oDJ8qkLLjI_w^pP^9Ji#ZIz6NqmnT#or3z@%l`wM CxFwVT literal 0 HcmV?d00001 From c71f9b1096a002da2c82710de7d9f6835d595772 Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Fri, 30 Oct 2015 13:43:25 +0100 Subject: [PATCH 06/12] search for paket.references in startup directory search for paket.references in startup diretory if there is no such file in the project folder. this makes it possible to use the auto-restore feature too (e.g. building with visual studio) --- .paket/paket.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/.paket/paket.targets b/.paket/paket.targets index cef47deebc..f8e5cb42f5 100644 --- a/.paket/paket.targets +++ b/.paket/paket.targets @@ -20,6 +20,7 @@ $(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(MSBuildProjectDirectory)\paket.references + $(MSBuildStartupDirectory)\paket.references $(MSBuildProjectFullPath).paket.references $(PaketCommand) restore --references-files "$(PaketReferences)" $(PaketBootStrapperCommand) From 03a71e6979abd2b5eb6b37dd804d13a30f1f2244 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 13:49:49 +0100 Subject: [PATCH 07/12] Create regression tests for #299 --- .../Paket.IntegrationTests/BasicResolverSpecs.fs | 9 +++++++++ .../before/paket.dependencies | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 integrationtests/scenarios/i000299-restore-package-that-ends-in-lib/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs index 003a45cd49..adf3ece869 100644 --- a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs @@ -76,6 +76,15 @@ let ``#263 should respect SemVer prereleases``() = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Ninject"].Version |> shouldEqual (SemVer.Parse "3.2.3-unstable-001") +[] +let ``#299 should restore package ending in lib``() = + let lockFile = update "i000299-restore-package-that-ends-in-lib" + lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FunScript.TypeScript.Binding.lib"].Version + |> shouldBeGreaterThan (SemVer.Parse "0") + + Directory.Exists(Path.Combine(scenarioTempPath "i000299-restore-package-that-ends-in-lib","packages","FunScript.TypeScript.Binding.lib")) + |> shouldEqual true + [] let ``#1177 should resolve with pessimistic strategy correctly``() = let lockFile = update "i001177-resolve-with-pessimistic-strategy" diff --git a/integrationtests/scenarios/i000299-restore-package-that-ends-in-lib/before/paket.dependencies b/integrationtests/scenarios/i000299-restore-package-that-ends-in-lib/before/paket.dependencies new file mode 100644 index 0000000000..0a1a4f6d1d --- /dev/null +++ b/integrationtests/scenarios/i000299-restore-package-that-ends-in-lib/before/paket.dependencies @@ -0,0 +1,3 @@ +source http://nuget.org/api/v2 + +nuget FunScript.TypeScript.Binding.lib \ No newline at end of file From 8587119c77e0db98763ebdfcbe31863f3d0d96fb Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Fri, 30 Oct 2015 14:03:29 +0100 Subject: [PATCH 08/12] import paket.targets fixes visual studio compiling a clean visual studio build will be failed without the paket.targets --- tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj index 6d6e28c191..6472d885bf 100644 --- a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj +++ b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj @@ -41,6 +41,7 @@ + @@ -57,4 +58,4 @@ True - \ No newline at end of file + From 73a1a26e25395fe688a306c886fce220486e0551 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 14:03:30 +0100 Subject: [PATCH 09/12] Create regression tests for #310 --- .../Paket.IntegrationTests/AddSpecs.fs | 19 +++++++++++++++++++ .../Paket.IntegrationTests.fsproj | 1 + .../before/paket.dependencies | 3 +++ .../before/paket.lock | 4 ++++ 4 files changed, 27 insertions(+) create mode 100644 integrationtests/Paket.IntegrationTests/AddSpecs.fs create mode 100644 integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.dependencies create mode 100644 integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.lock diff --git a/integrationtests/Paket.IntegrationTests/AddSpecs.fs b/integrationtests/Paket.IntegrationTests/AddSpecs.fs new file mode 100644 index 0000000000..ed959ffd4b --- /dev/null +++ b/integrationtests/Paket.IntegrationTests/AddSpecs.fs @@ -0,0 +1,19 @@ +module Paket.IntegrationTests.AddSpecs + +open Fake +open System +open NUnit.Framework +open FsUnit +open System +open System.IO +open System.Diagnostics +open Paket +open Paket.Domain + +[] +let ``#310 paket add nuget should not resolve inconsistent dependency graph``() = + try + paket "add nuget Castle.Windsor version 3.3.0" "i000310-add-should-not-create-invalid-resolution" |> ignore + failwith "resolver error expected" + with + | exn when exn.Message.Contains("There was a version conflict during package resolution") -> () \ No newline at end of file diff --git a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj index 2df8163a50..249bebba97 100644 --- a/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj +++ b/integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj @@ -84,6 +84,7 @@ + diff --git a/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.dependencies b/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.dependencies new file mode 100644 index 0000000000..c1f6f95b43 --- /dev/null +++ b/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.dependencies @@ -0,0 +1,3 @@ +source http://nuget.org/api/v2 + +nuget Castle.Core >= 3.2 < 3.3 \ No newline at end of file diff --git a/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.lock b/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.lock new file mode 100644 index 0000000000..b30a957e91 --- /dev/null +++ b/integrationtests/scenarios/i000310-add-should-not-create-invalid-resolution/before/paket.lock @@ -0,0 +1,4 @@ +NUGET + remote: http://nuget.org/api/v2 + specs: + Castle.Core (3.2.2) From 3af84b31cf7ac8caa8f98d3c423206a4560905e3 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 14:05:37 +0100 Subject: [PATCH 10/12] show better error on integration test fail --- integrationtests/Paket.IntegrationTests/TestHelper.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/integrationtests/Paket.IntegrationTests/TestHelper.fs b/integrationtests/Paket.IntegrationTests/TestHelper.fs index 084f7932ef..ddf6bf8d42 100644 --- a/integrationtests/Paket.IntegrationTests/TestHelper.fs +++ b/integrationtests/Paket.IntegrationTests/TestHelper.fs @@ -26,6 +26,7 @@ let paket command scenario = info.Arguments <- command) (System.TimeSpan.FromMinutes 5.) if result.ExitCode <> 0 then let errors = String.Join(Environment.NewLine,result.Errors) + printfn "%s" <| String.Join(Environment.NewLine,result.Messages) failwith errors String.Join(Environment.NewLine,result.Messages) From 596f17e44e990ab5ec1c909632683cf40323c765 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 15:04:31 +0100 Subject: [PATCH 11/12] Create regression test for #359 --- .../Paket.IntegrationTests/BasicResolverSpecs.fs | 9 +++++++++ .../before/paket.dependencies | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 integrationtests/scenarios/i000359-packagename-contains-nuget/before/paket.dependencies diff --git a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs index adf3ece869..96aacd6d3f 100644 --- a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs @@ -84,6 +84,15 @@ let ``#299 should restore package ending in lib``() = Directory.Exists(Path.Combine(scenarioTempPath "i000299-restore-package-that-ends-in-lib","packages","FunScript.TypeScript.Binding.lib")) |> shouldEqual true + +[] +let ``#359 should restore package with nuget in name``() = + let lockFile = update "i000359-packagename-contains-nuget" + lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Nuget.CommandLine"].Version + |> shouldBeGreaterThan (SemVer.Parse "0") + + Directory.Exists(Path.Combine(scenarioTempPath "i000359-packagename-contains-nuget","packages","Nuget.CommandLine")) + |> shouldEqual true [] let ``#1177 should resolve with pessimistic strategy correctly``() = diff --git a/integrationtests/scenarios/i000359-packagename-contains-nuget/before/paket.dependencies b/integrationtests/scenarios/i000359-packagename-contains-nuget/before/paket.dependencies new file mode 100644 index 0000000000..851e85f3cf --- /dev/null +++ b/integrationtests/scenarios/i000359-packagename-contains-nuget/before/paket.dependencies @@ -0,0 +1,3 @@ +source http://nuget.org/api/v2 + +nuget nuget.CommandLine \ No newline at end of file From d8e716751f4fd7d4a6daa809e8f08ed76ba2f082 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 15:18:59 +0100 Subject: [PATCH 12/12] fix path typo --- integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs index 96aacd6d3f..794ffe419e 100644 --- a/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs @@ -91,7 +91,7 @@ let ``#359 should restore package with nuget in name``() = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Nuget.CommandLine"].Version |> shouldBeGreaterThan (SemVer.Parse "0") - Directory.Exists(Path.Combine(scenarioTempPath "i000359-packagename-contains-nuget","packages","Nuget.CommandLine")) + Directory.Exists(Path.Combine(scenarioTempPath "i000359-packagename-contains-nuget","packages","NuGet.CommandLine")) |> shouldEqual true []