-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Add SPM config support #1184
Add SPM config support #1184
Conversation
This is great, could you add some docs for the new config? |
I've added some docs in |
@@ -100,6 +100,22 @@ project: | |||
- <path to xcframework file> | |||
``` | |||
|
|||
You can also provide a Swift Package which will be scanned. Source files will be scanned based on the package's `path` and `exclude` options. |
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.
I must say, this would be such a nice feature 👍🏻
thanks for contributing 🙇 |
@krzysztofzablocki @art-divin I'm sorry to bother you but do you have any plans for a new release in the near future? Having these changes would help me massively. |
Thanks for asking, @jimmya 👋 I am all for the new release, @krzysztofzablocki what do you say? How to proceed? |
@art-divin there is |
This PR adds support for Swift Packages in the config. This allows Sourcery to determine the module name of the scanned sources.
It depends on https://github.com/apple/swift-package-manager which is quite a big dependency (binary size also almost doubled after adding it). It is however the easiest way to read the contents of the package. Other method could be use the JSON output from
swift package dump-package
and parsing that ourselves. The upside to this is that we're not dependent on this big dependency and we're less attached to local Xcode version vs shipped SPM version. Downside is we have to parse stuff ourselves.I'd love to hear your thoughts on that.