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

Enhancement - Extensions #242

Closed
khoogheem opened this issue May 30, 2015 · 8 comments
Closed

Enhancement - Extensions #242

khoogheem opened this issue May 30, 2015 · 8 comments

Comments

@khoogheem
Copy link

Right now if I have a Class called: SomeClass

I make public extensions to better split up the code (similar to what apple does), however Jazzy treats that as an Extension to SomeClass, just like an extension to String or Int..

Would like to have the ability to put all of the Public Extensions of SomeClass into the same Class documentation. So all of the functions are found in one place.

@jpsim
Copy link
Collaborator

jpsim commented May 30, 2015

That would be a nice option, agreed.

@tachtevrenidis
Copy link

For me, jazzy chokes on most extensions (pretty much all of the ones that I have). Is it just me or should I file this as an issue?

Parsing AlamofireParameterEncodingExtensions.swift (106/168)

sourcekit: [1:connection-event-handler:7943: 0.0000] Connection interrupt

sourcekit: [1:pingService:7943: 0.0007] pinging service

sourcekit: [1:sourcekitd_send_request_sync:1551: 0.0013] request dropped while restoring service
from /Users/kosta/.rvm/gems/ruby-head/gems/jazzy-0.2.1/lib/jazzy/sourcekitten.rb:84:in run_sourcekitten' from /Users/kosta/.rvm/gems/ruby-head/gems/jazzy-0.2.1/lib/jazzy/doc_builder.rb:53:inblock in build'
from /Users/kosta/.rvm/gems/ruby-head/gems/jazzy-0.2.1/lib/jazzy/doc_builder.rb:51:in chdir' from /Users/kosta/.rvm/gems/ruby-head/gems/jazzy-0.2.1/lib/jazzy/doc_builder.rb:51:inbuild'
from /Users/kosta/.rvm/gems/ruby-head/gems/jazzy-0.2.1/bin/jazzy:15:in <top (required)>' from /Users/kosta/.rvm/gems/ruby-head/bin/jazzy:23:inload'
from /Users/kosta/.rvm/gems/ruby-head/bin/jazzy:23:in <main>' from /Users/kosta/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:ineval'
from /Users/kosta/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in `

'

@jpsim
Copy link
Collaborator

jpsim commented Jun 29, 2015

@tachtevrenidis that seems like an unrelated issue, although I'd love if you could share a sample project that reproduces that connection interrupt. Without those, it's a bit hard to fix.

@emaloney
Copy link

I've seen this sort of issue when running the Xcode 7 beta side-by-side with Xcode 6.3.x.

The latter is required for jazzy to run correctly, so generating documentation with jazzy when both are installed works best when you do the following before invoking jazzy:

sudo xcode-select -s /Applications/Xcode.app
export DEVELOPER_DIR=`xcode-select -p`

This is what fixed the issue for me; hope it works for you.

(Note that some Swift 2.0 constructs will cause jazzy to choke. The commands above won't help in those cases.)

@tachtevrenidis
Copy link

Thanks guys (please let me know if i need to transfer this to a new issue). I am using 6.3.2 and 6.4 beta and I am not noticing any difference in behavior with jazzy. I don't have xcode 7 installed. The code is in Swift 1.2. Here is one of the files that it chokes on (I had to redact some code, only method signatures are shown):

import Foundation
import Alamofire

extension Alamofire.Request {
    func responseIcnJson(queue: dispatch_queue_t? = nil, completionHandler: (NSURLRequest, NSHTTPURLResponse?, NSDictionary?, NSError?) -> Void) -> Self {
    }

    class func icnJsonserializer() -> Alamofire.Request.Serializer {
        return {
            request, response, data in 
        }
    }

@jpsim
Copy link
Collaborator

jpsim commented Jun 29, 2015

@tachtevrenidis I've opened a new issue (#253) where we can continue discussing the connection interrupt issue you're having, so as to not confuse this current issue, which is meant to track improving documentation around extensions.

@pcantrell
Copy link
Collaborator

#267 appears to be a duplicate of this issue. PR #278 addresses the concern.

@jpsim
Copy link
Collaborator

jpsim commented Dec 30, 2015

I believe these issues are all fixed.

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

No branches or pull requests

6 participants