-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Following up from the Swift Forums thread: DocC omits @Sendable. Bug or intentional?.
Ole provided a small example and output that shows DocC clearly missing the @sendable annotation, which I suspect is a miss underneath in the symbol graph extraction/generation logic, akin to the issue with labeling classes as actors in #212.
This was originally citing about method parameters, but per Slava pointed out:
bear in mind that unlike
@autoclosurefor example,@Sendableis not a parameter option, because it can appear anywhere within a type, for examplefunc f(_: Array<@Sendable () -> ()>).
Checklist
- If possible, I've reproduced the issue using the
mainbranch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
The documentation generated for a symbol includes @sendable annotations, if applied in the source
Actual behavior
The @sendable annotation isn't reflected in documentation.
Steps To Reproduce
- Create a project with the sample code:
struct StructWithSendable {
public func doSomething(_ body: @Sendable () -> Void) {}
}- Generate content for it
- View the resulting symbol in documentation, it should be something akin to:
func doSomething(_ body: @Sendable () -> Void)
Swift-DocC Version Information
6.2.1
Swift Compiler Version Information
swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.3.3.2 clang-1700.6.3.2)
Target: arm64-apple-macosx26.0Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working