JohnSundell / Marathon

[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
MIT License
1.86k stars 78 forks source link

Adds linkable library for all dependencies generated in a Marathon scripts #153

Closed ashfurrow closed 6 years ago

ashfurrow commented 6 years ago

This PR adds a a linkable library for the dependencies generated in Marathon scripts. tl;dr Danger uses Marathon to download its dependencies, but those deps need to be exposed to be linked against by Danger.

Paired on this with @orta. We used the name Dependencies for everything since it's pretty generic and captured all of the root-level dependencies. This will allow us to change this line:

https://github.com/danger/danger-swift/blob/5fd83392054054740cb4922a44fd4d59d2d6b05c/Sources/Runner/Commands/Runner.swift#L61

... to include libArgs += ["-lDependencies"] and expose Danger-Swift plugin symbols to Dangerfile.swift files. Let me know if I can clarify anything – thanks!

ashfurrow commented 6 years ago

After removing a cached version of the generated Package.swift, we were able to verify that this works as-epected locally.

orta commented 6 years ago

Yep - this is cool with me too. Let's do it.

orta commented 6 years ago

Shipped: https://github.com/JohnSundell/Marathon/releases/tag/2.0.2

ashfurrow commented 6 years ago

:tada: I'll send a PR to Danger-Swift to use this.

JohnSundell commented 6 years ago

Awesome 🎉