Discussion: CLI symbol graph for Argument Parser – SymbolKit dependency vs local implementation

Hello everyone,

I’m exploring adding support for generating a CLI symbol graph from Swift Argument Parser (covering commands, subcommands, flags, and options) so that tools like DocC can consume structured data.

I’m considering two implementation approaches and would appreciate guidance on the preferred direction.

Option A: Use SymbolKit
Add swift-docc-symbolkit as a dependency and use it to emit the symbol graph.

  • Pros: less custom code, aligned with DocC’s format

  • Concern: introduces a new dependency to swift-argument-parser

Option B: No new dependency
Either encode the symbol graph JSON manually or generate it from a separate tool that uses SymbolKit.

  • Pros: keeps swift-argument-parser dependency-free

  • Trade-off: more code or an additional step

Question:
Is adding SymbolKit as a dependency acceptable here, or is there a strong preference to keep the swift-argument-parser dependency-free?

I’ll align the implementation accordingly in my proposal. Any suggestion is useful.

Thanks!