Experimental chain workspace builder (scaffold)#1068
Open
tony wants to merge 3 commits into
Open
Conversation
why: Land the experimental ChainWorkspaceBuilder from #1054 on the new builder package. It builds the window/pane tree via libtmux's chain API (libtmux#685), which is unreleased and absent from published libtmux, so the scaffold must import cleanly and fail with an actionable error rather than crash on import. what: - Add src/tmuxp/workspace/builder/chain.py: ChainWorkspaceBuilder subclasses ClassicWorkspaceBuilder; guard the experimental import behind _HAVE_CHAIN so the module imports without the API - build() raises exc.WorkspaceBuilderImportError when the chain API is absent; when present, port #1054's single-ForwardPlan build - Register the `chain` entry point in tmuxp.workspace_builders - Export ChainWorkspaceBuilder from the builder package - Add tests: test_builder_chain.py importorskips the chain API; the new test_builder_chain_unavailable.py asserts selecting `chain` without the API resolves the class yet raises on build()
why: Tell users the chain builder exists, how to select it, and that it is non-functional until libtmux's unreleased chain API ships. what: - Add docs/internals/api/workspace/builder/chain.md autodoc page with an unreleased-API warning; add it to the builder index grid and toctree - Add an "Experimental chain builder" section to the custom-workspace- builders topic and list it under Reference - Add a CHANGES entry under 1.74.0 noting the opt-in builder requires libtmux#685 and is non-functional until that ships
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1068 +/- ##
=======================================
Coverage 82.56% 82.56%
=======================================
Files 31 31
Lines 2770 2770
Branches 518 518
=======================================
Hits 2287 2287
Misses 346 346
Partials 137 137 β View full report in Codecov by Harness. π New features to boost your workflow:
|
why: the chain builder's plan-building methods require the unreleased libtmux._experimental.chain API (libtmux#685) and cannot execute on released libtmux, so codecov flagged the unmeasurable lines as a project-coverage drop. what: - Omit src/tmuxp/workspace/builder/chain.py from coverage until the experimental API ships and the builder becomes testable
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.
Summary
ChainWorkspaceBuilder(workspace_builder: chain), an experimental builder that constructs the session β window β pane tree from a single libtmuxForwardPlan.WorkspaceBuilderImportErrorinstead of an import crash.Status
Groundwork toward the parallel/batched builder (roadmap #1058, #1062). Not functional on released libtmux β it requires the experimental chain API (libtmux#685). Its API-dependent tests skip until that ships; the unavailable-path test runs and passes today.
Changes
workspace/builder/chain.py(new, import-guarded),chainentry point, tests (importorskip + unavailable path), docs, CHANGES.Supersedes #1054, re-homed onto the #1066 framework; selection is via
workspace_builder: chain(the old--builderCLI flag is dropped).Test plan