From 55c44099245bd03514a00f67111a806ba0756ee2 Mon Sep 17 00:00:00 2001 From: Tuomas Hietanen Date: Tue, 30 Jul 2024 00:54:29 +0100 Subject: [PATCH] Paket.dependencies: Allow Paket.Core to be in pre-release version to get the integration-tests pass. (#2791) * Paket.dependencies: We have to allow Paket.Core to be in pre-release version to get the integration-tests pass. * unit-test was assuming line-numbers which increased by one due to previous commit --- .../before/paket.dependencies | 3 ++- .../before/reference-assemblies.fsx | 3 ++- .../before/reference-assemblies.fsx | 3 ++- .../before/reference_fake-targets.fsx | 3 ++- .../before/reference_fake-runtime.fsx | 3 ++- .../before/fail-to-compile.fsx | 3 ++- .../core-simple-runtime-error/before/runtime-error.fsx | 1 + .../before/paket.dependencies | 3 ++- paket.dependencies | 2 +- .../Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs | 6 +++--- src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs | 8 +++++--- 11 files changed, 24 insertions(+), 14 deletions(-) diff --git a/integrationtests/core-no-dependencies-hello-world/before/paket.dependencies b/integrationtests/core-no-dependencies-hello-world/before/paket.dependencies index b713a9271bb..f40f286c8ca 100644 --- a/integrationtests/core-no-dependencies-hello-world/before/paket.dependencies +++ b/integrationtests/core-no-dependencies-hello-world/before/paket.dependencies @@ -6,4 +6,5 @@ source https://api.nuget.org/v3/index.json source https://ci.appveyor.com/nuget/fake nuget Fake.Runtime prerelease -nuget FSharp.Core prerelease \ No newline at end of file +nuget FSharp.Core prerelease +nuget Paket.Core prerelease diff --git a/integrationtests/core-reference-assemblies-net60101-rollforward/before/reference-assemblies.fsx b/integrationtests/core-reference-assemblies-net60101-rollforward/before/reference-assemblies.fsx index 72dc285b7c0..290b5cac9b9 100644 --- a/integrationtests/core-reference-assemblies-net60101-rollforward/before/reference-assemblies.fsx +++ b/integrationtests/core-reference-assemblies-net60101-rollforward/before/reference-assemblies.fsx @@ -3,7 +3,8 @@ storage: none source https://api.nuget.org/v3/index.json source ../../../release/dotnetcore nuget Fake.Runtime prerelease -nuget FSharp.Core prerelease" +nuget FSharp.Core prerelease +nuget Paket.Core prerelease" open Fake.Runtime diff --git a/integrationtests/core-reference-assemblies-net60101/before/reference-assemblies.fsx b/integrationtests/core-reference-assemblies-net60101/before/reference-assemblies.fsx index 72dc285b7c0..290b5cac9b9 100644 --- a/integrationtests/core-reference-assemblies-net60101/before/reference-assemblies.fsx +++ b/integrationtests/core-reference-assemblies-net60101/before/reference-assemblies.fsx @@ -3,7 +3,8 @@ storage: none source https://api.nuget.org/v3/index.json source ../../../release/dotnetcore nuget Fake.Runtime prerelease -nuget FSharp.Core prerelease" +nuget FSharp.Core prerelease +nuget Paket.Core prerelease" open Fake.Runtime diff --git a/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx b/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx index 1c456b6c86b..597bedf5328 100644 --- a/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx +++ b/integrationtests/core-reference-fake-core-targets/before/reference_fake-targets.fsx @@ -5,7 +5,8 @@ source ../../../release/dotnetcore nuget Fake.Core.Target prerelease nuget System.Reactive.Compatibility -nuget FSharp.Core prerelease" +nuget FSharp.Core prerelease +nuget Paket.Core prerelease" #endif printfn "before load" diff --git a/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx b/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx index 33da4aa46d2..d844c94721f 100644 --- a/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx +++ b/integrationtests/core-reference-fake-runtime/before/reference_fake-runtime.fsx @@ -6,7 +6,8 @@ source ../../../release/dotnetcore //source https://ci.appveyor.com/nuget/paket nuget Fake.Runtime prerelease -nuget FSharp.Core prerelease" +nuget FSharp.Core prerelease +nuget Paket.Core prerelease" #endif #load ".fake/reference_fake-runtime.fsx/intellisense.fsx" diff --git a/integrationtests/core-simple-failed-to-compile/before/fail-to-compile.fsx b/integrationtests/core-simple-failed-to-compile/before/fail-to-compile.fsx index 16aa7195542..750d14b5e66 100644 --- a/integrationtests/core-simple-failed-to-compile/before/fail-to-compile.fsx +++ b/integrationtests/core-simple-failed-to-compile/before/fail-to-compile.fsx @@ -5,7 +5,8 @@ source ../../../release/dotnetcore //source https://ci.appveyor.com/nuget/paket nuget Fake.Runtime prerelease -nuget FSharp.Core prerelease" +nuget FSharp.Core prerelease +nuget Paket.Core prerelease" #endif open klajsdhgfasjkhd diff --git a/integrationtests/core-simple-runtime-error/before/runtime-error.fsx b/integrationtests/core-simple-runtime-error/before/runtime-error.fsx index 146db82f730..54bd0c33db5 100644 --- a/integrationtests/core-simple-runtime-error/before/runtime-error.fsx +++ b/integrationtests/core-simple-runtime-error/before/runtime-error.fsx @@ -5,6 +5,7 @@ #r "paket: //source https://ci.appveyor.com/nuget/paket" #r "paket: nuget Fake.Runtime prerelease" #r "paket: nuget FSharp.Core prerelease" +#r "paket: nuget Paket.Core prerelease" #endif // Issue https://github.com/fsharp/FAKE/issues/2121 diff --git a/integrationtests/core-use-external-paket-dependencies/before/paket.dependencies b/integrationtests/core-use-external-paket-dependencies/before/paket.dependencies index 5d056b308f9..3f03416df53 100644 --- a/integrationtests/core-use-external-paket-dependencies/before/paket.dependencies +++ b/integrationtests/core-use-external-paket-dependencies/before/paket.dependencies @@ -5,4 +5,5 @@ source ../../../release/dotnetcore nuget Fake.Runtime prerelease nuget FSharp.Core prerelease -nuget Microsoft.NETCore.App \ No newline at end of file +nuget Microsoft.NETCore.App +nuget Paket.Core prerelease diff --git a/paket.dependencies b/paket.dependencies index 19cc940ee60..ef3aa6b9e6a 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -55,7 +55,7 @@ group fakemodule nuget FParsec nuget Octokit nuget Newtonsoft.Json - nuget Paket.Core 8.1.0-alpha004 + nuget Paket.Core prerelease nuget NuGet.Protocol nuget NuGet.Packaging nuget Mono.Cecil prerelease diff --git a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs index 9bf41ded168..f335334e48f 100644 --- a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs +++ b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs @@ -249,7 +249,7 @@ let tests = "Expected correct declaration of 'Start'" { Declaration.Empty with File = scriptFile - Line = 36 } + Line = 37 } startTarget.Declaration Expect.equal "Expected correct hard dependencies of 'Start'" [] startTarget.HardDependencies @@ -261,7 +261,7 @@ let tests = "Expected correct declaration of 'TestTarget'" { Declaration.Empty with File = scriptFile - Line = 38 } + Line = 39 } testTarget.Declaration Expect.equal @@ -270,7 +270,7 @@ let tests = Declaration = { Declaration.Empty with File = scriptFile - Line = 45 } } ] + Line = 46 } } ] testTarget.HardDependencies Expect.equal "Expected correct description of 'TestTarget'" "" testTarget.Description diff --git a/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs b/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs index 61d875e07e4..ccf00cc59ad 100644 --- a/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs +++ b/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs @@ -6,16 +6,18 @@ open Expecto [] let tests = - let flagsTestCase name changeBuildArgs expected = + let flagsTestCase name changeBuildArgs (expected: string) = testCase name <| fun _ -> let _, cmdLine = MSBuild.buildArgs changeBuildArgs let expected = + let trimmed = expected.Trim() + if BuildServer.ansiColorSupport then - $"%s{expected} /clp:ForceConsoleColor".Trim() + $"%s{trimmed} /clp:ForceConsoleColor".Trim() else - expected.Trim() + trimmed let expected = $"/m /nodeReuse:False {expected} /p:RestorePackages=False".Trim()