From e1efce708aaef4338a41417a4c4d54fdc4d991cd Mon Sep 17 00:00:00 2001 From: "a-team-app[bot]" <334837322+a-team-app[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2026 19:59:29 +1300 Subject: [PATCH 1/2] Pin the .NET SDK to 10.0.402 or a newer 10.0 feature band On macOS, Native AOT builds from ILCompiler 10.0.12 crash on a GC when a Go program started them (dotnet/runtime#132581, fixed in 10.0.13). The SDK picks the ILCompiler, so global.json asks for 10.0.402 (rolling forward within 10.0, no previews), and CI and the release workflow install the SDK it names instead of a floating 10.0.x. Closes #563 Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 2 +- AGENTS.md | 2 ++ global.json | 7 +++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d047ae1a..e6e65aa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + global-json-file: global.json - name: Build run: dotnet build TuiCode.slnx --configuration Release @@ -80,7 +80,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + global-json-file: global.json - name: AOT publish # No trim or AOT warnings: each one is a runtime failure waiting for the code path that hits it. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbae829c..dee98ecf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,7 @@ jobs: - uses: actions/setup-dotnet@v5 with: - dotnet-version: '10.0.x' + global-json-file: global.json - name: Publish shell: bash diff --git a/AGENTS.md b/AGENTS.md index d6976033..1cdcd246 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,8 @@ Per-feature catalogues ("what works today") don't go in the README — they belo ## Quick start +Install the .NET SDK 10.0.402 or a newer 10.0 SDK ([download](https://dotnet.microsoft.com/download/dotnet/10.0)). `global.json` refuses anything older, and .NET 11 SDKs: an older SDK's Native AOT compiler crashes on macOS when a Go program starts TuiCode ([dotnet/runtime#132581](https://github.com/dotnet/runtime/issues/132581)). CI installs the SDK `global.json` names. + ```bash dotnet build TuiCode.slnx dotnet run --project src/TuiCode # needs a real terminal diff --git a/global.json b/global.json new file mode 100644 index 00000000..6916a337 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "10.0.402", + "rollForward": "latestFeature", + "allowPrerelease": false + } +} From c7df4b29b30a1178891cc23819da23d6f48ae5bd Mon Sep 17 00:00:00 2001 From: "a-team-app[bot]" <334837322+a-team-app[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2026 21:46:25 +1300 Subject: [PATCH 2/2] Answer the quit confirm through ConfirmDialogs in UnsavedEditsHostTests #581 and #582 merged side by side: #581's test still looked for the ConfirmView that #582 removed, so main stopped compiling. Closes #563 Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/TuiCode.Tests/UnsavedEditsHostTests.cs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/TuiCode.Tests/UnsavedEditsHostTests.cs b/tests/TuiCode.Tests/UnsavedEditsHostTests.cs index da7ddb32..cc5bef9d 100644 --- a/tests/TuiCode.Tests/UnsavedEditsHostTests.cs +++ b/tests/TuiCode.Tests/UnsavedEditsHostTests.cs @@ -87,21 +87,12 @@ await HostSteps.RunUntilQuit(host, workbench.UnsavedEdits!.Flush(); }, () => host.App.InjectKey(Key.Q.WithCtrl), - () => Confirm(workbench) is not null, - () => - { - if (Confirm(workbench)?.FocusedChoice == "Don't save") return true; - host.App.InjectKey(Key.Tab); - return false; - }, - () => host.App.InjectKey(Key.Enter)); + () => ConfirmDialogs.Of(workbench) is not null, + ConfirmDialogs.Choose(host, workbench, "Don't save")); Assert.Empty(_fs.Directory.GetFiles(Recovery)); } - private static ConfirmView? Confirm(Workbench.Workbench workbench) => - workbench.SubViews.OfType().SingleOrDefault(); - private Workbench.Workbench BuildWorkbench(RecoveryOwner owner) => new(new SidebarPart(new FileExplorerView()), new EditorPart(), new StatusBarPart(), _workspaces, recovery: new RecoveryStore(_fs, Recovery, owner, _ => false));