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

Drop support for Ruby 3.0 (reaching EOL) #29702

Merged
merged 6 commits into from Apr 15, 2024

Conversation

mjankowski
Copy link
Contributor

Ruby 3.0 is scheduled to reach EOL at the end of this month -- https://www.ruby-lang.org/en/downloads/branches/

Opening a draft here to capture what we may need to do to drop support at some point.

Vaguely related to #28013 in the sense that we may want to wait until we have a confident merge of 3.3 support before dropping 3.0.

I may have missed some things but the changes here are minimal thus far:

  • Drop 3.0 in test matrix on CI
  • Update README and Gemfile with 3.1+ references
  • Update rubocop to target 3.1, and update the cops which broke with that change to prefer our current style instead of changing anything. Will leave some inline comments on this PR re: that aspect.

@renchap
Copy link
Sponsor Member

renchap commented Mar 21, 2024

I think we will drop Ruby 3.0 support in 4.3, so not opposed to this. We can probably enable CI on 3.3 as well, but we need 3.3.1 to fix YJIT before we can recommend using it for deployments.

@mjankowski
Copy link
Contributor Author

I think we will drop Ruby 3.0 support in 4.3, so not opposed to this.

Cool.

We can probably enable CI on 3.3 as well, but we need 3.3.1 to fix YJIT before we can recommend using it for deployments.

Makes sense ... I'll rebase that other PR and try to figure out what else is needed over there for a "good enough to merge into main, if not fully production-ready yet" sort of status.

Copy link
Sponsor Member

@renchap renchap left a comment

Choose a reason for hiding this comment

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

Ok for me, Ruby 3.0 should now be EOL.

@ClearlyClaire do you think we can drop 3.0 support in Mastodon 4.3, of should we do it for 4.4?

If everything goes well, 3.3.1 should be released soon, so Mastodon 4.3 would support Ruby >= 3.1, < 3.4

@renchap renchap added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Apr 2, 2024
@ClearlyClaire
Copy link
Contributor

Looking at Debian stable and Ubuntu LTS versions, it seems like they either ship Ruby 3.1 or do not support Ruby 3. Therefore I think it should be fine to drop Ruby 3.0.

@mjankowski
Copy link
Contributor Author

We are now into April and past the EOL date for 3.0 (although the maintenance page still lists it as "expected" not actually EOL...)

Starting with ruby 3.1, the enforced rubocop default for hashes is to
prefer the shorthand syntax which omits hash values when the local var
names match the hash keys.

For example, in this scenario:

    Fabricate(:status, account: account, poll: poll)

The cop is going to enforce this style:

    Fabricate(:status, account:, poll:)

This works the same way, with the values in variables matching the key
names passed in.

We have thousands of violations of this cop, so lets set this value to
allow `either` style.
@ClearlyClaire ClearlyClaire added this pull request to the merge queue Apr 15, 2024
Merged via the queue into mastodon:main with commit 1549e6a Apr 15, 2024
31 checks passed
@mjankowski mjankowski deleted the ruby-eol-3-0 branch April 15, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants