Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

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

Merged
merged 3 commits into from
Dec 10, 2017

Conversation

ashfurrow
Copy link
Contributor

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
Copy link
Contributor Author

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

@@ -364,6 +364,7 @@ public final class PackageManager {
"import PackageDescription\n\n" +
"let package = Package(\n" +
" name: \"\(masterPackageName)\",\n" +
" products: [.library(name: \"Dependencies\", type: .dynamic, targets: [\"\(masterPackageName)\"])],\n" +
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about calling this MarathonDependencies to be a bit more clear where it comes from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Owner

@JohnSundell JohnSundell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful ❤️

@orta
Copy link
Collaborator

orta commented Dec 10, 2017

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

@orta orta merged commit 10d4ae9 into JohnSundell:master Dec 10, 2017
@orta
Copy link
Collaborator

orta commented Dec 10, 2017

@ashfurrow
Copy link
Contributor Author

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

@ashfurrow ashfurrow deleted the patch-1 branch December 10, 2017 16:34
@JohnSundell
Copy link
Owner

Awesome 🎉

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

Successfully merging this pull request may close these issues.

None yet

3 participants