v0.19 β v0.20: --wrap-subcommands removed¶
What changed¶
The --wrap-subcommands flag is removed from gtb generate command and
gtb regenerate project.
The flag was a no-op. Generated commands register their subcommands through the
GTB setup.Command wrapper's Register, which chains middleware
unconditionally β both for top-level commands (via NewCmdRoot's
wrapped.Register(subcommands...)) and for nested parents
(cmd.Register(child.NewCmdChild(p))). No render path ever consumed the flag, so
--wrap-subcommands=true and =false produced byte-identical code.
Impact¶
- CLI (hard break): scripts passing
--wrap-subcommandstogenerate commandorregenerate projectwill now error withunknown flag. Remove the flag from those invocations β behaviour is unchanged (middleware was always applied). - Manifests (soft): the
wrap_subcommands_with_middlewarefield is no longer written byregenerate manifest. Existing manifests that still carry it continue to load (theManifestCommandfield is retained, marked// Deprecated:); it is simply dropped on the next rewrite. No action needed. - Direct generator API consumers (soft): the
WrapSubcommandsWithMiddlewarefields on the internalgeneratortypes remain (deprecated) so code referencing them keeps compiling; they are no longer read or written.
How to migrate¶
Delete --wrap-subcommands[=β¦] from any gtb generate command / gtb regenerate
project calls. Nothing else is required β every subcommand is, and always was,
middleware-wrapped.