2021/10/28分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
ActiveSupport::DescendantsTracker
now mostly delegate toClass#descendants
on Ruby 3.1Rails.application.executor
hooks are now called around every tests.
Revert "Call Executor#wrap around each test"
Rails.application.executor
hookをテストの実行前後に実行するよう修正した、Call Executor#wrap around each testをRevertしています。既存のintegration testsを壊してしまうケースがある為。
Merge pull request #43549 from cgriego/no-select-all-from-information-schema-tables
activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
の修正です。
MySQL adapterでinformation_schema.tables
からカラムを取得する際に、SELECT *
していたのを、必要なカラムのみ取得するよう修正しています。SELECT *
だとMySQLのバージョン、設定によっては大変遅いSQLになってしまう為。
Setup bootsnap to speedup TestRunnerTest
railties/test/isolation/abstract_unit.rb
の修正です。
テストでRailsのコマンドを直接実行する際に、bootsnapを利用するよう修正しています。
Refactor DescendantsTracker to leverage native Class#descendants on Ruby 3.1
Active Supportの修正です。
ActiveSupport::DescendantsTracker
をRuby本体のClass#descendants
を使うよう修正、及び、Class#descendants
が追加された事により不要になったActiveSupport::DescendantsTracker.direct_descendants
、ActiveSupport::DescendantsTracker#direct_descendants
メソッドをdeprecateにしています。
Stop using the deprecated direct_descendants in Active Record
activerecord/lib/active_record/model_schema.rb
の修正です。
先のコミットでdeprecateになったActiveSupport::DescendantsTracker.direct_descendants
を使用している箇所があったのを修正しています。
railties/Rakefile
の修正です。
テストの実行時間の見積もりを、現在の実際のテストの実行時間の値を参考に修正しています。
Call Executor#wrap around each test
Active Support、Active Recordの修正です。
Revert "Call Executor#wrap around each test"でRevertした、Rails.application.executor
hookをテストの実行前後に実行する対応を再度コミットしています。 なお、意外と既存のアプリへの影響が大きそう、という理由で、既存のアプリについてはデフォルトは無効化されるようになっています。config.active_support.executor_around_test_case = true
かload_defaults
で最新バージョンを指定すると有効化されるようになっています。