jazzy: Jazzy 0.7.2 crashes with "comparison of Array with Array failed" ArgumentError
Hello,
I recently updated to Jazzy 0.7.2 and have tried using it to generate documentation for an Xcode 8 project containing Swift 2.3 code. All 578 source files in our project are parsed, but when Jazzy gets to the “building site” stage, Jazzy exits with code 1
and logs:
/Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:35:in `sort_by': comparison of Array with Array failed (ArgumentError)
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:35:in `block in doc_structure_for_docs'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:33:in `map'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:33:in `doc_structure_for_docs'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:112:in `build_site'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:151:in `build_docs_for_sourcekitten_output'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/lib/jazzy/doc_builder.rb:75:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.2/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:23:in `load'
from /usr/local/bin/jazzy:23:in `<main>'
error: /usr/local/bin/jazzy failed with an exit code of 1; check any output above for additional details.
Prior to that, I get some USR warnings, eg.:
A compile error prevented CheckoutCountryViewModel.country from receiving a unique USR. Documentation may be incomplete. Please check for compile errors by running `xcodebuild `.
`viewControllerForRouter(router:destination:)` has no USR. First make sure all modules used in your project have been imported. If all used modules are imported, please report this problem by filing an issue at https://github.com/realm/jazzy/issues along with your Xcode project. If this token is declared in an `#if` block, please ignore this message.
Unfortunately, this is a closed-source project so I can’t share the code publicly. But if there is anything I can do to help diagnose the issue further, please let me know.
Thanks! E.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
Fixed.
That was quick, great job @jpsim!!
Any idea when this is going to be released? I assume @orta only uses released versions of Jazzy, and I’d love the docs for my pod to work again… 😃
The consequence of this bug are serious: some CocoaPods just don’t have any online reference documentation anymore. No reference, and broken links from other documentation resources.
Same here:
(output from http://api.cocoadocs.org:4567/error/GRDB.swift/0.90.1)
Yes, I can reproduce the problem in this project: https://github.com/kareman/SwiftShell. This code has several
#if
blocks. I get the following error message: