-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Danger-Swift as SPM Plugin? [IDEA] #586
Comments
This could work - it'd be worth figuring out if there are any sandboxing issues which come with running as a plugin ( I hear networking permissions were added pretty recently, so who knows what is not possible ) but it could work and it could be easier for folks to use then - which would be cool I'd recommend taking a quick stab at it to see if there's any blockers |
I believe the main issue is how Danger works. |
It was my understanding that the SPM plugins are essentially just light runners or wrappers over tools, and so my hope is that we could compile and link as part of the build step for the plugin. I can try and fool around with it some over the upcoming weekend and see if there's any feasibility. |
At WWDC22, Apple introduced the concept of plugins for SPM. These plugins allow us to specify scripts that run either at build time or can be invoked manually.
Today, Danger Swift's setup requires "working around the system" to use the docs own words. I wonder whether the plugin system in SPM would remove the need to create a special target to get libDanger compiled. Once implemented as a plugin, it seems all one has to do is import it as a dependency like any other Swift Package, and then simply run something like:
swift package danger pr https://github.com/Moya/Harvey/pull/23
I don't see mass adoption of SPM plugins quite yet -- there may be reason for that. Perhaps at WWDC23 in a few days we'll see some further refinements to plugins.
The text was updated successfully, but these errors were encountered: