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

Marathon only works with dependencies named the same as the Package #191

Open
bitwit opened this issue Nov 8, 2018 · 3 comments
Open

Marathon only works with dependencies named the same as the Package #191

bitwit opened this issue Nov 8, 2018 · 3 comments

Comments

@bitwit
Copy link
Contributor

bitwit commented Nov 8, 2018

I have a swift package I'm trying to import as an inline dependency. However, it is one of many within the same Package.swift and is not named the same as the Package.

When Marathon runs, it ends up pulling in the library by the name of the Package rather than the specific library name listed in the import.

i.e.
import SlurpXCTools // marathon: https://github.com/bitwit/Slurp.git
ends up adding the Slurp library as a dependency instead.

Ideally, I'd actually like to be able to import multiple libraries from the same Package. i.e., both Slurp and SlurpXCTools.

Am I missing something or is this a current limitation? If so, I'm very open to working on this feature. I've already been diving into the code to looks for ideas only implementing this if needed, but any guidance is appreciated.

Thanks

@bitwit
Copy link
Contributor Author

bitwit commented Nov 8, 2018

After more investigation, I'm sure this is not currently possible because the packages are fetched using the git URL alone.

I'm working on a solution to allow multiple dependencies from one Package.swift here: https://github.com/JohnSundell/Marathon/compare/master...bitwit:multi-dependency-package?expand=1

I think I'm on the right track, but there's still some clean up to do. It also seems that the way packages get initially fetched is not the most efficient (i.e., updating all the packages one dependency at a time), which is a bit unnecessary when they use the same URL

@ghost
Copy link

ghost commented Jul 11, 2019

Supporting ideas like this might push Marathon towards becoming a dependency manager like Carthage. If these kinds of features do become necessary then I would be more inclined to suggest Marathon become dependent on Carthage.

@bitwit
Copy link
Contributor Author

bitwit commented Jul 12, 2019 via email

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

No branches or pull requests

1 participant