From 4319e17023da3adaf09a5a4d87ae154ae6e0dbb5 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. --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 4bb5ce60697..f5d505e0c23 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,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', '~> 2.0', require: false gem 'rspec-activemodel-mocks', '~> 1.1', require: false From e85fd4cd7300b1e8f4f5f142cc6f5d41003ca23e 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. --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23395200849..26386f76164 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -224,7 +224,8 @@ commands: cd /tmp/dummy_extension bundle init bundle add rails -v "< 7.1" --skip-install - bundle add sqlite3 <> --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'