From e406200a89c773dfde638da3e10c8d841b8be564 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 a629958c776..1c58daa81a5 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 79b19adcbdb8b6dece15c9ac42949a99576ece20 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a522d743806..5b676d63140 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -222,7 +222,9 @@ commands: mkdir -p /tmp/dummy_extension cd /tmp/dummy_extension bundle init - bundle add rails sqlite3 <> --skip-install + bundle add rails -v "< 7.1" --skip-install + bundle add sqlite3 -v "~> 1.3" --skip-install + test -n "<>" && bundle add <> --skip-install bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")" export LIB_NAME=set # dummy requireable file bundle exec rake -rrails -rspree/testing_support/extension_rake -e'Rake::Task["extension:test_app"].invoke'