Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ruby 3.4 support #548

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add Ruby 3.4 support #548

wants to merge 2 commits into from

Conversation

JoeSouthan
Copy link
Contributor

@JoeSouthan JoeSouthan commented Feb 5, 2025

https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/

  • Remove support for Rails < 7, add support for Rails 8
  • Remove support for PostgreSQL < 13, add support for PostgreSQL 17
  • Remove support for Ruby < 3.0, add support for Ruby 3.4

@JoeSouthan JoeSouthan force-pushed the joesouthan-ruby-34 branch 5 times, most recently from a8ea9fa to 4013558 Compare February 5, 2025 16:02
@JoeSouthan JoeSouthan marked this pull request as ready for review February 6, 2025 15:58
Comment on lines +37 to +60
- ruby-version: "3.1"
postgres-version: "14"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "15"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "16"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "17"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "14"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "15"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "16"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "17"
rails-version: "8.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is postgres-version being added to these if we're adding exclusions for all postgres versions for each combination of ruby & rails that's being excluded?

Does it not meaningfully behave the same as this, but with far more checks needing to be run (and being significantly harder to read)

Suggested change
- ruby-version: "3.1"
postgres-version: "14"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "15"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "16"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "17"
rails-version: "main"
- ruby-version: "3.1"
postgres-version: "14"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "15"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "16"
rails-version: "8.0"
- ruby-version: "3.1"
postgres-version: "17"
rails-version: "8.0"
- ruby-version: "3.1"
rails-version: "main"
- ruby-version: "3.1"
rails-version: "8.0"

Comment on lines +104 to +116
- ruby-version: "3.1"
mysql-version: "8.0"
rails-version: "main"
- ruby-version: "3.1"
mysql-version: "8.4"
rails-version: "main"

- ruby-version: "3.1"
mysql-version: "8.0"
rails-version: "8.0"
- ruby-version: "3.1"
mysql-version: "8.4"
rails-version: "8.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, I don't see what the benefit is of having the mysql versions in the exclusions matrix if it's not being used to make new combinations

Suggested change
- ruby-version: "3.1"
mysql-version: "8.0"
rails-version: "main"
- ruby-version: "3.1"
mysql-version: "8.4"
rails-version: "main"
- ruby-version: "3.1"
mysql-version: "8.0"
rails-version: "8.0"
- ruby-version: "3.1"
mysql-version: "8.4"
rails-version: "8.0"
- ruby-version: "3.1"
rails-version: "main"
- ruby-version: "3.1"
rails-version: "8.0"

Comment on lines +25 to +27
unless ENV["RAILS_VERSION"]
spec.add_dependency "rails", ">= 7.0"
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's possible to use Statesman without ActiveRecord, using the Statesman::Adapters::Memory adapter, so I don't think we should be adding a runtime requirement on ActiveRecord where there wasn't one before

Suggested change
unless ENV["RAILS_VERSION"]
spec.add_dependency "rails", ">= 7.0"
end

@@ -10,7 +10,19 @@ elsif ENV['RAILS_VERSION']
gem "rails", "~> #{ENV['RAILS_VERSION']}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to https://github.com/gocardless/statesman/pull/548/files#r1945092519, we should have a default version of Rails here for when RAILS_VERSION is not set, as we want to ensure there's always a Rails development dependency, but not necessarily a runtime dependency

Suggested change
gem "rails", "~> #{ENV['RAILS_VERSION']}"
gem "rails", "~> #{ENV['RAILS_VERSION']}"
else
gem "rails", ">= 7.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants