-
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
Initial work for mixed Swift and ObjC Sourcekitten input #1113
Conversation
@johnfairh, this clearly needs quite a bit of work still but wanted to get some eyes on it early. Thank you for the help in getting this far! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor comments.
language_stub
is used at a few levels of the mustache templates so will need providing in more than just render_item
. I think the doc.mustache
usage matches the structure built in document()
and document_markdown()
, and the top usage in task.mustache
matches make_task()
.
It's a bit challenging to know what to set this to for the higher-level places: they're both collections of things that could be a mix of ObjC and Swift. I suppose the backwards-compatible safe thing is to use the --objc
flag to decide as today.
Added a commit to sort out the highlighting problems that were breaking CI -- feel free to throw it away + refactor as you prefer. One breakage was the case where the stuff being hilighted is from markdown (eg. readme) so neither swift nor objc. Not sure why it was sometimes getting the language backwards. |
Thanks for fixing the highlighting code! What's the next steps for this? CLI flag to pass in Jazzy input to combine? Or maybe just documenting on the sourcekitten command that it will take a file that has mixed jazzy input? What do you think would be least impact? (Assuming least impact is the goal for this change) |
As discussed I pushed a commit to allow Stuff left to do then that I can think of:
Other stuff we talked about that might not be needed for a first release:
|
@johnfairh I'll try and take this piece by piece:
Hopefully will have some time tomorrow to tackle item 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, makes the inherently messy hide-declarations
a bit cleaner.
@johnfairh, update:
Seems to work the same as the website. Notably it does generate the docset as a hidden file due to lack of a module name but it seems this is a known issue (#921). This is what the mixed docs looks like in Dash. (changed the docset name so that it could be imported) |
Ignore the cocoapods CI failure for now - CI issue to do with cocoapods setup, I think fixed on master. |
This is coming together nicely! I'll take a crack at updating the specs but might not get to it until this weekend. Any tips or pitfalls to watch out for? Thanks! |
Roughly: rebase this branch to master, fork and branch realm/jazzy-integration-specs and change the |
Updated the MiscJazzyObjCFeatures project to include a Swift file and some cross-language extensions to show how they (aren't) handled. |
Update CHANGELOG Wordsmithing in docs Remove a TODO that got obsoleted Reorder some code for consistency/readability
9471612
to
384b1e6
Compare
I think this is ready to be merged now. Swift extensions are displayed separately rather than merged into their ObjC types (see sample project). We should fix this soon to make the docs easier to read. Users have to run sourcekitten separately. We could fix this one day by teaching jazzy how to run multiple build commands -- useful for many situations including App Extensions and the #ifdef problem. The outstanding issue from comments above was |
This is great! I’ll start on the follow-up this weekend. :) |
Nice. This feature has been years in the making, thanks for pushing it through @joesus & @johnfairh 🎉 |
When these changes are expected to be in release(0.11.3 or 0.12.0)? |
There's a bug we need to fix to do with contents pages being overwritten. I should have some time next week if @joesus doesn't beat me to it. |
Initial attempt at mixing Swift and ObjectiveC.
Todo:
language
did not seem to work, probably missed a step)