googleapis/google-api-ruby-client

Faraday Gem conflict

jttmckee opened this issue · 4 comments

The gem google-apis-searchconsole_v1 has a requirement for Faraday 0.12, while the gem googleauth requires a Faraday gem version of at least 0.17.3.

This makes it impossible to use these gems together and hence impossible to use the search console gem to query private search console data.

The google-apis-searchconsole_v1 definitely should not have such a requirement. (It doesn't according to rubygems metdata: https://rubygems.org/gems/google-apis-searchconsole_v1). Where are you observing that requirement?

Closing due to lack of response, and because I can't reproduce. If you're still seeing this, please feel free to reopen and provide additional information.

I'm having this issue as well:

Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!
/Users/user-name/Documents/dev/AppName/models/mail_manager.rb:217: warning: key :subject is duplicated and overwritten on line 221
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-multipart-1.0.4/lib/faraday/multipart.rb:15: warning: already initialized constant Faraday::FilePart
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-1.2.0/lib/faraday/file_part.rb:53: warning: previous definition of FilePart was here
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-multipart-1.0.4/lib/faraday/multipart.rb:16: warning: already initialized constant Faraday::ParamPart
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-1.2.0/lib/faraday/param_part.rb:5: warning: previous definition of ParamPart was here
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-multipart-1.0.4/lib/faraday/multipart.rb:17: warning: already initialized constant Faraday::Parts
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-1.2.0/lib/faraday/file_part.rb:61: warning: previous definition of Parts was here
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-multipart-1.0.4/lib/faraday/multipart.rb:18: warning: already initialized constant Faraday::CompositeReadIO
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-1.2.0/lib/faraday/file_part.rb:66: warning: previous definition of CompositeReadIO was here
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-multipart-1.0.4/lib/faraday/multipart.rb:21: warning: already initialized constant Faraday::UploadIO
/Users/user-name/.rvm/gems/ruby-3.1.4/gems/faraday-1.2.0/lib/faraday/file_part.rb:59: warning: previous definition of UploadIO was here

It appears that I have some gems that are using faraday-multipart as a dependency as well, and when the constants are re-declared it throws these warnings.

I believe the solution would be to update those other gems and hopefully they are using the newer version of faraday, as it seems that some functionality has been moved from faraday-multipart to faraday.

I will report back with my findings, but I just wanted to make it clear that this is probably a fairly common issue people are running into.