-
Notifications
You must be signed in to change notification settings - Fork 413
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
Add option to create only Swift or Objc docs out of Objc headers #828
Comments
Would also be nice if this account for things like Swift class names being different than Obj-C class names. I'm finding this annoying when reviewing our documentation. It defaults to the Obj-C ones, but the Swift ones are not present. |
Objective-C docs have Swift declarations that include the |
Hey @jpsim , do you mind giving me some pointers on where I can address this? To create only objc, or only swift docs out of objc headers. I can work on it and contribute back. |
The only gotcha is we need to make sure we use swift names for left nav. So not the objc but the NS_Swift_Name names are default everywhere. |
This should be pretty easy to do. Add a configuration flag here (e.g. Then depending on whether or not the flag is set, set or don't set jazzy/lib/jazzy/doc_builder.rb Lines 341 to 342 in 3895676
|
when you don't see declaration, you don't get other_language_declaration either for some reason. But the real issue is I want to get Swift type names for types, instead of objective-c ones. Is there an easy way to do it? Am I even getting them from sourcekitten? |
So I want to use SWIFT_NAME instead of name as type names. |
The So you could extend SourceKitten to also include that. |
Like this https://github.com/jpsim/SourceKitten/pull/453/files . ? @jpsim |
or is it docName? |
You'll need to look at the contents of the dictionary in |
actually "name" was what I needed. So it was all good. I just couldn't test it earlier due to not knowing how to deal with "@rpath". All good now. |
jpsim/SourceKitten#456 should do the work. Tested and works fine. |
Merged in b139d92. |
For Objc headers,
Create the a switch/nav to go between swift/objc version or just
add an argument to create only objc or only swift docs, so the switch/nav could be added manually afterwards.
The text was updated successfully, but these errors were encountered: