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

Clean paths for ad-hoc/pre-downloaded dependencies #110

Closed
zwaldowski opened this issue Feb 6, 2012 · 5 comments
Closed

Clean paths for ad-hoc/pre-downloaded dependencies #110

zwaldowski opened this issue Feb 6, 2012 · 5 comments

Comments

@zwaldowski
Copy link
Contributor

I've moved towards pre-downloading some dependencies for repos that I work on in lieu of rolling my own inline spec, like so:

dependency 'BlocksKit',
  :git => 'git://github.com/zwaldowski/BlocksKit.git',
  :commit => 'origin/next'

I don't know if this is any kind of official feature, but I find it massively useful. However, I'm having one major problem with its use. CocoaPods does seem to be parsing the spec for the pre-downloaded pod (as evidenced by Using RepoName (Version) later on down the line), but it's not cleaning out paths for these pre-downloaded repos, leaving behind a ton of unit tests, etc. Any thoughts?

@alloy
Copy link
Member

alloy commented Feb 6, 2012

Yup, it’s an official feature. It’s aimed at allowing people to use the bleeding edge of a pod, if it has a pod spec in the root of the repo. This can also be a git submodule, although we don’t have code yet that adds the submodule to the user’s repo.

What happens is that cleaning occurs only once, which is just after a pod has downloaded. If the directory already exists, it doesn’t download nor clean. This allows a submodule to happily co-exist and CocoaPods will just use that, but without cleaning it. Automatically cleaning would have to mean we’d have to have code in place to know whether or not a directory is a submodule, because clearly you don’t want to perform a clean in a submodule.

So I assume in your case you just want the code of the other library in the actual repo? If so, for now you could do it by removing the pod’s dir (BlockKit in this case) and running pod install. This should grab the latest version of BlockKit and perform a clean.

@alloy
Copy link
Member

alloy commented Feb 6, 2012

Since there are already tickets about things like submodules, I’ll close this as a duplicate. Feel free, however, to create tickets about your preferred workflow, or add it to existing tickets.

@alloy alloy closed this as completed Feb 6, 2012
@zwaldowski
Copy link
Contributor Author

Right, I gathered that much by skimming through the pre-downloading code. But my problem is that, on my end, it's never doing any form of cleaning at all, initial or not. You can look at my before and after results.

@alloy
Copy link
Member

alloy commented Feb 7, 2012

Oh, hmm, that ain’t right indeed. I’ll reopen the ticket.

@alloy alloy reopened this Feb 7, 2012
@lukeredpath
Copy link
Contributor

This should be fixed in fd02d56.

I've double-checked to make sure that no cleaning occurs if the directory already exists (e.g. it's a submodule). Cleaning now takes place when pods are pre-downloaded.

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

No branches or pull requests

3 participants