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

Failing but the reason is not clear. #161

Closed
rodriguise opened this issue Feb 9, 2015 · 13 comments
Closed

Failing but the reason is not clear. #161

rodriguise opened this issue Feb 9, 2015 · 13 comments
Assignees
Milestone

Comments

@rodriguise
Copy link

Failed to generate documentation

/Library/Ruby/Gems/2.0.0/gems/jazzy-0.1.0/lib/jazzy/sourcekitten.rb:51:in `run_sourcekitten': Running `/Library/Ruby/Gems/2.0.0/gems/jazzy-0.1.0/lib/jazzy/sourcekitten/sourcekitten doc` failed:  (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.1.0/lib/jazzy/doc_builder.rb:55:in `build'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.1.0/bin/jazzy:15:in `<top (required)>'
    from /usr/bin/jazzy:23:in `load'
    from /usr/bin/jazzy:23:in `<main>'
@segiddins
Copy link
Collaborator

This is a known issue with sourcekitten.

@Simulacrotron
Copy link

@segiddins is there any workaround

@Bierrot
Copy link

Bierrot commented Mar 5, 2015

Same here, only for objective-c project

@segiddins
Copy link
Collaborator

This should be fixed in Jazzy 0.1.2?

@jpsim
Copy link
Collaborator

jpsim commented Apr 3, 2015

I'm unsure what this issue is, so I can't say if it will be fixed in the next version of jazzy. If you can run sourcekitten on your project and post the output here, I'll be able to help troubleshoot.

@jpsim
Copy link
Collaborator

jpsim commented Apr 30, 2015

@rodriguise @Simulacrotron @Bierrot could you check to see if this issue still happens with the latest version of jazzy (0.2.0)? If it does, please share steps to reproduce. Thanks!

@jpsim jpsim added the bug label Apr 30, 2015
@nicolas-miari
Copy link

I get a similar error log (Xcode 7 Beta 5, Swift 2):

fatal error: unexpectedly found nil while unwrapping an Optional value
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.2.4/lib/jazzy/sourcekitten.rb:71:in `run_sourcekitten'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.2.4/lib/jazzy/doc_builder.rb:53:in `block in build'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.2.4/lib/jazzy/doc_builder.rb:51:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.2.4/lib/jazzy/doc_builder.rb:51:in `build'
    from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.2.4/bin/jazzy:15:in `<top (required)>'
    from /usr/bin/jazzy:23:in `load'
    from /usr/bin/jazzy:23:in `<main>'

...is it the same issue?

@jpsim
Copy link
Collaborator

jpsim commented Sep 2, 2015

@nicolas-miari the version of jazzy you're using only targets Swift 1.2. For Swift 2.0 support (only with Xcode 7 Beta 6), please use the swift-2.0 branch (#261).

@nicolas-miari
Copy link

Great, thanks! Sorry I missed that.

@nicolas-miari
Copy link

@jpsim I had some issues building json -v 1.8.3 during the bundle install part, but after installing the xcode command line tools (as suggested somewhere), it worked! All my project's classes and extensions are documented (--min-acl internal)

Because of the wording of Jazzy's README.md page, I was afraid I also would have to build sourcekitten from source, but that doesn't seem to be the case.

@nicolas-miari
Copy link

...aaaand, the same command fails when I paste it to Xcode's RunScript phase (so that my docs update everytime I build the target):

/Users/(my_username)/Projects/Jazzy/jazzy.gemspec:17: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/(my_username)/Projects/Jazzy/lib/jazzy/sourcekitten.rb:72:in `run_sourcekitten': undefined method     `as_env' for nil:NilClass (NoMethodError)
        from /Users/(my_username)/Projects/Jazzy/lib/jazzy/doc_builder.rb:53:in `block in build'
    from /Users/(my_username)/Projects/Jazzy/lib/jazzy/doc_builder.rb:51:in `chdir'
    from /Users/(my_username)/Projects/Jazzy/lib/jazzy/doc_builder.rb:51:in `build'
    from /Users/(my_username)/Projects/Jazzy/bin/jazzy:15:in `<main>'
Command /bin/sh failed with exit code 1

(side note: yes, I built the gem into ~/Projects/Jazzy/bin/ and haven't played with the PATH yet... Not sure what's the best course of action; but for now I run jazzy with the full path to the executable)

Any tips on what could be happening?

@jpsim
Copy link
Collaborator

jpsim commented Sep 2, 2015

@nicolas-miari in your case, jazzy is failing because it can't find an Xcode version for the version of Swift you've requested (or 1.2 by default). Could you please open a new issue so we can troubleshoot?

@nicolas-miari
Copy link

Weird... I did run xcode-select to point to the (laterst) beta. Will open issue now, thanks!

@jpsim jpsim closed this as completed Nov 24, 2015
@istx25 istx25 modified the milestone: The Past Nov 22, 2016
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

7 participants