-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Drop support to Ruby 3.1 #53041
Merged
Merged
Drop support to Ruby 3.1 #53041
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails 8 will require Ruby 3.2.0 or newer.
rafaelfranca
force-pushed
the
rm-drop-3.1
branch
from
September 25, 2024 18:58
8dadaed
to
c7b9bb1
Compare
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Sep 27, 2024
Rails main branch requires Ruby 3.2.0, we can also update the RuboCop TargetRubyVersion to 3.2. In Ruby 3.2, the Set class was made built-in, so it no longer requires require 'set', https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ > Set is now available as a builtin class without the need for require "set" then it addresses the following `Lint/RedundantRequireStatement` not to run `require "set"`. ```ruby $ bundle exec rubocop -A Inspecting 3324 files ... snip ... Offenses: actioncable/lib/action_cable/channel/base.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actioncable/lib/action_cable/connection/identification.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionmailer/test/base_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/abstract_controller/rendering.rb:8:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/action_controller/metal/renderers.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/action_controller/metal/strong_parameters.rb:13:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/lib/action_view/helpers/atom_feed_helper.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/lib/action_view/helpers/tag_helper.rb:7:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/test/actionpack/abstract/abstract_controller_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activejob/lib/active_job/serializers.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/attribute_methods/primary_key.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/fixtures.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/migration.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/delegation.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/dependencies.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/evented_file_update_checker.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/notifications/fanout.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/test/core_ext/class_test.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/test/descendants_tracker_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/lib/rails/application/bootstrap.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/lib/rails/application/finisher.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/test/application/configuration_test.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/test/application/zeitwerk_integration_test.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ tools/rail_inspector/lib/rail_inspector/visitor/attribute.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ 3324 files inspected, 25 offenses detected, 25 offenses corrected $ ``` Follow up rails#53041
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Sep 27, 2024
Rails main branch requires Ruby 3.2.0, we can also update the RuboCop TargetRubyVersion to 3.2. In Ruby 3.2, the Set class was made built-in, so it no longer requires require 'set'. https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ > Set is now available as a builtin class without the need for require "set" then it addresses the following `Lint/RedundantRequireStatement` not to run `require "set"`. ```ruby $ bundle exec rubocop -A Inspecting 3324 files ... snip ... Offenses: actioncable/lib/action_cable/channel/base.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actioncable/lib/action_cable/connection/identification.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionmailer/test/base_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/abstract_controller/rendering.rb:8:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/action_controller/metal/renderers.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionpack/lib/action_controller/metal/strong_parameters.rb:13:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/lib/action_view/helpers/atom_feed_helper.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/lib/action_view/helpers/tag_helper.rb:7:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ actionview/test/actionpack/abstract/abstract_controller_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activejob/lib/active_job/serializers.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/attribute_methods/primary_key.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/fixtures.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activerecord/lib/active_record/migration.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/delegation.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/dependencies.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/evented_file_update_checker.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/lib/active_support/notifications/fanout.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/test/core_ext/class_test.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ activesupport/test/descendants_tracker_test.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/lib/rails/application/bootstrap.rb:4:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/lib/rails/application/finisher.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/test/application/configuration_test.rb:6:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ railties/test/application/zeitwerk_integration_test.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ tools/rail_inspector/lib/rail_inspector/visitor/attribute.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ 3324 files inspected, 25 offenses detected, 25 offenses corrected $ ``` Follow up rails#53041
4 tasks
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Sep 27, 2024
Rails main branch requires Ruby 3.2.0, we can also update the RuboCop TargetRubyVersion to 3.2. In Ruby 3.2, the Set class was made built-in, so it no longer requires require 'set'. https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ > Set is now available as a builtin class without the need for require "set" then it addresses the following `Lint/RedundantRequireStatement` not to run `require "set"`. and removes the two extra lines after removing the `require "set"` manually. ```ruby $ bundle exec rubocop -A Inspecting 3324 files ... snip ... Offenses: actioncable/lib/action_cable/channel/base.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ ... snip ... tools/rail_inspector/lib/rail_inspector/visitor/attribute.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ 3324 files inspected, 25 offenses detected, 25 offenses corrected $ ``` Follow up rails#53041
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Sep 28, 2024
Rails main branch requires Ruby 3.2.0. This commit removes the TargetRubyVersion setting from .rubocop.yml, allowing RuboCop to determine the value from the rails.gemspec file. Since RuboCop 1.3.0, it has supported setting TargetRubyVersion directly from gemspec files. In Ruby 3.2, the Set class was made built-in, so it no longer requires require 'set'. https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ > Set is now available as a builtin class without the need for require "set" then it addresses the following `Lint/RedundantRequireStatement` not to run `require "set"`. and removes the two extra lines after removing the `require "set"` manually. ```ruby $ bundle exec rubocop -A Inspecting 3324 files ... snip ... Offenses: actioncable/lib/action_cable/channel/base.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ ... snip ... tools/rail_inspector/lib/rail_inspector/visitor/attribute.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ 3324 files inspected, 25 offenses detected, 25 offenses corrected $ ``` Follow up rails#53041 Refer to https://github.com/rubocop/rubocop/releases/tag/v1.3.0 rubocop/rubocop#8761
DanielaVelasquez
pushed a commit
to DanielaVelasquez/rails
that referenced
this pull request
Oct 3, 2024
Rails main branch requires Ruby 3.2.0. This commit removes the TargetRubyVersion setting from .rubocop.yml, allowing RuboCop to determine the value from the rails.gemspec file. Since RuboCop 1.3.0, it has supported setting TargetRubyVersion directly from gemspec files. In Ruby 3.2, the Set class was made built-in, so it no longer requires require 'set'. https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ > Set is now available as a builtin class without the need for require "set" then it addresses the following `Lint/RedundantRequireStatement` not to run `require "set"`. and removes the two extra lines after removing the `require "set"` manually. ```ruby $ bundle exec rubocop -A Inspecting 3324 files ... snip ... Offenses: actioncable/lib/action_cable/channel/base.rb:5:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ ... snip ... tools/rail_inspector/lib/rail_inspector/visitor/attribute.rb:3:1: W: [Corrected] Lint/RedundantRequireStatement: Remove unnecessary require statement. require "set" ^^^^^^^^^^^^^ 3324 files inspected, 25 offenses detected, 25 offenses corrected $ ``` Follow up rails#53041 Refer to https://github.com/rubocop/rubocop/releases/tag/v1.3.0 rubocop/rubocop#8761
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Oct 4, 2024
This commit removes conditions to see if ErrorHighligh 0.4.0 or higher version is available since ErrorHighlight 0.5.1+ is always available since Ruby 3.2 that is required by the Rails current main branch. - Ruby 3.2.0 Released https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ ErrorHighlight.spot(ex, backtrace_location: self) > The following default gems are updated. > error_highlight 0.5.1 Related to rails#48299 rails#53041
4 tasks
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Oct 4, 2024
This commit removes conditions to see if ErrorHighligh 0.4.0 or higher version is available since ErrorHighlight 0.5.1+ is always available since Ruby 3.2 that is required by the Rails current main branch. - Ruby 3.2.0 Released https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ ErrorHighlight.spot(ex, backtrace_location: self) > The following default gems are updated. > error_highlight 0.5.1 Related to rails#48299 rails#53041
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rails 8 will require Ruby 3.2.0 or newer.