-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update gem requirement to allow Rails 7.1 #2453
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
Conversation
@wasifhossain can we expect this to be merged soon? It's blocking our upgrade to rails 7.1 at the moment |
unfortunately tests are failing to run on Ubuntu 18.04 stack. there's an open PR #2451 to address the issue. could you please test this change on that branch and if tests pass, then we can merge both these PRs. what do you think? |
Hey @wasifhossain, just wondering what would be your preferred way to do this:
|
In case it is option 2: #2454 |
Got one failing test on ruby 2.7 and rails 7.1 |
Looks like the tests passed but running Rubocop failed 😢 wrong number of arguments (given 2, expected 1)
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/psych-5.1.0/lib/psych.rb:322:in `safe_load'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/config_loader.rb:164:in `yaml_safe_load'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/config_loader.rb:149:in `load_yaml_configuration'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/config_loader.rb:35:in `load_file'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/config_store.rb:24:in `options_config='
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/cli.rb:64:in `act_on_options'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/cli.rb:25:in `run'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/rake_task.rb:49:in `run_cli'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/rake_task.rb:37:in `run_main_task'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/rake_task.rb:29:in `block (2 levels) in initialize'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/file_utils_ext.rb:58:in `verbose'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rubocop-0.40.0/lib/rubocop/rake_task.rb:27:in `block in initialize'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/bin/rake:23:in `load'
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.7.0/bin/rake:23:in `<top (required)>'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli/exec.rb:58:in `load'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli/exec.rb:58:in `kernel_load'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli/exec.rb:23:in `run'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli.rb:492:in `exec'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli.rb:34:in `dispatch'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/cli.rb:28:in `start'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:37:in `block in <top (required)>'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.4.20/exe/bundle:29:in `<top (required)>'
/opt/hostedtoolcache/Ruby/2.7.8/x64/bin/bundle:23:in `load'
/opt/hostedtoolcache/Ruby/2.7.8/x64/bin/bundle:23:in `<main>'
RuboCop failed!
Running RuboCop...
Error: Process completed with exit code 1. |
I see. rails 7.1 is requiring psych this way
unfortunately rubocop 0.40 has issues with psych >= 4 and rdoc 6.3.3 is the last version that doesn't require psych. so I could see the tests passing for Ruby 2.7 x Rails 7.1 with this change diff --git a/Gemfile b/Gemfile
--- a/Gemfile
+++ b/Gemfile
@@ -88,6 +88,7 @@ end
group :development, :test do
if RUBY_VERSION < '3.0'
gem 'rubocop', '~> 0.40.0', require: false
+ gem 'rdoc', '6.3.3', require: false
else
gem 'rubocop', '~> 1.56.0', require: false
gem 'rubocop-minitest', '~> 0.31.0', require: false |
@schinery feel free to make the change in |
@wasifhossain done 3f628ba |
Co-authored-by: Andreas Finger <[email protected]>
@wasifhossain @bf4 is this good to be merged? |
Great job! |
when could we expect this to be available in a new release in rubygems? |
@jgmontoya should be live now |
@schinery @mediafinger awesome job! |
Purpose
Update allowed version of Rails to
< 7.2.0
as they have now released 7.1.0.Changes
rails_versions
in Gemspec to< 7.2
rails-version
to7.1
ruby-version: '3.2'
to CI testsRelated GitHub issues
Based changes on #2428 which updated from
< 7.0
to< 7.1
.