Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extension blocks in DocC rule #2445

Closed
luispadron opened this issue Apr 9, 2024 · 0 comments · Fixed by #2487
Closed

Support extension blocks in DocC rule #2445

luispadron opened this issue Apr 9, 2024 · 0 comments · Fixed by #2487

Comments

@luispadron
Copy link
Contributor

With Xcode 15+ it's possible to generate documentation using DocC for extensions as well (e.g. code in an extension block).

This is enabled in Xcode via the DOCC_EXTRACT_EXTENSION_SYMBOLS Xcode configuration variable. For Bazel, we'd likely need to update the rule which currently emits symbol graphs to pass an additional flag to also emit the symbols for extension blocks.

SPM uses these flags: https://github.com/apple/swift-package-manager/blob/main/Sources/Commands/Utilities/SymbolGraphExtract.swift#L86

  • -emit-extension-block-symbols
  • -omit-extension-block-symbols
@luispadron luispadron changed the title Support extensions in DocC rule Support extension blocks in DocC rule Apr 9, 2024
luispadron added a commit to bazelbuild/rules_swift that referenced this issue Jun 20, 2024
The `emit_extension_block_symbols` attr can be used in the
`swift_extract_symbol_graph` rule to pass the
`-emit-extension-block-symbols` flag when creating the symbol graphs.
This enables generating symbol graph information for extensions of
custom types.

This is required to support
bazelbuild/rules_apple#2445
sewerynplazuk pushed a commit to sewerynplazuk/rules_apple that referenced this issue Sep 20, 2024
Updates the DocC rules to support rules_swift 2.x which introduced
breaking changes to how Swift symbol graphs are collected.

This PR updates to use the new aspect to extract the symbol graphs. The
public API remains unchanged.

Fixes bazelbuild#2445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant