Skip to content

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-subcommands to generate command or regenerate project will now error with unknown flag. Remove the flag from those invocations β€” behaviour is unchanged (middleware was always applied).
  • Manifests (soft): the wrap_subcommands_with_middleware field is no longer written by regenerate manifest. Existing manifests that still carry it continue to load (the ManifestCommand field is retained, marked // Deprecated:); it is simply dropped on the next rewrite. No action needed.
  • Direct generator API consumers (soft): the WrapSubcommandsWithMiddleware fields on the internal generator types 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.