Skip to content

Update to TG 2.5.x (PR 5416 preview) - #326

Open
tig wants to merge 3 commits into
v2from
tg25-port
Open

Update to TG 2.5.x (PR 5416 preview)#326
tig wants to merge 3 commits into
v2from
tg25-port

Conversation

@tig

@tig tig commented Aug 22, 2026

Copy link
Copy Markdown
Member

⚠️ DO NOT MERGE with the pre-release pin in place

This PR pins a vendored pre-release build (Terminal.Gui 2.5.0-tig-remove-cm-followup.2, built from tui-cs/Terminal.Gui#5416) so the port can be validated ahead of the v2.5.0 release. Before merging, once a public 2.5.x package is on nuget.org:

  1. Update the Terminal.Gui pin to the public 2.5.x version in: src/TerminalGuiDesigner.csproj and Showcase/Showcase.csproj
  2. Delete local_packages/ and the tgui-pr-5416 package source in nuget.config (delete the file if that source is all it adds)
  3. Revert the .gitignore exception for the vendored packages (if present)
  4. Re-run build and tests and confirm Terminal.Gui restores from nuget.org

Ports TerminalGuiDesigner to the Terminal.Gui 2.5.0 preview as part of the v2.5.0 ecosystem-validation gate (tui-cs/Terminal.Gui#5630).

TEMP: vendored package

Terminal.Gui PR tui-cs/Terminal.Gui#5416 (legacy ConfigurationManager removal) is not yet merged, so 2.5.x is not on nuget.org. This PR vendors a nupkg built from that PR branch:

  • local_packages/Terminal.Gui.2.5.0-tig-remove-cm-followup.2.nupkg (+ .snupkg), with a .gitignore exception so they commit
  • nuget.config adds a local package source (tgui-pr-5416./local_packages)
  • src/TerminalGuiDesigner.csproj and Showcase/Showcase.csproj pin Terminal.Gui to 2.5.0-tig-remove-cm-followup.2 (TEMP comments inline)

Re-vendored 2026-08-22: the original followup.1 package was built from a stale #5416 commit (93c3b3d4) that carried config-load defects fixed later on the branch; followup.2 is built from the #5416 head (e8aba423).

Follow-up: once Terminal.Gui 2.5.x ships on nuget.org, swap the pin to the public package and delete local_packages/ + the nuget.config source. Pattern precedent: tig/winprint#272.

Code changes / API breaks

  • No C# source changes were required for the port itself. The entire solution (src, tests, Showcase) compiles clean against the 2.5.0 preview:
    • No legacy ConfigurationManager / ConfigLocations / [ConfigurationProperty] usage in this repo.
    • No View.Text overrides / new-hiding (the 2.5.0 Text CWP change is a no-op here).
    • No IAcceptTarget references (namespace move to Terminal.Gui.Input is a no-op here).
  • Review follow-up (one small fix): an audit of string-based reflection over Terminal.Gui internals found ViewExtensions.GetExplicitScheme reflecting a private field "_Scheme" that is actually named _scheme (since at least TG 2.4.5), so the method threw "Scheme private backing field no longer exists" on every call. This was a pre-existing latent defect on v2 (the method currently has no in-repo callers), not 2.5.0 fallout. Fixed test-first to use the public View.HasScheme / View.GetScheme API, with a new regression test (ViewExtensionsTests.TestGetExplicitScheme_NullUntilExplicitlySet). All other reflected members (_commandImplementations, Key.KeyCode, LinearRangeOption Legend/LegendAbbr/Data) were verified present in the 2.5.0 preview.
  • Dependency fallout: Microsoft.Extensions.Configuration{,.Binder,.FileExtensions,.Json} bumped 10.0.010.0.11 to satisfy the Terminal.Gui 2.5.0 dependency floor (NU1605 package-downgrade errors otherwise).

Build / test

  • dotnet build src/TerminalGuiDesigner.sln: succeeded, 0 errors (also verified with a clean package cache: restore pulls Terminal.Gui from ./local_packages with no NU1605/NU1608)
  • dotnet test (tests/UnitTests, NUnit): 1045 passed, 0 failed, 27 skipped (the skips are pre-existing Assert.Ignore/Assert.Warn known-bug cases in PosTests, MouseManagerTests, AddViewOperationTests, MenuBarTests, and ViewFactoryTeststests/ is otherwise unchanged vs v2, so all skips predate this port)

🤖 Generated with Claude Code

https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL

…ui#5416)

TEMP: vendor a Terminal.Gui 2.5.0-tig-remove-cm-followup.1 nupkg built from
tui-cs/Terminal.Gui#5416 (ConfigurationManager removal) under ./local_packages,
wired up via nuget.config, until 2.5.x ships on nuget.org.

- Pin Terminal.Gui to 2.5.0-tig-remove-cm-followup.1 in src and Showcase
- Bump Microsoft.Extensions.Configuration family 10.0.0 -> 10.0.11 to satisfy
  the Terminal.Gui 2.5.0 dependency floor (NU1605)
- .gitignore exception so the vendored packages commit

No C# source changes required; solution builds clean and all unit tests pass
(1044 passed, 0 failed, 27 pre-existing skips).

Part of the v2.5.0 ecosystem-validation gate (tui-cs/Terminal.Gui#5630).
Pattern precedent: tig/winprint#272.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9c9adb91c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/TerminalGuiDesigner.csproj Outdated
<PackageReference Include="Terminal.Gui" Version="2.4.5" />
<!-- TEMP: vendored 2.5.0 preview from tui-cs/Terminal.Gui#5416 (see ./local_packages
and nuget.config). Swap to the public 2.5.x package once it ships on nuget.org. -->
<PackageReference Include="Terminal.Gui" Version="2.5.0-tig-remove-cm-followup.1" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the unpublished dependency out of releases

When a version tag triggers the publish step in .github/workflows/build.yml, the packed global tool will declare this preview as a dependency, but nuget.config and local_packages/ are repository-only and the workflow pushes only TerminalGuiDesigner*.nupkg to nuget.org. Because the comment establishes that this Terminal.Gui version is not available there, installing the published tool from the normal source will fail dependency resolution; either prevent preview builds from being published or make the vendored dependency available to package consumers.

Useful? React with 👍 / 👎.

tig and others added 2 commits August 22, 2026 17:57
ViewExtensions.GetExplicitScheme reflected View's private field by the
name "_Scheme", but the field has been "_scheme" since at least
Terminal.Gui 2.4.5, so the method threw "Scheme private backing field no
longer exists" on every call (pre-existing latent defect surfaced by the
2.5.0 reflection audit; the method currently has no in-repo callers but
is public API).

Replace the reflection with the public View.HasScheme / View.GetScheme
API and add a regression test (test-first: the new test failed with the
old implementation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL
…ba423

The followup.1 package was built from a stale commit (93c3b3d4) of
tui-cs/Terminal.Gui#5416 that carried config-load defects fixed later on
the branch. followup.2 is built from the branch head (e8aba423).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant