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

Fails with Cocoapods 0.37.rc.1 #64

Closed
nanoxd opened this issue Apr 28, 2015 · 16 comments
Closed

Fails with Cocoapods 0.37.rc.1 #64

nanoxd opened this issue Apr 28, 2015 · 16 comments

Comments

@nanoxd
Copy link

nanoxd commented Apr 28, 2015

Updating to the new release candidate of Cocoapods causes Keys to not find a Podfile in the project directory. This did not happen on 0.37.beta.1. Is this a change in Cocoapods that causes the incompatibility or something on my side?

fparedes sh 2015-04-28 10-25-12

Verbose output:

Fetching External Sources:

-> Pre-downloading: `Keys` from `https://github.com/ashfurrow/empty-podspec.git`
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/ashfurrow/empty-podspec.git /var/folders/n7/kfjx0_c10h3f3tg2dfs16ywc0000gp/T/d20150428-13846-15ihwou --single-branch --depth 1
     Cloning into '/var/folders/n7/kfjx0_c10h3f3tg2dfs16ywc0000gp/T/d20150428-13846-15ihwou'...
 > Running prepare command
   $ /bin/bash -c ' 'set\ -e' 'pod\ keys\ generate\ \"\%\%PROJECT_NAME\%\%\"
   [!] No `Podfile' found in the project directory.
[!] /bin/bash -c '
'set\ -e'
'pod\ keys\ generate\ \"\%\%PROJECT_NAME\%\%\"

[!] No `Podfile' found in the project directory.


~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/executable.rb:70:in `execute_command'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/executable.rb:27:in `block in executable'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:62:in `block (2 levels) in run_prepare_command'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:58:in `chdir'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:58:in `block in run_prepare_command'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:57:in `run_prepare_command'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/pod_source_preparer.rb:35:in `prepare!'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:191:in `copy_and_clean'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:115:in `block (2 levels) in uncached_pod'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:113:in `each'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:113:in `block in uncached_pod'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:168:in `call'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:168:in `in_tmpdir'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:101:in `uncached_pod'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader/cache.rb:31:in `download_pod'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/downloader.rb:34:in `download'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/abstract_external_source.rb:101:in `block in pre_download'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:70:in `titled_section'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/abstract_external_source.rb:99:in `pre_download'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:347:in `fetch_external_source'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:324:in `block (2 levels) in fetch_external_sources'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:323:in `each'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:323:in `block in fetch_external_sources'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:322:in `fetch_external_sources'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer/analyzer.rb:57:in `analyze'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:190:in `analyze'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:112:in `block in resolve_dependencies'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:111:in `resolve_dependencies'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/installer.rb:91:in `install!'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-keys-1.1.0/lib/plugin.rb:49:in `install!'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command/project.rb:155:in `run'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/lib/cocoapods/command.rb:46:in `run'
~/.rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/cocoapods-0.37.0.rc.1/bin/pod:44:in `<top (required)>'
~/.rubies/ruby-2.2.1/bin/pod:23:in `load'
~/.rubies/ruby-2.2.1/bin/pod:23:in `<main>'
@segiddins
Copy link
Collaborator

What command are you running to install your pods?

@nanoxd
Copy link
Author

nanoxd commented Apr 28, 2015

pod update in this case. Running pod install also causes the crash.

@orta
Copy link
Owner

orta commented Apr 28, 2015

@alloy may have a fix for this

@segiddins
Copy link
Collaborator

Ah @ashfurrow this needs to be updated to not use the prepare_command, since that's run in the context of the download cache now

@ashfurrow
Copy link
Collaborator

@segiddins Do you have suggestions on an alternative?

@segiddins
Copy link
Collaborator

Maybe doing things in the post_install_hook? If 100% necessary, you can try and convince me tomorrow to add a pre_install_hook for plugins.

@ashfurrow
Copy link
Collaborator

So basically the intent here is to inject a new pod into the Podfile before installation occurs. We inject it, then modify it to add the .h/.m files we generate.

I looked for a pre_install_hook when I wrote this. One was not created with the plugins architecture because, at the time, no use case for such a hook could be thought of. So it sounds like a pre_install_hook was considered and only rejected because it wasn't useful. This is a case for its usefulness.

@alloy
Copy link
Contributor

alloy commented Apr 30, 2015

Agreed 👍

@eckrag89
Copy link

eckrag89 commented May 6, 2015

I'm also seeing this error with 0.37.0

@esttorhe
Copy link

esttorhe commented May 6, 2015

Hi guys; sadly i'm seeing this error now on 0.37.0 and project doesn't compile; i'm going back to previous version but wanted to let you know its broken

@rynbyjn
Copy link

rynbyjn commented May 6, 2015

This doesn't crash with cocoapods 0.37.1, however I get warnings now about the license:

[!] Unable to read the license file {project_path}/Pods/Keys/LICENSE for the spec Keys (1.0.2)

@esttorhe
Copy link

esttorhe commented May 6, 2015

I «reverted» to 0.36.4 for the time being because my project wasn't compiling.
Some minutes after that @segiddins released 0.37.1 but haven't tried it yet.

It seems its including everything under the Keys directory instead of (*.h | *.m) to the project though

@mergesort
Copy link

I had a similar issue, the .h and .m would not be added to the pod. Reverting to 0.36.4 fixed it for me, but is not ideal because 0.37/0.37.1 fixed bugs for me that were also breaking builds.

@orta
Copy link
Owner

orta commented May 8, 2015

Yeah, I've started work on getting keys out of all the hacks its currently using around the CocoaPods public API: CocoaPods/CocoaPods#3540

Will get a version of Keys out that uses the new hooks. Once ^ is in master.

@orta
Copy link
Owner

orta commented May 8, 2015

I got a new version out, 1.2.0 - with fixes for this.

@orta orta closed this as completed May 8, 2015
@nanoxd
Copy link
Author

nanoxd commented May 8, 2015

Thanks for getting this fixed so fast!

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

9 participants