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
Objective-C support #341
Objective-C support #341
Conversation
@@ -31,6 +31,14 @@ def mark? | |||
kind == 'source.lang.swift.syntaxtype.comment.mark' | |||
end | |||
|
|||
def enum? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this clash with swift enums?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to objc_enum?
…t them as undocumented
You can browse the docs for Realm Objective-C that this branch generates here: https://static.realm.io/jazzy_demo/Realm/ (Realm PR realm/realm-swift#2817). |
Thanks for the link to the generated docs. At a glance, the output looks impressively high-quality. I can’t comment on the implementation, but in terms of functionality, I’d say that this is at the point of “merge now and fix any bugs later.” Also, I know it’s not this PR, but I love what the “Show on Github” links do for the docs! |
@pcantrell thanks for taking a look! If you're curious about the implementation, most of it is in jpsim/SourceKitten#57. @segiddins do you know how we could ignore execution_output.txt for just the Objective-C spec using CLIntegracon? We currently have to pass in the path to the SDK, which is machine-dependent. |
This looks so cool |
Maybe just disable verbose mode for that spec? |
Does CLIntegracon have a verbose mode? How do I turn it off for that test? |
until we have a way to turn it off on a spec-by-spec basis
Wait, doesn't jazzy have one we can disable? I can't remember.... |
It's not in Jazzy. It's in CLIntegracon. If you look at the failure (https://travis-ci.org/realm/jazzy/jobs/89867901), it's CLIntegracon that's producing a different output: -JAZZY_FAKE_DATE=YYYY-MM-DD JAZZY_FAKE_VERSION=X.X.X COCOAPODS_SKIP_UPDATE_MESSAGE=TRUE jazzy --objc --author Realm --author_url "https://realm.io" --github_url https://github.com/realm/realm-cocoa --github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 --module Realm --module-version 0.96.2 --root-url https://realm.io/docs/objc/0.96.2/api/ --xcodebuild-arguments --objc,Realm/Realm.h,-x,objective-c,-isysroot,/Applications/Xcode-7.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk,-I,/Users/jp/Projects/jazzy/spec/integration_specs/document_realm_objc/before --template-directory "docs/templates" 2>&1
+JAZZY_FAKE_DATE=YYYY-MM-DD JAZZY_FAKE_VERSION=X.X.X COCOAPODS_SKIP_UPDATE_MESSAGE=TRUE jazzy --objc --author Realm --author_url "https://realm.io" --github_url https://github.com/realm/realm-cocoa --github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 --module Realm --module-version 0.96.2 --root-url https://realm.io/docs/objc/0.96.2/api/ --xcodebuild-arguments --objc,Realm/Realm.h,-x,objective-c,-isysroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk,-I,/Users/travis/build/realm/jazzy/spec/integration_specs/document_realm_objc/before --template-directory "docs/templates" 2>&1 |
Ah, you're manually calling the command with the absolute path. Maybe just put it in back ticks and let the shell expand it? |
Good idea! Done. Hopefully that works. |
@@ -340,6 +342,18 @@ def self.autolink(docs, data) | |||
end | |||
end | |||
|
|||
def self.reject_objc_enum_typedefs(docs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about struct typedefs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only tested this on Realm, which doesn't have any structs in its public API. So yes, this would likely have to be expanded for structs.
Relatedly, it'd be great to add another, well-documented ObjC library. Thoughts?
RestKit is well documented 😉 maybe that'll be my spec for documenting an ObjC pod? |
this alleviates the need to pass in the full set of clang compiler commands when documenting an Objective-C project
Crazy dances like that are what being on version 0.x is all about! |
The bulk of the work can be found in jpsim/SourceKitten#57. I still need to update the integration fixtures and add ObjC integration specs.