An issue was opened in Swift-DocC to track this as well: `@_exported import`s should not emit symbols from external dependencies · Issue #331 · apple/swift-docc · GitHub.
In the kind of setup the mentioned project has, where a module A export-imports a module B and documentation B is being published independently, it would make sense for DocC to recognize that and instead of re-emitting B's symbols in A's documentation, to instead have A link to B in some way. This is something that should happen automatically when building documentation for multiple targets at once (e.g., via Allow combined documentation of multiple targets · Issue #255 · apple/swift-docc · GitHub).
In cases where you're not building A and B together (e.g., B is dynamically linked), and thus the build system doesn't know whether you'll be publishing documentation for B, it would still be good to provide extra flexibility to exclude B's symbols. @QuietMisdreavus has been toying with the idea of a @_hidden
attribute that you'd attach to @_exported
imports to indicate that the symbols should be excluded from the build.