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

Fix overwrite issue with dependencies that have the same base dependencies #57

Merged
merged 2 commits into from
Mar 30, 2018

Conversation

bradphilips
Copy link
Contributor

When adding dependencies that have the same sub-dependencies i.e. AWSLambda and AWSS3 which both depend on AWSCore I was getting an exception such as the following:

Errno::EEXIST - File exists - /Users/bphilip1/Projects/ProgressiveApp/iOS/build/AWSCognito.framework
/Users/bphilip1/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:522:in block in mv' /Users/bphilip1/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1571:in block in fu_each_src_dest'
/Users/bphilip1/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1585:in fu_each_src_dest0' /Users/bphilip1/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:1569:in fu_each_src_dest'
/Users/bphilip1/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/fileutils.rb:517:in mv' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:28:in block in build_for_iosish_platform'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:16:in each' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:16:in build_for_iosish_platform'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:54:in block (2 levels) in <top (required)>' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:52:in each'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-rome-0.8.0/lib/cocoapods-rome/post_install.rb:52:in block in <top (required)>' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/hooks_manager.rb:111:in block (3 levels) in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:142:in message' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/hooks_manager.rb:103:in block (2 levels) in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/hooks_manager.rb:101:in each' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/hooks_manager.rb:101:in block in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:142:in message' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/hooks_manager.rb:100:in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:493:in run_plugins_post_install_hooks' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:472:in perform_post_install_actions'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:121:in install!' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/claide-1.0.1/lib/claide/command.rb:334:in run' /Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in run'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/gems/cocoapods-1.1.1/bin/pod:55:in <top (required)>' /Users/bphilip1/.rvm/gems/ruby-2.3.1/bin/pod:23:in load'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/bin/pod:23:in <main>' /Users/bphilip1/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in eval'
/Users/bphilip1/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `

This pull request fixes this problem by force overwriting the built dependency.

FileUtils.mv device_framework_lib, build_dir, :force => true

@bradphilips
Copy link
Contributor Author

@neonichu this alright? Ps love this plugin -- it's literally cut my build times in half and completely non-intrusive. Everything I love about Carthage but the power and vast ecosystem of Cocoapods. 👍

@tcamin
Copy link

tcamin commented Dec 27, 2017

+1

@orta
Copy link
Member

orta commented Mar 30, 2018

Alright, let's get this in 👍

@orta orta merged commit 731ca56 into CocoaPods:master Mar 30, 2018
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

Successfully merging this pull request may close these issues.

3 participants