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

Objective-C support #341

Merged
merged 22 commits into from Nov 10, 2015
Merged

Objective-C support #341

merged 22 commits into from Nov 10, 2015

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Nov 7, 2015

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.

@@ -31,6 +31,14 @@ def mark?
kind == 'source.lang.swift.syntaxtype.comment.mark'
end

def enum?
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to objc_enum?

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 7, 2015

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).

@pcantrell
Copy link
Collaborator

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!

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 7, 2015

@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.

@orta
Copy link
Collaborator

orta commented Nov 7, 2015

This looks so cool

@segiddins
Copy link
Collaborator

Maybe just disable verbose mode for that spec?

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 8, 2015

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
@segiddins
Copy link
Collaborator

Wait, doesn't jazzy have one we can disable? I can't remember....

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 8, 2015

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

@segiddins
Copy link
Collaborator

Ah, you're manually calling the command with the absolute path. Maybe just put it in back ticks and let the shell expand it?

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 8, 2015

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about struct typedefs?

Copy link
Collaborator Author

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?

@segiddins
Copy link
Collaborator

RestKit is well documented 😉 maybe that'll be my spec for documenting an ObjC pod?

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 10, 2015

This looks good enough to me... merging because #YOLO

🎉 Jazzy now has Objective-C support! 🎉

jpsim added a commit that referenced this pull request Nov 10, 2015
@jpsim jpsim merged commit 1080bcd into master Nov 10, 2015
@jpsim jpsim deleted the objc branch November 10, 2015 01:38
@pcantrell
Copy link
Collaborator

Crazy dances like that are what being on version 0.x is all about!

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

Successfully merging this pull request may close these issues.

None yet

5 participants