Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
drb
, mutex_m
and base64
that are bundled gem candidates for…
… Ruby 3.4 This commit adds `drb`, `mutex_m` and `base64` to `activesupport/activesupport.gemspec` because 3.3.0dev shows warnings if bundled gem candidates are required like `mutex_m will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile.` - Example ``` $ ruby -v ; ruby generic_main.rb ruby 3.3.0dev (2023-08-07T23:09:02Z master 0e5da05a32) [x86_64-linux] Fetching https://github.com/rails/rails.git Resolving dependencies... Fetching gem metadata from https://rubygems.org/....... /home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-2942958827f1/activesupport/lib/active_support/notifications/fanout.rb:3: warning: mutex_m will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile. /home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-2942958827f1/activesupport/lib/active_support/message_encryptor.rb:4: warning: base64 will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile. generic_main.rb:16: warning: drb will be not part of the default gems since Ruby 3.4.0. Add it to your inline Gemfile. $ ``` - generic_main.rb ``` require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "rails", github: "rails/rails", branch: "main" end require "active_support" require "minitest/autorun" require "drb" require "base64" require "mutex_m" ``` These gems are chosen as follows. - Bundled gems candidates for Ruby 3.4 ```ruby $ ruby -v ; ruby -e 'pp Gem::BUNDLED_GEMS::SINCE.select { |k,v| v == "3.4.0" }' ruby 3.3.0dev (2023-08-07T23:09:02Z master 0e5da05a32) [x86_64-linux] {"abbrev"=>"3.4.0", "observer"=>"3.4.0", "getoptlong"=>"3.4.0", "resolv-replace"=>"3.4.0", "rinda"=>"3.4.0", "nkf"=>"3.4.0", "syslog"=>"3.4.0", "drb"=>"3.4.0", "mutex_m"=>"3.4.0", "csv"=>"3.4.0", "base64"=>"3.4.0"} $ ``` - `drb`, `mutex_m` and `base64` are required by Rails - "drb" ```ruby $ git grep 'require "drb"' activesupport/lib/active_support/testing/parallelization.rb:require "drb" activesupport/lib/active_support/testing/parallelization/server.rb:require "drb" ``` - "mutex_m" ```ruby $ git grep 'require "mutex_m"' actionpack/lib/action_controller/metal/params_wrapper.rb: require "mutex_m" activerecord/lib/active_record/attribute_methods.rb:require "mutex_m" activerecord/lib/active_record/relation/delegation.rb:require "mutex_m" activesupport/lib/active_support/notifications/fanout.rb:require "mutex_m" ``` - "base64" usage ```ruby $ git grep 'require "base64"' actioncable/Rakefile:require "base64" actionmailer/lib/action_mailer/inline_preview_interceptor.rb:require "base64" actionpack/lib/action_controller/metal/http_authentication.rb:require "base64" actionview/Rakefile:require "base64" activerecord/lib/active_record/encryption/message_serializer.rb:require "base64" activerecord/lib/active_record/fixture_set/render_context.rb:require "base64" activerecord/test/cases/encryption/message_serializer_test.rb:require "base64" activesupport/lib/active_support/message_encryptor.rb:require "base64" activesupport/lib/active_support/message_verifier.rb:require "base64" activesupport/lib/active_support/xml_mini.rb:require "base64" railties/test/application/mailer_previews_test.rb:require "base64" ``` - Dependency between Rails related modules - "drb" is only required by Active Support - "mutex_m" is required by Action Pack, Active Record and Active Support Action Pack and Active Record depend on Active Support. Therefore, adding dependency to Active Support is fine. https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/activerecord/activerecord.gemspec#L38 - "base64" is required by Action Cable, Action Mailer, Action Pack, Action View, Active Record, Active Support and Raillties. Action Cable, Action Mailer, Action Pack, Action View and Active Record and Railties depend on Active Support. Therefore, adding dependency to Active Support is fine. https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actioncable/actioncable.gemspec#L35 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionmailer/actionmailer.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionview/actionview.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/railties/railties.gemspec#L40 Refer to: https://bugs.ruby-lang.org/issues/19776 ruby/ruby#8126 rubygems/rubygems#6840
- Loading branch information