# @\_nodoc attribute for hiding symbols from the symbol graph

**URL:** <https://forums.swift.org/t/nodoc-attribute-for-hiding-symbols-from-the-symbol-graph/59227>\
**Category:** Swift-DocC\
**Created:** [July 26, 2022, 2:14pm UTC](https://forums.swift.org/t/nodoc-attribute-for-hiding-symbols-from-the-symbol-graph/59227 "2022-07-26T14:14:17Z")\
**Posts on this page:** 1\
**Showing post:** 38

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [August 10, 2022, 7:57pm UTC](https://forums.swift.org/t/nodoc-attribute-for-hiding-symbols-from-the-symbol-graph/59227/38 "2022-08-10T19:57:55Z")

</div>

This will be difficult for source packages to adopt. Conditional compilation of attributes has never shipped (it is in review [right now](https://forums.swift.org/t/se-0367-conditional-compilation-for-attributes/59380)), so using this in a package would require excluding developers who need to support any currently-released version of Swift, or the imminent 5.7. A comment-based approach would, however, be usable straight away by everybody.

Such a design _would_ require that the markdown processor understand DocC directives, but that [seems to be the direction anyway](https://forums.swift.org/t/supporting-more-dynamic-content-in-swift-docc-reference-documentation/59527). It would be good to decide just how far we're willing to go beyond standard markdown, so we have a consistent answer about whether these kinds of designs (using directives in doc-comments) are acceptable.

In the future, attributes should be easier to adopt (by source packages as well). But is there an intent for this to go through swift-evolution eventually? The compiler is full of incredibly useful functionality which never goes through evolution and seems to permanently live with a leading underscore. We've thus far not deeply embedded DocC or any documentation engine in to the _language_ itself, and I worry that our hesitation on that is likely to remain, leading to yet another perpetual unstable-but-critical feature in Swift.

But if there is to be an attribute, let's not let it linger - let's get it ready for formal adoption as soon as possible. Let's not give more unstable features a chance to spread and become a defacto part of the language.

---

_[View the full topic](https://forums.swift.org/t/nodoc-attribute-for-hiding-symbols-from-the-symbol-graph/59227)._
