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

Add pod update command #131

Closed
lukeredpath opened this issue Feb 22, 2012 · 14 comments
Closed

Add pod update command #131

lukeredpath opened this issue Feb 22, 2012 · 14 comments

Comments

@lukeredpath
Copy link
Contributor

I often find it would be useful to be able to update a single pod without having to blow away my entire Pods directory and re-running pod install.

Some usage scenarios:

  • I've just updated the version of a pod in my Podfile.
  • I'm using an inline spec or pointing to a Pod file in a git repository and I've just updated it (say to point to a new fork of the project).

I want to be able to run pod update [podname] which cleans all artefacts and re-installs that pod.

There would also be a pod update command which would update everything.

With this in place, I'd like to see pod install only install new pods which should make the process of adding a pod and installing it much faster.

@alloy
Copy link
Member

alloy commented Feb 22, 2012

Sounds good.

The Podfile.lock should already be valid YAML.

@subdigital
Copy link
Contributor

+1 - been having to rm -rf Pods while I thrash getting my first pod spec done correctly. pod update would be very useful.

@alloy
Copy link
Member

alloy commented Feb 24, 2012

In the meantime, you don’t need to trash the complete Pods directory, just the one of the library you wish to update.

@fabiopelosin
Copy link
Member

What is the reason for exposing a new sub command? Wouldn't be possible for pod install to do this automatically if an update is available.

@lukeredpath
Copy link
Contributor Author

You wouldn't want install to do this automatically. The only time install should do automatically is install new dependencies you've added to your Podfile, or update dependencies where you have explicitly changed the version (which I did mention in my original issue but I do now feel it's best that install handles this automatically).

For dependencies that you have specified without a version, or that use the HEAD of a git repository for instance, that dependency should remain locked at the version that was first installed (and as written to the Podfile.lock file). To bring these dependencies up to date, an explicit update command should be issued.

@fabiopelosin
Copy link
Member

Now I see your point. So install is intended to be used only after changes to the podfile. Now I understand the why after updating a pod version calling install would not update it without manually deleting the pod folder.

@alloy
Copy link
Member

alloy commented Mar 18, 2012

Moving this to 0.7.

@atomkirk
Copy link
Contributor

atomkirk commented Aug 7, 2012

So this was talked about six months ago, is it not much of a priority? It's a very big deal to me because its an awful experience trying to develop a pod (or convert someone elses pod into a library) without this command. It gets so old deleting the directory in pods and using pod install to update any changes I've made. I'm willing to bet a LOT of people would like this, because I would bet most people using cocoapods are having to convert other peoples libraries into pods for use in their project.

@fabiopelosin
Copy link
Member

It's a very big deal to me because its an awful experience trying to develop a pod (or convert someone elses pod into a library) without this command.

Regarding the conversion of someones library into a pod it is easier to use pod lint as it uses xcodebuild.


This feature certainly is a high priority, as were some of the features introduced recently. Unfortunately this one might be bit more complicated that what it seems, but hey I think that we need to start somewhere. Yesterday I was thinking about adding a half implemented version just to start going. In any case contributions are welcome :-)!

fabiopelosin added a commit that referenced this issue Aug 8, 2012
See #131, #191.

- The installer is initialized with a resolver. The resolver is responsible of
  indicating which specs must be installed/reinstalled.
- It was introduced a slight change in the format of the Podfile.lock.
- The specification set was simplified to receive and handle Pod::Dependency
  instead of Pod::Specification. With this change it also appears to be more
  robust.

A this stage it appears to be working. However the support, for external and
head dependencies is weak.
@nickynick
Copy link

Sorry for bumping this, but what about pod update [podname]? Sometimes you don't want to update everything you have, you just need to get the latest version of a specific pod. Right now this involves nuking its directory in Pods, stripping it from Podfile.lock and running pod install. Quite annoying, to be honest :)

@fabiopelosin
Copy link
Member

@nickynick I agree that pod update [podname] would make sense. Can you open a new ticket for it?

@nickynick
Copy link

@irrationalfab Sure: #760

@fabiopelosin
Copy link
Member

Thanks!

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013
@Mandrew100
Copy link

Was this ever implemented ?

fabiopelosin added a commit that referenced this issue Oct 25, 2014
See #131, #191.

- The installer is initialized with a resolver. The resolver is responsible of
  indicating which specs must be installed/reinstalled.
- It was introduced a slight change in the format of the Podfile.lock.
- The specification set was simplified to receive and handle Pod::Dependency
  instead of Pod::Specification. With this change it also appears to be more
  robust.

A this stage it appears to be working. However the support, for external and
head dependencies is weak.
segiddins added a commit that referenced this issue Oct 25, 2014
Refactor Linter Results to not use a mixin
amorde pushed a commit that referenced this issue Oct 27, 2024
Update integrations specs for lenient binary strip
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

7 participants