Although I’ve been using DocC (through its Swift compiler plugin) for a while, I’m new to contributing to DocC. So I have some beginner’s questions.
My understanding so far is that:
- swift-docc transforms in-source documentation into a symbol graph.
- swift-docc-render transforms that symbol graph into a Vue.js SPA.
- The swift-docc-plugin (namely, its
generate-documentation
command) does #1 then #2.
Assuming the three descriptions above are all reasonably accurate, which they may very well not be,
- Why does the swift-docc-plugin README state that swift-docc outputs a documentation archive, not a symbol graph?
- As far as I know, the documentation archive and the symbol graph are both JSON representations of the symbols in the source code: the former is packaged as a
.doccarchive
file, and the latter is technically a conceptual graph implemented as a Swift struct that’s then encoded into JSON. But what is the relationship between the two?
- As far as I know, the documentation archive and the symbol graph are both JSON representations of the symbols in the source code: the former is packaged as a
- Why does swift-docc depend on swift-docc-plugin? Shouldn’t it be the other way around? (The dependency is declared here. Even more curiously, the dependency on swift-docc-plugin doesn’t seem to actually be used by any compilation targets.)
- Similarly, why doesn’t swift-docc-plugin depend on swift-docc-render? If assumption #3 is correct, then swift-docc-plugin’s
generate-documentation
command is essentially just swift-docc followed by swift-docc-render. - Why does swift-docc-render include a script for generating a symbol graph? Isn’t that the purview of swift-docc?
Thanks!