jazzy
jazzy copied to clipboard
Cannot use --swift-version with swift.org toolchain
$ jazzy --swift-version DEVELOPMENT-SNAPSHOT-2016-06-06-a
/Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:164:in `block in <class:Config>': jazzy only supports Swift 2.0 or later. (RuntimeError)
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:36:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:36:in `set'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:55:in `block in attach_to_option_parser'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1364:in `call'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1364:in `block in parse_in_order'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1351:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1351:in `parse_in_order'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1345:in `order!'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1437:in `permute!'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/optparse.rb:1459:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:368:in `parse_command_line'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/config.rb:326:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:23:in `load'
from /usr/local/bin/jazzy:23:in `<main>'
However, this does work:
$ TOOLCHAIN_DIR=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-06-06-a.xctoolchain jazzy
I would like to be able to use a swift.org toolchain with --swift-version
, or swift_version:
in .jazzy.yml
@ianpartridge what's the output of swift -version
using the custom toolchain via xcrun
?
$ xcrun --toolchain org.swift.3020160606a swift -version
Apple Swift version 3.0-dev (LLVM cb08d1dbbd, Clang 383859a9c4, Swift 9e8266aaeb)
Target: x86_64-apple-macosx10.9
So if you specify 3.0-dev
as your swift version, does that work?
No.
$ jazzy --swift-version 3.0-dev
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/version.rb:191:in `initialize': Malformed version number string 3.0-dev (ArgumentError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/version.rb:182:in `new'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/version.rb:182:in `create'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:52:in `find_swift_version'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/sourcekitten.rb:139:in `run_sourcekitten'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:64:in `block in build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:62:in `chdir'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:62:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:23:in `load'
from /usr/local/bin/jazzy:23:in `<main>'
https://github.com/segiddins/xcinvoke/pull/5 might help with this
I recommend using TOOLCHAIN_DIR
for now.
From my understanding, this isn't a problem with Jazzy? Can we close this?
This is a problem with jazzy because it's a problem with one of jazzy's dependencies (xcinvoke).
Didn't realize xcinvoke was open source. Definitely. I'll add it to my list of items to get around to at some point. We can file an issue/PR on that repository so we can get it closed here. 😸
There's already a PR segiddins/xcinvoke#5. However, since jazzy is and will be affected not only until that PR is merged and released, but until we adopt it in our Gemfile, we're better off keeping this issue open
Sounds good!
Help reviewing that PR would definitely make getting it merged/released go faster ;)
@segiddins @pcantrell is this supported with xcinvoke 0.3.0?
Nope, still haven't gotten review on the alternate toolchain PR
I wasn't even aware there was such a PR. I'll take a look.
Heh, actually my comment above indicates that I was aware of it, I just forgot.
Closing this now, docs suggest using DEVELOPER_DIR for this kind of scenario.