-
Notifications
You must be signed in to change notification settings - Fork 413
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
NSRegularExpression exception while generating objc documentation #370
Comments
Thanks for reporting this, I've found the issue and it looks pretty easy to fix. I'll ping you again here once I have a fix in place. PS: really excited to see PSPDFKit trying this out! 😄 |
It looks as though clang_getCursorExtent() occasionally exceeds the file's length. This fixes realm/jazzy#370
This issue is now fixed on jazzy's master branch, which you can install locally by running However, PSPDFKit really highlights that jazzy needs some performance optimizations to handle larger projects gracefully. Generating docs for your project takes ~50 seconds on my Macbook Pro! The silver lining of this is that we've never done much profiling or optimization before, so there must be lots of low hanging fruit that we could tackle to improve the situation. I've opened #372 to track that effort. The other major problem is a usability one. By my count, PSPDFKit has 116 categories, 273 classes, 352 constants, 103 enums, 97 protocols, 16 type definitions and 31 functions, which means that the resulting docs look like this: https://static.realm.io/jazzy_demo/PSPDFKit To make this usable, you'll definitely have to use custom templates ( |
Oh, wow. Thanks for the quick turnaround time on this. Works on my side now as well.
Considering our release script already takes some serious time, adding 50 seconds would't necessary be a blocker. Also, it was closer to 30 when I tried it on my MacBook Pro. But sure, if there's low hanging fruit, do get it. You should at least have a pretty good benchmark test case now. :)
Yeah, I agree. Here's our current (apple doc based) documentation as a comparison: https://pspdfkit.com/api/ios/index.html. There are some issues with the current generator, e.g., the class documentation of https://pspdfkit.com/api/ios/Classes/PSPDFAnnotationToolbar.html is missing the first paragraph, compared to https://static.realm.io/jazzy_demo/PSPDFKit/Classes/PSPDFAnnotationToolbar.html which parses that correctly. But it's currently a tradeoff between the two. Some other parts, like the Thanks again for the help and great work in general on jazzy! |
This might be better suited as a SourceKitten issue, but since we stumbled upon it using jazzy and since using it is the easiest way I know of reproducing it, I'm posting here instead.
We tried using the new jazzy version to generate documentation for PSPDFKit, a fairly large Object-C framework. The command that seems to be getting us the farthest is this one:
Unfortunately this does end up throwing and exception after processing for a bit.
sourcekitten[60380:28736521] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: Range or index out of bounds'
.Here's the full output:
And here are our headers: http://cl.ly/2u3K3S1P3C0B
Any ideas what goes wrong here?
The text was updated successfully, but these errors were encountered: