Skip to content

Hidden commands are still shown within our documentation

Summary

doc/source/using_commands.rst uses Click's API in order to auto-generate some documentation for our commands.

Since the landing of our artifact and source subcommands, we've had to 'hide' some of the pre-existent commands, for example bst track -> bst source track, where the former is hidden like so: https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_frontend/cli.py#L1123

Unfortunately, the hidden commands are still present in our documentation of the top level command bst: https://docs.buildstream.build/using_commands.html#bst

What is the expected correct behaviour?

  • The hidden commands should not be present in the documentation

Possible fixes

Unless I've missed something, this looks to me like an upstream, sphinx-click, bug.

Update

The first upstream issue was closed via https://github.com/click-contrib/sphinx-click/pull/32, however this has not fixed our issue, hidden commands are still being shown as valid options when we generate the documentation for bst.

As a stop gap, !1097 (merged) has landed, this ensures that "COMMAND OBSOLETE" is present in both the man pages and the documentation of our hidden commands.

Edited by James Ennis
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information