Skip to content
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

Merged
merged 4 commits into from
Jul 28, 2023
Merged

Conversation

jimmya
Copy link
Contributor

@jimmya jimmya commented Jul 26, 2023

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.

@krzysztofzablocki
Copy link
Owner

This is great, could you add some docs for the new config?

@jimmya
Copy link
Contributor Author

jimmya commented Jul 27, 2023

I've added some docs in Usage.md and added a changelog entry.

@@ -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.
Copy link
Collaborator

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 👍🏻

@krzysztofzablocki krzysztofzablocki merged commit 51290a5 into krzysztofzablocki:master Jul 28, 2023
@krzysztofzablocki
Copy link
Owner

thanks for contributing 🙇

@jimmya
Copy link
Contributor Author

jimmya commented Aug 22, 2023

@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.

@art-divin
Copy link
Collaborator

Thanks for asking, @jimmya 👋

I am all for the new release, @krzysztofzablocki what do you say? How to proceed?

@krzysztofzablocki
Copy link
Owner

@art-divin there is rake release workflow which you can use to make a new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants