Conversation
…tionManager Bump Terminal.Gui 2.4.10 -> 2.5.0-tig-remove-cm-followup.1, a preview build of tui-cs/Terminal.Gui#5416 (ConfigurationManager removal), TEMP-vendored in ./local_packages via a "tgui-pr-5416" nuget.config source until 2.5.x ships on nuget.org. API migration: - ConfigurationManager.AppName/Enable(ConfigLocations.All) -> new TuiConfigurationBuilder("<cmdlet>").ApplyToStaticFacades() in OutConsoleGridView and ShowObjectView (config is now also auto-applied at assembly load via TuiConfigurationBuilder.Shared). - Drop the redundant Enable call in OutGridViewWindowIntegrationTests. 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
The vendored Terminal.Gui 2.5.0-tig-remove-cm-followup.1 was built from tui-cs/Terminal.Gui@93c3b3d40, five commits behind the PR 5416 head, and predated that branch's ultrareview fixes. In that build ./.tui/ config paths resolve against AppContext.BaseDirectory (pwsh's install directory for this module), so the GlobalCurrent and AppCurrent config locations that 2.4.x resolved against the process working directory were silently dead - contradicting the port's own comments. Test-first fixes: - New TuiConfigurationTests pin CWD-relative discovery of ./.tui/config.json and ./.tui/Out-ConsoleGridView.config.json (both failed against followup.1), explicit-currentDirectory discovery, and no-throw fallback on malformed config files. - Re-vendor Terminal.Gui 2.5.0-tig-remove-cm-followup.2 built from the PR 5416 head (tui-cs/Terminal.Gui@e8aba4230) with an explicitly set version, so the stale-cache collision GitVersion caused (same followup.1 version for different commits) cannot recur. - Pass the PowerShell session's current filesystem location (SessionState.Path.CurrentFileSystemLocation) through ApplicationData to TuiConfigurationBuilder's new currentDirectory parameter: pwsh does not sync the process working directory with Set-Location, so without this ./.tui/ discovery used wherever pwsh was launched, not where the user cd'd. Verified: Invoke-Build -Configuration Release Clean, Build, Test - 82/82 xUnit, 20/20 Pester, 26 assemblies packaged; clean-cache restore from ./local_packages; in-host pwsh probe confirms ./.tui/<cmdlet>.config.json now applies from the session's cd location. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 head e8aba4230) 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:Directory.Packages.propslocal_packages/and thetgui-pr-5416package source innuget.config(No
.gitignorechange is needed: nothing in.gitignorecoverslocal_packages/.)Ports PSTui to the Terminal.Gui 2.5.0 preview built from tui-cs/Terminal.Gui#5416 (ConfigurationManager removal), as part of the v2.5.0 ecosystem-validation gate (tui-cs/Terminal.Gui#5630). Pattern precedent: tig/winprint#272.
TEMP: vendored package pin
Terminal.Gui 2.5.x is not on nuget.org yet, so this PR vendors a preview nupkg built from the PR 5416 branch:
local_packages/Terminal.Gui.2.5.0-tig-remove-cm-followup.2.nupkg(+.snupkg) committed to the repo — built from PR 5416 heade8aba4230with an explicitly set version (GitVersion had produced the samefollowup.1version string for different commits, which is how a stale build got vendored the first time)nuget.configgains atgui-pr-5416source pointing at./local_packagesDirectory.Packages.propspinsTerminal.Guito2.5.0-tig-remove-cm-followup.2All three carry
TEMPcomments. Follow-up: once 2.5.x is published to nuget.org, swap the pin to the public version and deletelocal_packages/plus the extra nuget source.Code changes (2.5.0 API breaks fixed)
TuiConfigurationBuilder:OutConsoleGridView.StartUi:ConfigurationManager.AppName = "Out-ConsoleGridView"; ConfigurationManager.Enable(ConfigLocations.All);→new TuiConfigurationBuilder("Out-ConsoleGridView", currentDirectory).ApplyToStaticFacades();ShowObjectView.Run:ConfigurationManager.Enable(ConfigLocations.All)→new TuiConfigurationBuilder("Show-ObjectTree", currentDirectory).ApplyToStaticFacades();(explicit app name matters here — the entry assembly is pwsh, so app-scoped./.tui/<cmdlet>.config.jsondiscovery needs it)SessionState.Path.CurrentFileSystemLocation) throughApplicationData.CurrentDirectoryinto the builder'scurrentDirectoryparameter: pwsh does not sync the process working directory withSet-Location, so without this,./.tui/config discovery would resolve against wherever pwsh was launched rather than the user's current locationOutGridViewWindowIntegrationTests: dropped theEnablecall — 2.5 applies configuration (library defaults,~/.tui,./.tui,TUI_CONFIG) automatically at assembly load viaTuiConfigurationBuilder.SharedTuiConfigurationTests(4 tests) pin the config-discovery contract the cmdlets rely on: CWD-relative and explicit-directory discovery of./.tui/config.jsonand./.tui/Out-ConsoleGridView.config.json, and no-throw fallback on malformed config files. The two CWD tests fail against the originalfollowup.1vendored build (it resolved./.tui/againstAppContext.BaseDirectory— pwsh's install directory — a regression vs 2.4.x fixed upstream in the PR 5416 branch), which is why the vendored package was rebuilt from the branch head.View.Textoverrides, noIAcceptTargetusage, and ships noconfig.jsonVerification
dotnet build: clean, Debug and Release (only pre-existing warnings)dotnet restoreconfirmed to resolve Terminal.Gui from./local_packagesInvoke-Build -Configuration Release Clean, Build, Test(what CI runs): 82/82 xUnit passed, 20/20 Pester passed, module packaging (PSTui + Terminal.Gui closure, 26 assemblies — including the Microsoft.Extensions.Configuration.* closure 2.5 adds, derived automatically fromdeps.json) succeededSet-Locationto a directory containing.tui/Out-ConsoleGridView.config.jsonwith"Theme": "Dark"→ the migrated call discovers and applies it while the process CWD points elsewhere🤖 Generated with Claude Code
https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL