Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "10.0.402",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}
13 changes: 2 additions & 11 deletions tests/TuiCode.Tests/UnsavedEditsHostTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConfirmView>().SingleOrDefault();

private Workbench.Workbench BuildWorkbench(RecoveryOwner owner) =>
new(new SidebarPart(new FileExplorerView()), new EditorPart(), new StatusBarPart(), _workspaces,
recovery: new RecoveryStore(_fs, Recovery, owner, _ => false));
Expand Down
Loading