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

v2.2.0 is asking for activesupport < 6.0 with ruby 2.7+ #1723

Open
andrehjr opened this issue Feb 3, 2021 · 8 comments
Open

v2.2.0 is asking for activesupport < 6.0 with ruby 2.7+ #1723

andrehjr opened this issue Feb 3, 2021 · 8 comments

Comments

@andrehjr
Copy link
Contributor

andrehjr commented Feb 3, 2021

Hi,

There's a conditional on the gemspec to specify the requirements for activesupport which does not seem to be working.
https://github.com/gooddata/gooddata-ruby/blob/master/gooddata.gemspec#L57-L61

I think that will only work when you build gem locally and gem push?

# frozen_string_literal: true

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  ruby '2.7.2'

  gem "rails", "~> 6.0"
  gem "gooddata", "~> 2.1.15"
end

Will result in:

/Users/andrehjr/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/resolver.rb:59:in `rescue in start': Bundler could not find compatible versions for gem "activesupport": (Bundler::VersionConflict)
  In Gemfile:
    activesupport (~> 6.0) x86_64-darwin-19

    gooddata (~> 2.1.15) x86_64-darwin-19 was resolved to 2.1.15, which depends on
      activesupport (< 6.0, >= 5.2.4.3)

The requirements for each version on rubygems changed over time.

https://rubygems.org/gems/gooddata/versions/2.1.8
activesupport > 4.2.9, < 6.1

https://rubygems.org/gems/gooddata/versions/2.1.10
activesupport >= 5.2.4.3, < 6.0

https://rubygems.org/gems/gooddata/versions/2.1.15
activesupport >= 5.2.4.3, < 6.0
@dcleven
Copy link

dcleven commented Nov 27, 2023

Any chance this will get fixed?

@hung-nguyen-hoang
Copy link
Contributor

The issues is obsoleted. So could you please try again with latest gooddata gem ?
gem 'gooddata', '~> 2.2'
Thank you.

@hung-nguyen-hoang
Copy link
Contributor

The issue is obsoleted due to occurred for old version of gooddata gem. So I will close the issue.
If the issue still happens for the latest gooddata gem, then please raise new issue.
Thank you.

@andrehjr
Copy link
Contributor Author

@hung-nguyen-hoang 2.2.0 has the same problem.

image

https://rubygems.org/gems/gooddata/versions/2.2.0

@hung-nguyen-hoang
Copy link
Contributor

hung-nguyen-hoang commented Nov 28, 2023

Hi @andrehjr,
The runtime dependencies for gooddata 2.2.0 gem:
activesupport >= 5.2.4.3, < 6.0
But correctly in the source code of gooddata 2.2.0:
if RUBY_VERSION >= '2.5'
s.add_dependency 'activesupport', '>= 6.0.3.1'
else
s.add_dependency 'activesupport', '>= 5.2.4.3', '< 6.0'
end
So please try it again. If the error still happens, then please send us the error log for more investigation ?
Thank you.

@andrehjr
Copy link
Contributor Author

@hung-nguyen-hoang Create a file like this:

gooddata_test.rb

# frozen_string_literal: true

require "bundler/inline"

gemfile(true) do
  source "https://rubygems.org"

  ruby '3.2.0' # or some other version you have locally

  gem "rails", "~> 6.0"
  gem "gooddata", "~> 2.2"
end

Execute: ruby gooddata_test.rb

$ ruby gooddata_test.rb
....
And because rails >= 6.1.7.6, < 7.0.0.alpha1 depends on activesupport = 6.1.7.6
  and gooddata >= 2.1.12 depends on activesupport >= 5.2.4.3, < 6.0,
  gooddata >= 2.1.12 is incompatible with rails >= 6.0.0, < 7.0.0.alpha1.
So, because Gemfile depends on rails ~> 6.0
  and Gemfile depends on gooddata ~> 2.2,
  version solving has failed.
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb:73:in `block in propagate'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb:70:in `reverse_each'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb:70:in `propagate'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb:42:in `work'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb:58:in `solve'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/resolver.rb:73:in `solve_versions'
	from /Users/andrehjr/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/resolver.rb:32:in `start'

I don't think the RUBY_VERSION >= '2.5' on the gemspec works for published gems, because when you push the gem. That's what gets sent to Rubygems.org. If you look there. You can the runtime dependencies are fixed.

Full log output: https://gist.github.com/andrehjr/a1eab22abb02ea656cc1856f0f809257

@andrehjr andrehjr changed the title v2.1.15 is asking for activesupport < 6.0 with ruby 2.7 v2.2.0 is asking for activesupport < 6.0 with ruby 2.7+ Nov 28, 2023
@hashtegner
Copy link

@hung-nguyen-hoang gemspec is executed on your computer, not the user's computer. It is executed to build the gem, not install it.

@hung-nguyen-hoang
Copy link
Contributor

hung-nguyen-hoang commented Dec 1, 2023

I raised ticket for our team to investigate and support the case ticket We will message to you, when we have a plan to fix it.
Thank you.

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

4 participants