Add support for Apple .doccarchive#2007
Conversation
|
This is awesome! Objective-C support would be highly appreciated. |
I think we'd need to follow what @keith mentioned in #1420 and use the flag in: https://forums.swift.org/t/clang-support-for-objective-c-symbol-graph-generation/57689/4. It's possible we could transition on that flag in this rule as well, but not sure if we need to add more details to some objective-c provider somewhere to pass along the symbol graph directory. If anyone has more details let me know! Working through Swift support since it probably addresses most use cases and worst case we follow up with Objective-C support |
|
Maybe. It might not be required if the |
037fde2 to
83838d3
Compare
|
Updated the PR! What I have is good enough to get existing I've updated the tasks with some next steps I think I need to address, if you have thoughts on design so far please let me know! |
|
@luispadron this is great, thanks so much for adding it. Really excited to pull it down and give it a whirl 🚀 It seems like we'll need some Xcode bits to get it working in the GUI in addition to this? |
f20bd52 to
cc50603
Compare
I'll open a separate issue in |
886d2f9 to
91a3ae6
Compare
|
This is probably ready for an initial pass! I'll add tests and docs after any changes from that. The |
28a2d4e to
2b6e71d
Compare
|
@luispadron If you fix the buildifier errors and regenerate the docs we should be good to go. |
louwers
left a comment
There was a problem hiding this comment.
The (lack of) Objective-C support should be documented.
@BalestraPatrick Thanks for the review! I'm going to add some tests before I un-draft it this month and update documentation. @louwers I'd love to add Objective-C support, I'll see if I can spend time looking at it more, if not will update docs to note as such. |
c418a68 to
76166de
Compare
|
Added tests and documentation, think this is ready for initial support for |
a3a2d82 to
488d074
Compare
1f217fd to
9b0bb58
Compare
9b0bb58 to
7a25733
Compare
160d9ef to
0a2f2af
Compare
|
@jpsim I know you had interest in this before. Pinging for visibility. |
0a2f2af to
be812fd
Compare
|
|
||
| This aspect works with targets that have a .docc bundle in their data, or which bundle a target that does. | ||
| """, | ||
| attr_aspects = ["data", "deps"], |
There was a problem hiding this comment.
I wonder if need private_deps here too
| arguments.add(docc_bundle_info.bundle) | ||
|
|
||
| # TODO: no-sandbox seems to be required when running docc convert with a .docc bundle provided | ||
| # in the sandbox the tool is unable to open the .docc bundle. |
There was a problem hiding this comment.
I assume this is likely expected (we do the same with some other Xcode tools IIRC), but do you remember what exactly was the error in this particular situation?
There was a problem hiding this comment.
I dont have the exact error but essentially the .docc bundle was missing from the sandbox so it would fail along the lines of "bundle not found"
|
Thanks for adding this, @luispadron 🙏 |
Summary
Closes #1420
This adds support for building
.doccarchivefor rules_apple targets. It uses the symbol_graph feature fromrules_swiftto collect the symbol graph. It then invokesxcrunto finddoccand create the.doccarchive.Example:
Build it:
Preview the docs:
Tasks
ios_*_framework,ios_applicationlike bundling rules.Info.plistneeds to be provided / copied..doccbundles defined indata.