@_nodoc attribute for hiding symbols from the symbol graph

Based on the discussion here, i've updated the implementation in the PR to turn the attribute from @_nodoc into @_documentation(...), allowing you to add an arbitrary "documentation category" to a symbol. This includes two special-case categories:

  • @_docuentation(underscored) treats the symbol as if it had an underscored name (i.e. the old @_nodoc behavior), hiding it from public docs.
  • @_documentation(ignoreUnderscored) does the opposite, forcing an underscored symbol to appear as if it were not underscored, allowing public symbols like the enum case in this issue to be visible in public docs.

Regardless of what you write in the attribute, the category will be visible in the symbol graph in the symbol's "category" field, allowing tooling to use these categories for any purpose.

4 Likes