Skip to content

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

Open

Description

@andrehjr

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

Activity

  1. dcleven commented on Nov 27, 2023

    @dcleven

    Any chance this will get fixed?

  2. hung-nguyen-hoang commented on Nov 28, 2023

    @hung-nguyen-hoang
    Contributor

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

  3. hung-nguyen-hoang commented on Nov 28, 2023

    @hung-nguyen-hoang
    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.

  4. andrehjr commented on Nov 28, 2023

    @andrehjr
    ContributorAuthor
  5. hung-nguyen-hoang commented on Nov 28, 2023

    @hung-nguyen-hoang
    Contributor

    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.

  6. andrehjr commented on Nov 28, 2023

    @andrehjr
    ContributorAuthor

    @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

  7. 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+[/+] on Nov 28, 2023
  8. hashtegner commented on Nov 28, 2023

    @hashtegner

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

  9. hung-nguyen-hoang commented on Dec 1, 2023

    @hung-nguyen-hoang
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions