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

Support Rails 8.0 #258

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Support Rails 8.0 #258

merged 1 commit into from
Dec 18, 2024

Conversation

bquorning
Copy link
Contributor

@bquorning bquorning commented Nov 9, 2024

Rails 8.0.0 was released a few days ago.

Fixes #257

@bquorning bquorning mentioned this pull request Nov 9, 2024

gem.add_dependency "minitest", "~> 5.20"
gem.add_dependency "railties", ">= 7.2.0", "< 8.0.0"
gem.add_dependency "railties", ">= 8.0.0", "< 8.1.0"

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think minitest-rails is in a different situation than rails-i18n, since it aims to release with the same major and minor version as the Rails version it supports.

Copy link

Choose a reason for hiding this comment

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

Just an observation, because the commit doesn't say why. But the most recent activity like this chose to use < [next major version].0.0 as the upper bound.
a3b0780#diff-b0f4e53f9bc79026fa5f7eb8b63bdf2c87232f0ba7b91918d5896531e65fa980R21

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@blowmage What would you prefer here? < 8.1.0, < 9.0.0 or no upper limit at all?

Choose a reason for hiding this comment

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

@pdobb the comment right below that one does explain why: "This upper dependency require to do the same dance every few years [list of PRs] That prevent people from trying Rails release candidates etc. It's just a bad pattern."

An upper limit causes needless delay and churn when things don't actually need a change. Let's assume we remove the upper constraint and Rails 9 comes out as an example:

  • If nothing breaks with minitest-rails: great! No PR/gem release needed to unblock apps to upgrade to the newest version of Rails. This is an improvement over the current way.
  • If something breaks with minitest-rails: we'll wait for a new release to fix it. This is the same as today.

In my app's Gemfile I can pin specific versions if I know that works better for my situation, but I can't override the upper constraint as easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intention of this PR is merely to add Rails 8.0 support to this gem, and I have tried to do it with as few changes as possible, to make it easy to review.

If you want minitest-rails to no longer have the upper version constraint on the railties version, you should feel free to open a separate pull request.

@@ -18,11 +18,10 @@ jobs:
fail-fast: false
matrix:
ruby:
- '3.1'

Choose a reason for hiding this comment

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

Ruby 3.1 EOL is 2025-03-31
See: https://www.ruby-lang.org/en/downloads/branches/

Comment on lines +28 to +29
def describe(*, &block)
cls = describe_before_minitest_spec_constant_fix(*, &block)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

RuboCop recommends these changes now that we’re on Ruby 3.2+.

Choose a reason for hiding this comment

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

Not sure this is a good idea because it won't work with JRuby

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The latest JRuby release is v9.4.9.0, which identifies as Ruby 3.1. So I don’t think you will be able to use Rails 8.0 with JRuby anyway (yet).

Copy link
Collaborator

@zenspider zenspider left a comment

Choose a reason for hiding this comment

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

OK. I'mma step in and try to maintain this for a while... As such I'm still catching up... I've asked for some changes to #255 and going to tend to that before the 8.0 PRs... as such I suspect it'll cause conflict on your branch when it gets finalized and merged.

@zenspider
Copy link
Collaborator

Please rebase and fix conflicts OR tell me you're letting this go and I can try to take it over

@bquorning bquorning force-pushed the rails-8-0 branch 2 times, most recently from 10be640 to 0abae85 Compare December 18, 2024 06:25
@zenspider zenspider merged commit 7b3defa into minitest:master Dec 18, 2024
3 checks passed
@zenspider zenspider mentioned this pull request Dec 18, 2024
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.

Version incompatibility with Rails 8
5 participants