thekie / fastlane-plugin-onesky

Helps to update the translations of your app using the OneSky service and fastlane.
MIT License
21 stars 20 forks source link

Version conflict with rest-client-1.8.0 #1

Open joeboyscout04 opened 7 years ago

joeboyscout04 commented 7 years ago

I am getting the following error when I install the plugin.

Error loading plugin 'fastlane-plugin-onesky': Unable to activate rest-client-1.8.0, because mime-types-3.1 conflicts with mime-types (< 3.0, >= 1.16)

I am running fastlane 2.42.0.

johnrufusj commented 6 years ago

I am also getting this error.

joeboyscout04 commented 6 years ago

Hey there, I came up with a workaround by using my own Gemfile. I started by following the directions here: https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile

Then added the version dependency for mime-types. This solved the conflict I had.

Gemfile

source "https://rubygems.org"

gem "fastlane"
gem "mime-types", "~> 2.99"

plugins_path = File.join(File.dirname(__FILE__), '.', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
thekie commented 6 years ago

Hello everyone, unfortunately this issue is not really easy to solve. The reason for the problem is that a new version of fastlane uses a new version of google-api-client, which needs a higher version of mime-types. On the other side, onesky-ruby uses a sub 2.x version of the rest-client, which needs mimetypes to be less than 3.0.

That is the conflict.

I started to solve this issue by forking onesky-ruby and updated the rest-client to ~> 2.0 and use this forked version in the 0.2.1 version of this plugin. This solves the conflict, but unfortunately introduces a new one:

Currently cocoapods-trunk is limiting the version of netrc to excatly version number 0.7.8, but the newly rest-client in onesky-ruby, needs it to be something 0.8, which is limiting the CocoaPods version to 0.2.0. OLD! CocoaPods is currently releasing the strict limitation on netrc, but there is no new release now.

See here: https://github.com/CocoaPods/cocoapods-trunk/pull/95

So what I did, in my gemfile of my xcode project is the following:

gem 'cocoapods-trunk', :git => 'git://github.com/CocoaPods/cocoapods-trunk.git'
gem 'cocoapods', :git => 'git://github.com/CocoaPods/CocoaPods.git'

This way I am using the newest version of CocoaPods, which resolves all conflicts, but leads to a crash, when I am running my fastlane's pod install. So here we are. I'll wait for the next cocoapods release and see if that will help. In the meantime I'll add a pull request for onesky-ruby.

joeboyscout04 commented 6 years ago

No problem...the workaround I posted earlier works for me but may be environment-dependent.

Thanks for making this plugin btw...we were crushed when Xcode dropped support for (OneSky) plugins so having the fastlane plugin allows us to keep OneSky in our toolchain.

joeboyscout04 commented 6 years ago

Hey @danielkiedrowski any update on the issue above here? We are looking at integrating into another project and this plugin is limiting our ability to update fastlane.

thekie commented 6 years ago

Hey @joeboyscout04, in order to fix the mentioned dependency conflict, I had to fork the current onesky-ruby repository and use the new version of rest-client. I already submitted a pull request, but so far no reaction from @onesky.

https://github.com/onesky/onesky-ruby/pull/13

In order to use my version of ruby-onesky I am currently using the following Gemspec:

# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem 'fastlane'
gem 'cocoapods'
gem 'onesky-ruby', :git => 'git://github.com/danielkiedrowski/onesky-ruby.git'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval(File.read(plugins_path), binding) if File.exist?(plugins_path)

I hope that solves your issue for now.