From cd6fc74d07cae754cda466f8cb341a1e1e24b2ea Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Sat, 28 Oct 2023 23:23:50 -0400 Subject: [PATCH] Dotnet 8 builds (#1175) Co-authored-by: Chet Husk Co-authored-by: Chet Husk --- .config/dotnet-tools.json | 16 ++--------- .github/workflows/build.yml | 28 +++++++++++++++---- paket.dependencies | 11 ++++++-- .../FsAutoComplete.Core.fsproj | 1 + .../FsAutoComplete.Logging.fsproj | 4 ++- src/FsAutoComplete/FsAutoComplete.fsproj | 1 + src/FsAutoComplete/LspServers/Common.fs | 3 +- .../FsAutoComplete.Tests.Lsp.fsproj | 1 + .../Formatting/.config/dotnet-tools.json | 2 +- 9 files changed, 41 insertions(+), 26 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index ac93bd8f5..1db930bc9 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -2,24 +2,12 @@ "version": 1, "isRoot": true, "tools": { - "fake-cli": { - "version": "5.23.0", - "commands": [ - "fake" - ] - }, "paket": { - "version": "7.2.1", + "version": "8.0.0-alpha002", "commands": [ "paket" ] }, - "octonav": { - "version": "0.0.1", - "commands": [ - "octonav" - ] - }, "dotnet-reportgenerator-globaltool": { "version": "5.0.2", "commands": [ @@ -27,7 +15,7 @@ ] }, "fantomas": { - "version": "6.2.0", + "version": "6.2.2", "commands": [ "fantomas" ] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23b2b5848..0da80b541 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,12 @@ jobs: env: TEST_TIMEOUT_MINUTES: 40 FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET 8 RCs to participate in rollforward as expected. timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc strategy: matrix: os: [windows-latest, macos-latest, ubuntu-latest] - dotnet-version: ["", "6.0.x", "7.0.x"] + dotnet-version: ["", "6.0.x", "7.0.x", "8.0.x"] # these entries will mesh with the above combinations include: # just use what's in the repo @@ -32,20 +33,27 @@ jobs: label: "repo global.json" build_net7: false test_tfm: net6.0 - # latest 6.0 stable + # latest 6.0 - global-json-file: "global.json" dotnet-version: "6.0.x" include-prerelease: false - label: "6.0 stable" + label: "6.0" build_net7: false test_tfm: net6.0 - # latest 7.0 preview + # latest 7.0 - global-json-file: "global.json" dotnet-version: "7.0.x" include-prerelease: true - label: "7.0 preview" + label: "7.0" build_net7: true test_tfm: net7.0 + # latest 8.0 + - global-json-file: "global.json" + dotnet-version: "8.0.x" + include-prerelease: true + label: "8.0" + build_net8: true + test_tfm: net8.0 fail-fast: false # we have timing issues on some OS, so we want them all to run runs-on: ${{ matrix.os }} @@ -76,18 +84,26 @@ jobs: run: dotnet --info - name: Restore tools - run: dotnet tool restore + run: | + # can't do a tool restore here due to an 8.0.100 rc2 bug - this is fixed in GA so can go back to + # dotnet tool restore then. + dotnet tool install paket --version 8.0.0-alpha002 && dotnet tool install fantomas --version 6.2.2 && dotnet paket restore - name: Check format run: dotnet build -t:CheckFormat + env: + DOTNET_ROLL_FORWARD: LatestMajor + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 - name: Run Build run: dotnet run --project build -t Build env: BuildNet7: ${{ matrix.build_net7 }} + BuildNet8: ${{ matrix.build_net8 }} - name: Run and report tests run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --no-build --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true working-directory: test/FsAutoComplete.Tests.Lsp env: BuildNet7: ${{ matrix.build_net7 }} + BuildNet8: ${{ matrix.build_net8 }} diff --git a/paket.dependencies b/paket.dependencies index caabd44a8..d483b1ab3 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,6 +1,6 @@ version 7.2.1 -framework: netstandard2.0, netstandard2.1, net6.0, net7.0 +framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0 source https://api.nuget.org/v3/index.json # this is the FCS nightly feed, re-enable at your own risk! @@ -37,7 +37,7 @@ nuget Serilog.Sinks.Async >= 1.5 nuget Destructurama.FSharp nuget FSharp.UMX >= 1.1 nuget FSharp.Formatting >= 14.0 -nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0 +nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0 nuget IcedTasks >= 0.5 nuget FSharpx.Async >= 1.14 nuget CliWrap >= 3.0 @@ -59,6 +59,8 @@ nuget OpenTelemetry.Api >= 1.3.2 nuget OpenTelemetry.Exporter.OpenTelemetryProtocol >= 1.3.2 # 1.4 bumps to 7.0 versions of System.Diagnostics libs, so can't use it nuget LinkDotNet.StringBuilder 1.18.0 nuget CommunityToolkit.HighPerformance +nuget System.Security.Cryptography.Pkcs 6.0.4 + group Build source https://api.nuget.org/v3/index.json @@ -83,3 +85,8 @@ group Build nuget MSBuild.StructuredLogger nuget Octokit 0.48 // there's an API break in 0.50, so we need to pin this to prevent errors nuget Fantomas.Core 6.2.0 + + nuget NuGet.Versioning 6.7.0 + nuget NuGet.Common 6.7.0 + nuget NuGet.Protocol 6.7.0 + diff --git a/src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj b/src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj index 27fdc429b..81df0fe33 100644 --- a/src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj +++ b/src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj @@ -2,6 +2,7 @@ net6.0 net6.0;net7.0 + net6.0;net7.0;net8.0 false diff --git a/src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj b/src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj index 9251b9b92..d5b5f14bc 100644 --- a/src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj +++ b/src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj @@ -2,6 +2,8 @@ net6.0 + net6.0;net7.0 + net6.0;net7.0;net8.0 false @@ -9,4 +11,4 @@ - \ No newline at end of file + diff --git a/src/FsAutoComplete/FsAutoComplete.fsproj b/src/FsAutoComplete/FsAutoComplete.fsproj index 03bdb7089..014cc81c9 100644 --- a/src/FsAutoComplete/FsAutoComplete.fsproj +++ b/src/FsAutoComplete/FsAutoComplete.fsproj @@ -4,6 +4,7 @@ Exe net6.0 net6.0;net7.0 + net6.0;net7.0;net8.0 fsautocomplete true true diff --git a/src/FsAutoComplete/LspServers/Common.fs b/src/FsAutoComplete/LspServers/Common.fs index cc256a613..3760274db 100644 --- a/src/FsAutoComplete/LspServers/Common.fs +++ b/src/FsAutoComplete/LspServers/Common.fs @@ -40,8 +40,7 @@ type DiagnosticCollection(sendDiagnostics: DocumentUri -> Diagnostic[] -> Async< let agents = System.Collections.Concurrent.ConcurrentDictionary * - CancellationTokenSource> - () + CancellationTokenSource>() let rec restartAgent (fileUri: DocumentUri) = removeAgent fileUri diff --git a/test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj b/test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj index 3bb6270cd..dd86a6ba2 100644 --- a/test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj +++ b/test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj @@ -3,6 +3,7 @@ Exe net6.0 net6.0;net7.0 + net6.0;net7.0;net8.0 false LatestMajor true diff --git a/test/FsAutoComplete.Tests.Lsp/TestCases/Formatting/.config/dotnet-tools.json b/test/FsAutoComplete.Tests.Lsp/TestCases/Formatting/.config/dotnet-tools.json index 6aa110551..ef464dff1 100644 --- a/test/FsAutoComplete.Tests.Lsp/TestCases/Formatting/.config/dotnet-tools.json +++ b/test/FsAutoComplete.Tests.Lsp/TestCases/Formatting/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fantomas": { - "version": "5.0.0", + "version": "6.2.2", "commands": [ "fantomas" ]