Fixes #5401 - Move non-UICatalog examples to gui-cs/Examples and restore AOT validation via Tests#5402
Conversation
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/01a4446d-af40-4ac8-83d3-b36596f94b7f Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
@copilot The aot examples need to be refactored into test apps in the /tests directory. There still needs to be thorough aot validation in the main repo. |
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2b32e021-8645-44f5-b2dd-446cf253840f Co-authored-by: tig <585482+tig@users.noreply.github.com>
Implemented in 295aa26. I refactored the AOT coverage into a new in-repo test app at |
There was a problem hiding this comment.
Pull request overview
Completes the in-repo examples split (retaining only UICatalog and ScenarioRunner), updates documentation/solution references to point at gui-cs/Examples, and restores NativeAOT/trimming validation by introducing a dedicated CI smoke app under Tests/.
Changes:
- Removed non-retained example projects/assets from
Examples/andTerminal.sln, updating docs to referencegui-cs/Examples. - Added
Tests/NativeAotSmokeAOT publish + runtime smoke validation and wired it into CI. - Updated docfx and contributor/agent guidance to reflect new example locations and AOT validation path.
Reviewed changes
Copilot reviewed 82 out of 83 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/README.md | Documented the new NativeAotSmoke test app under Tests. |
| Tests/NativeAotSmoke/Program.cs | Implements the AOT smoke app that runs a short full app lifecycle in CI mode. |
| Tests/NativeAotSmoke/NativeAotSmoke.csproj | Adds NativeAOT-enabled executable project and links minimal UICatalog editor helpers. |
| Terminal.sln | Removes moved example projects and adds Tests/NativeAotSmoke. |
| README.md | Updates examples link text to reflect the new examples split. |
| Examples/README.md | Clarifies only UICatalog and ScenarioRunner remain; others moved to gui-cs/Examples. |
| Examples/WideCharRepro/WideCharRepro.csproj | Removed (moved out of repo). |
| Examples/WideCharRepro/README.md | Removed (moved out of repo). |
| Examples/WideCharRepro/Program.cs | Removed (moved out of repo). |
| Examples/WideCharRepro/BUG_REPORT_TEMPLATE.md | Removed (moved out of repo). |
| Examples/Themes/code-dark.config.json | Removed (moved out of repo). |
| Examples/ShortcutTest/ShortcutTest.csproj | Removed (moved out of repo). |
| Examples/ShortcutTest/ShortcutTest.cs | Removed (moved out of repo). |
| Examples/SelfContained/SelfContained.csproj | Removed (moved out of repo; AOT validation replaced by test app). |
| Examples/SelfContained/README.md | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Release.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Debug.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_osx-x64_Release.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_osx-x64_Debug.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_linux-x64_Release.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Properties/PublishProfiles/FolderProfile_net8.0_linux-x64_Debug.pubxml | Removed (moved out of repo). |
| Examples/SelfContained/Program.cs | Removed (moved out of repo). |
| Examples/ReactiveExample/ViewExtensions.cs | Removed (moved out of repo). |
| Examples/ReactiveExample/TerminalScheduler.cs | Removed (moved out of repo). |
| Examples/ReactiveExample/README.md | Removed (moved out of repo). |
| Examples/ReactiveExample/ReactiveExample.csproj | Removed (moved out of repo). |
| Examples/ReactiveExample/Program.cs | Removed (moved out of repo). |
| Examples/ReactiveExample/LoginViewModel.cs | Removed (moved out of repo). |
| Examples/ReactiveExample/LoginView.cs | Removed (moved out of repo). |
| Examples/PromptExample/PromptExample.csproj | Removed (moved out of repo). |
| Examples/PromptExample/Program.cs | Removed (moved out of repo). |
| Examples/PowershellExample.ps1 | Removed (moved out of repo). |
| Examples/NativeAot/README.md | Removed (replaced by Tests/NativeAotSmoke in-repo validation). |
| Examples/NativeAot/Publish_osx-x64_Release.sh | Removed (moved out of repo). |
| Examples/NativeAot/Publish_osx-x64_Debug.sh | Removed (moved out of repo). |
| Examples/NativeAot/Publish_linux-x64_Release.sh | Removed (moved out of repo). |
| Examples/NativeAot/Publish_linux-x64_Debug.sh | Removed (moved out of repo). |
| Examples/NativeAot/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Release.pubxml | Removed (moved out of repo). |
| Examples/NativeAot/Properties/PublishProfiles/FolderProfile_net8.0_win-x64_Debug.pubxml | Removed (moved out of repo). |
| Examples/NativeAot/Properties/launchSettings.json | Removed (moved out of repo). |
| Examples/InlineSelect/Program.cs | Removed (moved out of repo). |
| Examples/InlineSelect/InlineSelect.csproj | Removed (moved out of repo). |
| Examples/InlineColorPicker/Program.cs | Removed (moved out of repo). |
| Examples/InlineColorPicker/InlineColorPicker.csproj | Removed (moved out of repo). |
| Examples/InlineCLI/README.md | Removed (moved out of repo). |
| Examples/InlineCLI/InlineCLI.csproj | Removed (moved out of repo). |
| Examples/InlineCLI/InlineCLI.cs | Removed (moved out of repo). |
| Examples/FSharpExample/Program.fs | Removed (moved out of repo). |
| Examples/FSharpExample/FSharpExample.sln | Removed (moved out of repo). |
| Examples/FSharpExample/FSharpExample.fsproj | Removed (moved out of repo). |
| Examples/FSharpExample/.editorconfig | Removed (moved out of repo). |
| Examples/FluentExample/Program.cs | Removed (moved out of repo). |
| Examples/FluentExample/FluentExample.csproj | Removed (moved out of repo). |
| Examples/Example/README.md | Removed (replaced by inline doc snippet). |
| Examples/Example/Example.csproj | Removed (moved out of repo). |
| Examples/Example/Example.cs | Removed (replaced by inline doc snippet). |
| Examples/DatePicker.ps1 | Removed (moved out of repo). |
| Examples/Config/windows.json | Removed (moved out of repo). |
| Examples/Config/README.md | Removed (moved out of repo). |
| Examples/Config/macos.json | Removed (moved out of repo). |
| Examples/Config/example_config.json | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/README.md | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/Program.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/Message.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/LoginViewModel.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/LoginView.Designer.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/LoginView.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/LoginActions.cs | Removed (moved out of repo). |
| Examples/CommunityToolkitExample/CommunityToolkitExample.csproj | Removed (moved out of repo). |
| docfx/scripts/OutputView/OutputView.csproj | Drops dependency on removed PromptExample project. |
| docfx/docs/newinv2.md | Updates AOT example reference to Tests/NativeAotSmoke. |
| docfx/docs/getting-started.md | Replaces deleted example include with an inline minimal app snippet; updates run instructions. |
| docfx/docs/config.md | Repoints theme-config example reference to gui-cs/Examples. |
| docfx/docs/application.md | Consolidates inline-mode examples reference to gui-cs/Examples. |
| CONTRIBUTING.md | Removes stale example restore guidance; updates repo structure + tests/examples bullets. |
| ai-v2-primer.md | Updates “Working examples” pointers to retained apps and external examples repo. |
| AGENTS.md | Updates example pointers for agent guidance. |
| .windsurfrules | Updates example pointers to match new repo split. |
| .github/workflows/README.md | Updates CI documentation to reflect NativeAotSmoke publish/run validation. |
| .github/workflows/build-validation.yml | Replaces example-based AOT build/publish with Tests/NativeAotSmoke publish + run. |
| .cursorrules | Updates example pointers to match new repo split. |
| .claude/workflows/build-test-workflow.md | Updates AOT validation troubleshooting instructions to use NativeAotSmoke. |
| .claude/tasks/build-app.md | Updates examples list to remove moved example projects and point to external repo. |
Files not reviewed (1)
- Examples/CommunityToolkitExample/LoginView.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)
Tests/NativeAotSmoke/Program.cs:54
Console.WriteLineis executed while theIApplicationis still in scope (and not yet disposed). Terminal.Gui typically leaves the terminal in an altered state untilDispose, so writing to stdout here can be hidden in the alternate buffer or corrupt terminal state/CI logs. Move the success output to after theusing IApplication app = ...scope (or dispose before writing).
Tests/NativeAotSmoke/NativeAotSmoke.csproj:9- This project is intended to validate trimming/AOT safety in CI, but globally suppressing ILLink/AOT analyzer warnings (IL2026/IL3050/IL2123/IL3057) can hide new regressions and reduce the value of the smoke validation. Prefer fixing the underlying warnings or suppressing narrowly at specific call sites with justification, keeping the rest of the warnings visible to CI.
…les-to-gui-cs-examples # Conflicts: # Terminal.sln
|
@BDisp @tznind @harder @YourRobotOverlord etc... This is a controversial change. It adds friction to maintainers who use the examples in development/testing. But it simplifies the repo and makes examples more discoverable to users and agents. UICatalog and all the Scenarios remain in the repo as they are essential to testing. Thots? |
|
It would be useful if the example projects referenced the Terminal.Gui project instead of referencing the NuGet package, so that any incompatibility due to changes in Terminal.Gui could be immediately detected. I believe the project reference will be used. |
|
I only ever really used uicatalog anyway so fine by me |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
UICatalog is very complete, and it is also the only one I really use, so I'm in favor of simplifying the library. |
…les-to-gui-cs-examples # Conflicts: # Examples/WideCharRepro/Program.cs # Terminal.sln # docfx/docs/getting-started.md
…examples' into copilot/move-examples-to-gui-cs-examples # Conflicts: # Terminal.sln
5ea4fb4 to
55f47b5
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes
This PR completes the repository split by removing all in-repo examples except
UICatalogandScenarioRunner, updates references togui-cs/Examples, and preserves thorough AOT validation in the main repo by refactoring the old AOT example into a test app underTests/.Proposed Changes/Todos
Example inventory split
Examples/*projects/assets except:Examples/UICatalogExamples/ScenarioRunnerExamples/README.mdto reflect the new ownership boundary.Build/solution alignment
Terminal.sln.Examples/Config/*,Examples/PowershellExample.ps1).PromptExampleproject dependency fromdocfx/scripts/OutputView/OutputView.csproj.AOT validation refactor into Tests
Tests/NativeAotSmoke/NativeAotSmoke.csprojTests/NativeAotSmoke/Program.csTests/NativeAotSmoketoTerminal.sln.NativeAotSmoke --smoke-testDocs/reference updates
UICatalog,ScenarioRunner)https://github.com/gui-cs/Examples)Tests/NativeAotSmoke.Pull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)