Do not skip over empty Objective C categories. - #1421
Conversation
|
The objective c declaration in the generated docs is missing the protocol conformance. I tried logging the doc and declaration objects for this category, and do not see any references to the protocol conformance other than in the actual doc comment.
Do you have any suggestions for how we could get the actual conformance to also show up correctly in the declaration in the generated docs? |
|
(I haven't written Objective-C in anger since the 20th century so bear with me...) It looks like there are a couple of things going on here. Jazzy doesn't know how to determine protocol conformances for Obj C types. This means the The tougher problem is the missing angle-bracket protocol conformance thing. LibClang only generates declarations when there are doc comments; this declaration appears to omit the protocol conformance. If there is no doc comment then SourceKitten just plugs in the entire source declaration which is why you get ugly code dumps if you omit doc comments. ref. To make progress on this would need to figure out the sourcekitten part. |
Background
For a header like below that just declares conformance for
UIScreenwith a protocol calledGMSNavigationScreenMetricsbased on properties that UIScreen already implements, Jazzy does not currently generate any documentation to indicate / declare this conformance:If we explicitly add any members to this category, documentation is generated for
UIScreen(GMSNavigationStepImageOptions)in theCategoriessection.Change Description
This PR forces empty Objective C categories to be documented by not skipping over declarations that are empty extensions if they have are of the type
objc_category.Please let me know if you:
Thanks!