-
Notifications
You must be signed in to change notification settings - Fork 414
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
Cannot generate documentation for targets with spaces in the name #259
Comments
It seems to also be the case for targets with a dash ( |
You should be able to wrap your arguments in single quotes:
|
That doesnt seem to work. My script to create documentation is: #!/bin/sh
jazzy -m "StreamOne iOS SDK" \
-a "StreamOne" \
-u https://streamone.nl \
-g https://github.com/StreamOneNL/iOS-SDK \
--github-file-prefix https://github.com/StreamOneNL/iOS-SDK/blob/master \
--module-version 3.0 \
-x '-project,StreamOneSDK.xcodeproj,-scheme,StreamOneSDK-iOS' \
-c And the output can be found at http://meuk.nickygerritsen.nl/jazzy-output.txt (didn't paste it here because it is really big). |
Thanks for posting the link to that output, I think I know why this is happening. tl;dr; The longer explanation: jazzy uses SourceKit to extract documentation the same way Xcode does. To do this, it needs to know which compiler arguments are required to build the module. The best way I've found to get the appropriate compiler arguments is to run |
I changed it to |
could you try disabling incremental builds in Xcode and trying again? |
I'm trying to find this in XCode, but fail to do so :(. Google does not really help, so where can I find this? |
Hmmm, the incremental build really shouldn't be affecting this. Running the following, I can get the compiler arguments: let path = "/path/to/jazzy-output.txt"
print(parseCompilerArguments(try! NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding), language: .Swift, moduleName: "StreamOneSDK")) which is what jazzy does to get its compiler arguments. If I had access to the Xcode project I could debug further, but barring that, I don't know what else could be going on here. |
OK I pushed the repo to https://github.com/nickygerritsen/tmp-ios-sdk for the moment being. Maybe you can find something using that :) |
Ok, you've found a bug in jazzy! I've been able to reproduce this problem and have a proper fix on the way. Here's a temporary fix for you for now: jazzy -m "StreamOneSDK" \
-a "StreamOne" \
-u https://streamone.nl \
-g https://github.com/StreamOneNL/iOS-SDK \
--github-file-prefix https://github.com/StreamOneNL/iOS-SDK/blob/master \
--module-version 3.0 \
-x '--module-name,StreamOneSDK,-project,StreamOneSDK.xcodeproj,-scheme,StreamOneSDK-iOS' \
-c |
Great, thanks! |
I need to add:
Whitespaces are replaced with underscores. Words are not concatenated. |
I am currently working on an Xcode project that contains multiple source targets, specifically an iOS target and a WatchKit extension target. I would like to document the code for both targets with Jazzy.
At first, I just ran Jazzy on the Xcode project. From my testing, it appears that Jazzy (or SourceKitten) is picking a target at random and documenting it. So I found the
-x
switch for Jazzy and used it with the-alltargets
flag forxcodebuild
; this produced the random target behavior, again.Looking back on it, it makes more sense to just run Jazzy twice: once for the iOS target and once for the WatchKit extension target. So I ran Jazzy on our iOS target and everything worked fine. Running Jazzy on our WatchKit target, however, produces an error:
The iOS target name does not have any spaces in it and works fine. When I remove the spaces from the WatchKit extension target name, everything begins to work:
The text was updated successfully, but these errors were encountered: