[swift-dev] [SourceKit] Getting public interfaces of Swift frameworks

Kacper Harasim kacper.harasim at gmail.com
Wed Jul 19 16:44:09 CDT 2017


Turns out that SourceKit works well in either case - it was mistake from my side. When SourceKit cannot resolve all of the symbols(dependent frameworks are not available) it fails and it was the case. After fixing this everything works as expected.


On 19 Jul 2017, 19:49 +0200, Kacper Harasim via swift-dev <swift-dev at swift.org>, wrote:
> Hi All,
> I want to parse interfaces of frameworks containing Swift code. I've done it for Objective-C ones using
> `source.request.editor.open.interface` request of SourceKit(it works great!), but apparently it doesn’t work for Swift interfaces frameworks - returns empty results. What's the intended way of doing this task with SourceKit? Should I add some compiler flag to support it that way?
>
> I've found that this task is achievable using `swift-ide-test` tool based on this mail: https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160111/000827.html  Because it's not currently available in standard Swift toolchain - it's not a perfect solution for me. I’m building a tool based on that, `.swiftmodule` files are not stable and shipping swift-ide-test binaries for every Swift toolchain would be a lot of headache.
>
> Thank you for the help!
>
> Regards,
> Kacper
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170719/8a61b403/attachment.html>


More information about the swift-dev mailing list