Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Nested frameworks folders, git and locations #768
I'm using several frameworks which use nested frameworks.
I tend to use the
The odd thing here is that libB is checked out twice. I can see whats going on in that nested dependencies are added to the frameworks that own them, but then I'm not sure why carthage needs to check them out again at the top level.
I'm wondering why links cannot be used in the same way that the Build directories are linked back to the root Build dir.
This can actually become more confusing if you are building embedded frameworks. For example if the build for libA embeds libB inside the
Is it possible for carthage to look at the shared build and check if any of the dependencies are being embedded? Is this even a good idea?
Another complication with the duplicate checkouts occurs if
Now we have the top level projects as submodules ready to be modified, but the nested projects remain as exported versions. So I have to be careful about which ones I load into XCode. Would using links for nested projects help avoid this?
I suspect this all comes back to dealing with dependencies and versions.
referenced this issue
Sep 18, 2015
Carthage discourages the use of embedded frameworks. If a framework is embedded, then you can't use it from multiple frameworks or rely on Carthage's dependency resolution. (If
As for symlinks, they might be possible in the non-submodule case. If you're using submodules, I think symlinks would only lead to pain.
In any case, you should only be modifying projects in the top-level Carthage directory.
If you're using that networking in multiple higher-level frameworks that are used in the same app, then you don't want to nest it inside them. There a bunch of versioning problems if you do this.
You can still use the networking framework in your higher-level frameworks. You just don't embed them—the app target has to do that.
referenced this issue
Oct 1, 2015
I have a similar situation, where my existing project is an iOS application, which has a submodule that is the main static library for lower level code, etc. Wanting to convert this to a dynamic framework to support Swift, but this library already has 3rd party dependencies (was originally using Cocoapods). These dependencies are also being used in the iOS application.
The submodule static library has its own unit tests, etc. so it needs to be able to be built on its own and get those 3rd party dependencies. However, the parent app also needs these dependencies for its own logic, etc.
Would it be possible to flatten the overall framework architecture in this case using Carthage?
@lemonkey We typically add the 3rd party dependencies to the framework—usually with submodules using Carthage. Then we add both a
There are other ways to do it, but that's what I usually do.
@mdiep but if you include ReactiveCocoa in a project using Carthage, it will check out ReactiveCocoa and Result (as its dependency), but inside ReactiveCocoa's Checkouts directory there is another copy of Result. Namely, there is