Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check out dependencies specified in Cartfile #7

Closed
jspahrsummers opened this issue Oct 10, 2014 · 15 comments · Fixed by #27
Closed

Check out dependencies specified in Cartfile #7

jspahrsummers opened this issue Oct 10, 2014 · 15 comments · Fixed by #27
Assignees

Comments

@jspahrsummers
Copy link
Member

We should clone dependencies—and their dependencies’ dependencies—while trying to find the versions of everything that match what's specified in the config.

Where would these checkouts live? A global folder, or something inside the repository? The latter could be useful if you want to commit your dependencies (to protect against them disappearing).

This was referenced Oct 10, 2014
@jspahrsummers
Copy link
Member Author

Should this be carthage setup or carthage checkout or something like that?

@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

I like checkout.

@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

We could put this in the project's derived data.

$ xcodebuild -showBuildSettings|grep BUILD_DIR
    BUILD_DIR = /Users/mdiep/Library/Developer/Xcode/DerivedData/GitHub-deqblmyehxiqojaxxezbskyigcce/Build/Products

@jspahrsummers
Copy link
Member Author

I personally clean my DerivedData folder fairly frequently. I'd hate to lose a bunch of expensive Git clones just because of that.

@robrix
Copy link
Contributor

robrix commented Oct 10, 2014

Run script phases & other things frequently mash around in there, so we’d want to avoid collisions.

@jspahrsummers
Copy link
Member Author

I'm currently leaning toward storing these checkouts within the repository itself, to allow users to commit them if they want to.

Similarly, I don't think git submodules will work for this case, because we want them to be committable as-is, and we don't want users to accidentally clone recursive submodules when we're managing these repos for them.

So, maybe we can create a bare clone in a private, global folder (a la Cabal), and checkout that clone into the repository folder?

@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

Similarly, I don't think git submodules will work for this case, because we want them to be committable as-is, and we don't want users to accidentally clone recursive submodules when we're managing these repos for them.

I was going suggest that we store them as submodules and let the user specify which directory the go in. I don't understand the points you're trying to make here.

@robrix
Copy link
Contributor

robrix commented Oct 10, 2014

So, maybe we can create a bare clone in a private, global folder (a la Cabal), and checkout that clone into the repository folder?

Sorta like git-subtree --squash?

@jspahrsummers
Copy link
Member Author

@mdiep My point is, if you want to commit your dependencies into your repository to prevent them from disappearing (which is especially important for consulting), submodules aren't an option, because they rely upon an external reference remaining valid.

If, however, we allow them to commit the content of dependencies, they'll at least have the code if the repositories go AWOL.

Sorta like git-subtree --squash?

@robrix I guess, but the difference is that we can share Git clones with multiple Carthage projects if we centralize some bare clones, and then simply git checkout the desired commits into the actual project folders.

@jspahrsummers jspahrsummers modified the milestone: Initial release Oct 10, 2014
@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

My point is, if you want to commit your dependencies into your repository to prevent them from disappearing (which is especially important for consulting), submodules aren't an option, because they rely upon an external reference remaining valid.

If, however, we allow them to commit the content of dependencies, they'll at least have the code if the repositories go AWOL.

Ugh. I really hate that. Diffs get nasty. You lose the niceness of submodules on .com. If you want to make sure the references remain valid, you should fork it or keep a copy somewhere.

@jspahrsummers
Copy link
Member Author

Diffs get nasty.

If you don't want to commit your dependencies, you can just .gitignore the folders we check out. Easy peasy.

You lose the niceness of submodules on .com.

The Carthagespec diff is what's canonical anyways, so it seems like submodule diffs would just be distraction/duplication.

@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

The Carthagespec diff is what's canonical anyways, so it seems like submodule diffs would just be distraction/duplication.

Except it's "hard" to go from a carthagespec to browsing the repository/tree. And I'm hoping that submodule diffs will someday link to a compare view.

@mdiep
Copy link
Member

mdiep commented Oct 10, 2014

If you don't want to commit your dependencies, you can just .gitignore the folders we check out. Easy peasy.

👍

@alanjrogers
Copy link
Contributor

I might take stab at this... :)

@alanjrogers alanjrogers self-assigned this Oct 11, 2014
@jspahrsummers
Copy link
Member Author

I might take stab at this

@alanjrogers alanjrogers mentioned this issue Oct 14, 2014
8 tasks
@jspahrsummers jspahrsummers changed the title Check out dependencies specified in config file Check out dependencies specified in Cartfile Nov 7, 2014
natanrolnik pushed a commit to natanrolnik/Carthage that referenced this issue Feb 2, 2017
hujunfeng pushed a commit to hujunfeng/Carthage that referenced this issue Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants