From 016309b62905506a366a9a6cd506603f7dfb81cb Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Sun, 19 Nov 2023 07:27:35 +1000 Subject: [PATCH 1/8] feat (net8): Upgrade to net8 --- .github/workflows/build.yml | 2 +- build/Build.cs | 2 +- build/_build.csproj | 3 ++- src/Mono.Terminal/Mono.Terminal.csproj | 2 +- src/cde/cde.csproj | 20 ++++++++++---------- src/cdeLib/cdeLib.csproj | 18 +++++++++--------- src/cdeLibTest/cdeLibTest.csproj | 8 ++++---- src/cdeWin/cdeWin.csproj | 9 +++++---- src/cdeWinTest/cdeWinTest.csproj | 9 +++++---- 9 files changed, 38 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62a9814..c94b609 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: | ./build.ps1 publish diff --git a/build/Build.cs b/build/Build.cs index 97817ac..b9ca047 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -47,7 +47,7 @@ public Build() AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; - readonly string RunTime = "win10-x64"; + readonly string RunTime = "win-x64"; [UsedImplicitly] diff --git a/build/_build.csproj b/build/_build.csproj index b9eaf25..69d2920 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,12 +2,13 @@ Exe - net7.0 + net8.0 CS0649;CS0169 .. .. 1 + true diff --git a/src/Mono.Terminal/Mono.Terminal.csproj b/src/Mono.Terminal/Mono.Terminal.csproj index bf12ae6..8339a18 100644 --- a/src/Mono.Terminal/Mono.Terminal.csproj +++ b/src/Mono.Terminal/Mono.Terminal.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 diff --git a/src/cde/cde.csproj b/src/cde/cde.csproj index 613a6e4..29f342f 100644 --- a/src/cde/cde.csproj +++ b/src/cde/cde.csproj @@ -3,7 +3,7 @@ Exe - net7.0 + net8.0 win-x64;linux-x64;osx-x64 Resources\CDE-logo-02_GFI.ico en @@ -20,19 +20,19 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + diff --git a/src/cdeLib/cdeLib.csproj b/src/cdeLib/cdeLib.csproj index 17b1210..73808c7 100644 --- a/src/cdeLib/cdeLib.csproj +++ b/src/cdeLib/cdeLib.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 @@ -10,23 +10,23 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + - + diff --git a/src/cdeLibTest/cdeLibTest.csproj b/src/cdeLibTest/cdeLibTest.csproj index 55c763a..ba79fb3 100644 --- a/src/cdeLibTest/cdeLibTest.csproj +++ b/src/cdeLibTest/cdeLibTest.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 @@ -16,15 +16,15 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/cdeWin/cdeWin.csproj b/src/cdeWin/cdeWin.csproj index d867739..0e2892f 100644 --- a/src/cdeWin/cdeWin.csproj +++ b/src/cdeWin/cdeWin.csproj @@ -2,10 +2,11 @@ WinExe - net7.0-windows7.0 + net8.0-windows10.0.17763.0 true win-x64 Resources\CDE-logo-02_GFI.ico + 10.0.17763.0 @@ -25,10 +26,10 @@ - - + + - + diff --git a/src/cdeWinTest/cdeWinTest.csproj b/src/cdeWinTest/cdeWinTest.csproj index 523c052..c33ca79 100644 --- a/src/cdeWinTest/cdeWinTest.csproj +++ b/src/cdeWinTest/cdeWinTest.csproj @@ -1,15 +1,16 @@  - net7.0-windows + net8.0-windows10.0.17763.0 true + 10.0.17763.0 - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 4a6a92044713cd5f1f6aa374226a81563d6261ee Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Mon, 20 Nov 2023 09:08:53 +1000 Subject: [PATCH 2/8] fix (Nuke): Remove active build configurations --- src/cde.sln | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cde.sln b/src/cde.sln index 31ac6f8..c3e5367 100644 --- a/src/cde.sln +++ b/src/cde.sln @@ -118,17 +118,11 @@ Global {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x64.Build.0 = Release|Any CPU {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.ActiveCfg = Release|Any CPU {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.Build.0 = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.Build.0 = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.Build.0 = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.Build.0 = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.Build.0 = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution From 44fb7aedc37ab4354fd1ac2d9b3f595ea42e17f9 Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Sat, 3 Feb 2024 09:26:45 +1000 Subject: [PATCH 3/8] task (deps): Bump deps --- src/cde.sln | 6 ++++++ src/cde/cde.csproj | 6 +++--- .../Infrastructure/Exceptions/CatalogReadException.cs | 5 ----- src/cdeLib/cdeLib.csproj | 10 +++++----- src/cdeLibTest/cdeLibTest.csproj | 2 +- src/util/util.csproj | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/cde.sln b/src/cde.sln index c3e5367..31ac6f8 100644 --- a/src/cde.sln +++ b/src/cde.sln @@ -118,11 +118,17 @@ Global {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x64.Build.0 = Release|Any CPU {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.ActiveCfg = Release|Any CPU {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.Build.0 = Release|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.Build.0 = Debug|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.ActiveCfg = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.Build.0 = Debug|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.Build.0 = Release|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.Build.0 = Release|Any CPU + {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.ActiveCfg = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution diff --git a/src/cde/cde.csproj b/src/cde/cde.csproj index 29f342f..d045e9f 100644 --- a/src/cde/cde.csproj +++ b/src/cde/cde.csproj @@ -17,7 +17,7 @@ - + @@ -32,9 +32,9 @@ - + - + diff --git a/src/cdeLib/Infrastructure/Exceptions/CatalogReadException.cs b/src/cdeLib/Infrastructure/Exceptions/CatalogReadException.cs index 9f56758..853fd11 100644 --- a/src/cdeLib/Infrastructure/Exceptions/CatalogReadException.cs +++ b/src/cdeLib/Infrastructure/Exceptions/CatalogReadException.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.Serialization; namespace cdeLib.Infrastructure.Exceptions; @@ -9,10 +8,6 @@ public CatalogReadException() { } - protected CatalogReadException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } - public CatalogReadException(string message) : base(message) { } diff --git a/src/cdeLib/cdeLib.csproj b/src/cdeLib/cdeLib.csproj index 73808c7..943bb99 100644 --- a/src/cdeLib/cdeLib.csproj +++ b/src/cdeLib/cdeLib.csproj @@ -5,7 +5,7 @@ - + @@ -13,17 +13,17 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/src/cdeLibTest/cdeLibTest.csproj b/src/cdeLibTest/cdeLibTest.csproj index ba79fb3..4e63bbf 100644 --- a/src/cdeLibTest/cdeLibTest.csproj +++ b/src/cdeLibTest/cdeLibTest.csproj @@ -24,7 +24,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/util/util.csproj b/src/util/util.csproj index 17b81a9..937a2fa 100644 --- a/src/util/util.csproj +++ b/src/util/util.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 From 69b6c95bf9a8fafd6ac03ed1bcd2240b44a62a8a Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 19 Jun 2024 08:25:29 +1000 Subject: [PATCH 4/8] feat: Bump packages --- build/_build.csproj | 4 ++-- build/_build.csproj.DotSettings | 5 ++++- src/Mono.Terminal/Mono.Terminal.csproj | 2 +- src/cde/cde.csproj | 16 ++++++++-------- src/cdeLib/cdeLib.csproj | 18 +++++++++--------- src/cdeLibTest/cdeLibTest.csproj | 6 +++--- src/cdeWin/cdeWin.csproj | 8 ++++---- src/cdeWinTest/cdeWinTest.csproj | 4 ++-- src/util/util.csproj | 2 +- 9 files changed, 34 insertions(+), 31 deletions(-) diff --git a/build/_build.csproj b/build/_build.csproj index 69d2920..a76a850 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/build/_build.csproj.DotSettings b/build/_build.csproj.DotSettings index 7bc2848..337271d 100644 --- a/build/_build.csproj.DotSettings +++ b/build/_build.csproj.DotSettings @@ -16,6 +16,8 @@ False <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy> + <Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy> True True True @@ -24,4 +26,5 @@ True True True - True + True + True diff --git a/src/Mono.Terminal/Mono.Terminal.csproj b/src/Mono.Terminal/Mono.Terminal.csproj index 8339a18..75effa3 100644 --- a/src/Mono.Terminal/Mono.Terminal.csproj +++ b/src/Mono.Terminal/Mono.Terminal.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/cde/cde.csproj b/src/cde/cde.csproj index d045e9f..7885828 100644 --- a/src/cde/cde.csproj +++ b/src/cde/cde.csproj @@ -21,9 +21,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -31,10 +31,10 @@ - - - - + + + + @@ -43,7 +43,7 @@ - + diff --git a/src/cdeLib/cdeLib.csproj b/src/cdeLib/cdeLib.csproj index 943bb99..2371271 100644 --- a/src/cdeLib/cdeLib.csproj +++ b/src/cdeLib/cdeLib.csproj @@ -9,13 +9,13 @@ - + - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -24,13 +24,13 @@ - - + + - + diff --git a/src/cdeLibTest/cdeLibTest.csproj b/src/cdeLibTest/cdeLibTest.csproj index 4e63bbf..531e68a 100644 --- a/src/cdeLibTest/cdeLibTest.csproj +++ b/src/cdeLibTest/cdeLibTest.csproj @@ -16,7 +16,7 @@ - + @@ -24,7 +24,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -34,7 +34,7 @@ - + diff --git a/src/cdeWin/cdeWin.csproj b/src/cdeWin/cdeWin.csproj index 0e2892f..7d6f914 100644 --- a/src/cdeWin/cdeWin.csproj +++ b/src/cdeWin/cdeWin.csproj @@ -27,9 +27,9 @@ - - - + + + @@ -37,7 +37,7 @@ - + \ No newline at end of file diff --git a/src/cdeWinTest/cdeWinTest.csproj b/src/cdeWinTest/cdeWinTest.csproj index c33ca79..de391cf 100644 --- a/src/cdeWinTest/cdeWinTest.csproj +++ b/src/cdeWinTest/cdeWinTest.csproj @@ -8,7 +8,7 @@ - + @@ -22,7 +22,7 @@ - + diff --git a/src/util/util.csproj b/src/util/util.csproj index 937a2fa..7d4943b 100644 --- a/src/util/util.csproj +++ b/src/util/util.csproj @@ -9,7 +9,7 @@ - + From 1279b9362114619468641d0380fe07153ae7a57f Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 19 Jun 2024 08:26:09 +1000 Subject: [PATCH 5/8] refactor (abort): Replace deprecated thread.Abort --- src/Mono.Terminal/LineEditor.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Mono.Terminal/LineEditor.cs b/src/Mono.Terminal/LineEditor.cs index 230d43a..86fbc5b 100644 --- a/src/Mono.Terminal/LineEditor.cs +++ b/src/Mono.Terminal/LineEditor.cs @@ -1122,7 +1122,7 @@ void InterruptEdit(object sender, ConsoleCancelEventArgs a) a.Cancel = true; // Interrupt the editor - edit_thread.Abort(); + edit_thread.Interrupt(); } // @@ -1176,12 +1176,13 @@ void HandleChar(char c) } } - private void EditLoop() + private void EditLoop(CancellationToken cancellationToken) { ConsoleKeyInfo cki; while (!done) { + cancellationToken.ThrowIfCancellationRequested(); ConsoleModifiers mod; cki = Console.ReadKey(true); @@ -1283,16 +1284,19 @@ public string Edit(string prompt, string initial) InitText(initial); history.Append(initial); + CancellationTokenSource cts = new CancellationTokenSource(); + do { try { - EditLoop(); + EditLoop(cts.Token); } - catch (ThreadAbortException) + catch (OperationCanceledException) { + cts = new CancellationTokenSource(); // Reset cancellation token source searching = 0; - Thread.ResetAbort(); + //Thread.ResetAbort(); Console.WriteLine(); SetPrompt(prompt); SetText(""); From ee5e1d59a293b94913cfd1e3ad978e6b456d0696 Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 19 Jun 2024 08:33:38 +1000 Subject: [PATCH 6/8] fix(build): Remove 'active' build configurations for nuke project warning. --- src/cde.sln | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cde.sln b/src/cde.sln index 31ac6f8..a09638e 100644 --- a/src/cde.sln +++ b/src/cde.sln @@ -119,17 +119,11 @@ Global {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.ActiveCfg = Release|Any CPU {08AD8A2E-0173-42AF-A5EB-589084399677}.Release|x86.Build.0 = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.ActiveCfg = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x64.Build.0 = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.ActiveCfg = Debug|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Debug|x86.Build.0 = Debug|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|Any CPU.Build.0 = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.ActiveCfg = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x64.Build.0 = Release|Any CPU {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.ActiveCfg = Release|Any CPU - {7E79FFA3-7A68-4EF8-AD53-CB756DF896F7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From c0ca0e827245312b45065256ab6547aab13b9818 Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 19 Jun 2024 08:37:29 +1000 Subject: [PATCH 7/8] chore (Build): Update to upload-artifact@v4, v3 is deprecated. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c94b609..c91a00c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: run: | ./build.ps1 publish - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: app path: artifacts/ From e6257f29c4327dd89737173c79050f90cdf94287 Mon Sep 17 00:00:00 2001 From: Jason Finch Date: Wed, 19 Jun 2024 08:40:06 +1000 Subject: [PATCH 8/8] chore(build): Update build actions setup-dotnet and checkout to v4 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c91a00c..03d7421 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,12 +12,12 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: #fetch depth 0 or gitversion breaks since it can't obtain the required tags etc. fetch-depth: 0 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Build