Document Extensions to External Types Using DocC

Just a quick update for those following this thread: An initial implementation is almost ready to be merged, but I need your help deciding a last specification detail:

4 Likes

Update: the feature is finally ready for you to try it out! Please check it out here: Enablement of DocC Extension Support as an Opt-In Feature

2 Likes

Hey @theMomax !

First of all thank you for your work! I've been waiting for that feature :slight_smile:

Unfortunately, I am encountering an error when calling generate-documentation to generate a documentation:

swift package \
    --allow-writing-to-directory "./docs" \
    generate-documentation \
    --disable-indexing \
    --hosting-base-path "MyPackage" \
    --included-extended-types \
    --output-path "./docs" \
    --target "MyPackage" \
    --transform-for-static-hosting

Output:

Building for debugging...
Build complete! (0.17s)
Generating documentation for 'MyPackage'...
Building for debugging...
Build complete! (0.14s)
Converting documentation...
Error: Unknown option '--included-extended-types'
Usage: docc convert [<options>] <source-bundle-path>
  See 'docc convert --help' for more information.
error: 'docc convert' invocation failed with a nonzero exit code: '64'

However, the call below works fine and I can see Extended Modules section:

swift package --disable-sandbox preview-documentation --target "MyPackage" --include-extended-types

Could you point me where I did a mistake or it is a bug?

The option is --include-extended-types, not --included-extended-types - looks like a tiny hard-to-spot typo.

5 Likes

Thank you!!! :slight_smile:

It works fantastic now! :slight_smile:

1 Like

@ethankusters would be worth to tweak the release notes with --include-extended-types in description to prevent potential situations like I had :slight_smile:

4 Likes

Oh my bad! Good catch – thank you! Should be fixed now.

1 Like