From 0e97bb68f972318dcc5080e496c714567af54804 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Wed, 17 Apr 2024 21:53:35 +0200 Subject: [PATCH 1/2] Restrict sqlite3 gem to '~> 1.3', like ActiveRecord They just released sqlite3 2.0.0, but ActiveRecord's sqlite3 adapter doesn't know about this yet, leading to conflicting sqlite3 gems in specs. This is probably a temporary fix until ActiveRecord learns the news. (cherry picked from commit 4319e17023da3adaf09a5a4d87ae154ae6e0dbb5) --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 1e6dd934e00..88390732f1d 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,7 @@ dbs = ENV['DB_ALL'] ? 'all' : ENV.fetch('DB', 'sqlite') gem 'mysql2', '~> 0.5.0', require: false if dbs.match?(/all|mysql/) gem 'pg', '~> 1.0', require: false if dbs.match?(/all|postgres/) gem 'fast_sqlite', require: false if dbs.match?(/all|sqlite/) +gem 'sqlite3', '~> 1.4', require: false if dbs.match?(/all|sqlite/) gem 'database_cleaner', '~> 1.3', require: false gem 'rspec-activemodel-mocks', '~> 1.1', require: false From 492d00fc5a220ecfd3dbd9d8364c27af297246ef Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Thu, 18 Apr 2024 11:23:34 +0200 Subject: [PATCH 2/2] Restrict sqlite3 for the extension generator The task itself is fine, as it inherits from Rails' app generator, which has the sqlite3 restriction: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/database.rb#L19. (cherry picked from commit e85fd4cd7300b1e8f4f5f142cc6f5d41003ca23e) # Conflicts: # .circleci/config.yml --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47d9fed6a87..807e2165274 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -222,8 +222,9 @@ commands: mkdir -p /tmp/dummy_extension cd /tmp/dummy_extension bundle init - bundle add rails sqlite3 <> --skip-install - bundle add solidus --git "file://$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")" + bundle add rails -v "< 7.1" --skip-install + bundle add sqlite3 -v "~> 1.3" --skip-install + test -n "<>" && bundle add <> --skip-install export LIB_NAME=set # dummy requireable file bundle exec rake -rrails -rspree/testing_support/extension_rake -e'Rake::Task["extension:test_app"].invoke'