Ability to provide package documentation for contributors as opposed to clients?

I'm not sure that @taylorswift is entirely accurate here.

When you're generating your own documentation, what's happening under the covers is a symbol graph is getting generated, and the level of what symbols are included defaults to 'public' for libraries, and 'internal' for executables. You can absolutely control that level of generation yourself, but it's not "easy" when you're using the higher level tools of the docc-plugin or such. There's a bit of prior discussion from a year or so ago that goes into detail, allowing you to even go down to "private" if you like.

These controls are exposed as additional swift compiler flags - tl;dr:

-Xswiftc -symbol-graph-minimum-access-level -Xswiftc private

That said, external tooling that's hosting documentation - such a @taylorswift UniDoc tooling, or the automated generation at SwiftPackageIndex.com (which fundamentally uses Xcodebuild under the covers) is a bit tricker to arrange.

1 Like