ollieatkinson / Guise

A tool to generate the Swift public interface for Frameworks and Libraries
MIT License
53 stars 5 forks source link

Usage of Swift-Syntax #30

Open Sherlouk opened 5 years ago

Sherlouk commented 5 years ago

Could this project take advantage of swift-syntax to identify the public interface in a more consistent and speedier fashion?

paulsamuels commented 5 years ago

Sounds like a fun challenge. Are there any particular inconsistencies or sluggishness you have in mind with the current approach?

Sent with GitHawk

Sherlouk commented 5 years ago

For sure, we continue to see different different outputs depending on the Xcode version you use for instance. Something which would be nice to have a level of consistency where possible!

In terms of speed it was more down to the fact this needs to be run as a build phase inside of an xcodebuild. It would be massively beneficial if this could be run statically in a standalone command without the overhead of having to compile the entire module.

paulsamuels commented 5 years ago

Makes sense. Would be useable on SPM projects as well.

Sent with GitHawk

ollieatkinson commented 5 years ago

We can also look at the new .swiftinterface file produced from swift 5. This looks like the format we need.

paulsamuels commented 5 years ago

We can also look at the new .swiftinterface file produced from swift 5. This looks like the format we need.

I think this would be the easiest way to drop having to hook into SourceKit. Using SwiftSyntax would also be useful for dropping the requirement to compile the project, which would allow other interesting use cases like Danger.