cocoapods-deploy icon indicating copy to clipboard operation
cocoapods-deploy copied to clipboard

Cocoapods 1.4.0+ is broken

Open NiltiakSivad opened this issue 7 years ago • 13 comments

Hello,

I've been using your handy little tool with Cocoapods 1.3.1, but after trying to upgrade to Cocoapods 1.5.2, I get an error. I also verified that it is broken for Cocoapods 1.4.0. Both result in the following error:

Command

/usr/local/bin/pod deploy

Stack

   CocoaPods : 1.5.2
        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
    RubyGems : 2.5.2
        Host : Mac OS X 10.13.4 (17E199)
       Xcode : 9.3.1 (9E501)
         Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : 

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-deploy      : 0.0.12
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Podfile

platform :ios, '10.0'

target 'TestProject' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for TestProject

  pod 'RxSwift', '4.1.2'
  pod 'Moya/RxSwift', '11.0.2'
  pod 'Nuke', '6.1.1'

  target 'TestProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'TestProjectUITests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Error

ArgumentError - wrong number of arguments (given 1, expected 0)
/Library/Ruby/Gems/2.3.0/gems/cocoapods-deploy-0.0.12/lib/cocoapods-deploy/deploy_installer.rb:3:in `create_analyzer'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:147:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:116:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-deploy-0.0.12/lib/cocoapods-deploy/command/deploy.rb:131:in `install'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-deploy-0.0.12/lib/cocoapods-deploy/command/deploy.rb:142:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

NiltiakSivad avatar May 15 '18 13:05 NiltiakSivad

Thanks for the bug report :) Looks like some of the internals we are using for the tool have changed in Cocoapods. Hopefully not a big change but I'll investigate :)

jcampbell05 avatar May 15 '18 20:05 jcampbell05

@jcampbell05 Probably not an easy fix?

NiltiakSivad avatar Jun 28 '18 11:06 NiltiakSivad

@NiltiakSivad it looks like they have tidied up some of the class names. potentially easy but I haven't found the time to look into this yet

jcampbell05 avatar Jun 28 '18 12:06 jcampbell05

Any progress so far?

ManWithBear avatar Mar 07 '19 10:03 ManWithBear

@ManWithBear I haven't had the time to look at this. Happy for someone to take over this.

jcampbell05 avatar Mar 07 '19 11:03 jcampbell05

CocoaPods have added this functionality built-in since verison 1.6.0. Perhaps it's better to use that?

igor-makarov avatar Mar 07 '19 15:03 igor-makarov

@igor-makarov How do I do it in cocoa pods then? --deployment is a different kind of thing, isn't it?

Lutzifer avatar Mar 07 '19 15:03 Lutzifer

There is a slight difference, the new flag cocoapods just lets you know if something has changed. This framework works more like bundle where it finds the direct url for the pod and installs it rather than cloning an entire repo.

I have an issue open to integrate this into cocoapods itself but I didn't find the time to make it happen. Maybe if I have some spare time I may just integrate this into cocoapods and open a PR for them.

jcampbell05 avatar Mar 07 '19 15:03 jcampbell05

@jcampbell05 thanks for the plugin. I tried some hacking on the code yesterday to get the plugin to run (which succeeded) but the resulting workspace/project had some issues. Would be a great addition to cocoapods imho.

Lutzifer avatar Mar 07 '19 15:03 Lutzifer

I've tried suggesting they implement this functionality but they haven't been keen in the past. I think they are working to speed things up though

jcampbell05 avatar Feb 29 '20 13:02 jcampbell05

I made another plugin that speeds up pod installation from GitHub:

https://github.com/igor-makarov/cocoapods-git-tarball

I'm thinking, together with CDN specs and --deployment this plugin covers all the cases, no? Also, you could add the CP cache directory to the CI caching step and it'll be very performant!

igor-makarov avatar Feb 29 '20 14:02 igor-makarov

I'll have a look but potentially this would solve the issues. Does your plugin allow you to use the faster method only when installing and not when updating ? IS that what you mean't by --deployment ?

jcampbell05 avatar Mar 02 '20 12:03 jcampbell05