From 2650732b385f3cf25f748d1d8878fddb746f8945 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Tue, 16 Jan 2024 07:07:42 +0900 Subject: [PATCH 1/2] Avoid loading bundler 2.4.22 that vendorizes thor 1.3.0 when thor 1.3.0 is vendorized, lcs_diff.rb emits method redefinition warnings as follows: .../src/github.com/rails/thor/lib/thor/shell/lcs_diff.rb:6: warning: method redefined; discarding old show_diff .../.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb:6: warning: previous definition of show_diff was here .../src/github.com/rails/thor/lib/thor/shell/lcs_diff.rb:21: warning: method redefined; discarding old output_diff_line .../.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb:21: warning: previous definition of output_diff_line was here .../src/github.com/rails/thor/lib/thor/shell/lcs_diff.rb:37: warning: method redefined; discarding old diff_lcs_loaded? .../.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb:37: warning: previous definition of diff_lcs_loaded? was here --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 736a7b7c..b834d2d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,5 +12,6 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + bundler: ${{ (matrix.ruby_version < '3' && '2.4.21') || 'lagest' }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle exec thor spec From 4afe5e35491c825d20e69c89402c3b159932301b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 26 Feb 2024 12:28:42 -0500 Subject: [PATCH 2/2] Update .github/workflows/tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b834d2d2..3d52d782 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,6 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler: ${{ (matrix.ruby_version < '3' && '2.4.21') || 'lagest' }} + bundler: ${{ (matrix.ruby_version < '3' && '2.4.21') || 'latest' }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle exec thor spec