Carthage: Referencing Local Repo Paths

Created on 16 Feb 2017  路  3Comments  路  Source: Carthage/Carthage

  • carthage version: 0.18.1
  • xcodebuild -version: Xcode 8.2.1, Build version 8C1002
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No

We're currently in the process of migrating from CocoaPods to Carthage.

The project I work on has many internal libraries and, through a web of dependencies, are built into a single app. Our end goal is to use prebuilt frameworks to reduce build times, Xcode indexing, etc.

The one grey area we're trying to figure out is when you need to debug dependencies in the context of running the app. I've seen several issues posted about using submodules but that's not really a good solution for us. We don't want to have all these dependencies committed as submodules.

The one idea that made the most sense was from this blog post:
https://blog.automatic.com/xcode-can-handle-your-scale-speeding-up-your-workflow-with-prebuilt-frameworks-f7c6e4499545#.36xkon3bm

Basically, if you need to debug/modify a dependency, you can symlink the folder into Carthage/Checkouts and work on both the dependency and the app.

Would the Carthage team consider adding this as a feature?

What I was thinking is adding a new method to the Cartfile like:
path "/path/to/dependency"

During carthage bootstrap or carthage update, it would see the path directive and create a symlink instead of cloning.

Then possibly generate a workspace with those project files or we can create that workspace manually.

Looking forward to any thoughts or ideas to this.

NOTE: Our setup is very similar to #1745, but the submodule workflow won't work for us because of the number of dependent libraries we have - and the fact that we don't want to commit the submodules.

Most helpful comment

@pmhood Hi, Could you share how to do this. Thanks

All 3 comments

We're not currently open to extending Cartfiles because we haven't worked out the right mechanism to do so. But this is definitely an area of interest in the future. Presently, we're more concerned with correctness and refactoring to make Carthage more testable.

@mdiep Thanks for your answer! We'll use a script to do this for now then.

@pmhood Hi, Could you share how to do this. Thanks

Was this page helpful?
0 / 5 - 0 ratings