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

Test on Ruby 3.1 #16056

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Test on Ruby 3.1 #16056

merged 2 commits into from
Sep 29, 2023

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Sep 29, 2023

HOMEBREW_BOOTSNAP is not supported for now, as it doesn't work on anything not macOS system Ruby. I will investigate this further soon.

@Bo98 Bo98 force-pushed the test-ruby-3.1 branch 5 times, most recently from 73577cc to 954888d Compare September 29, 2023 03:28
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good to far! Do we definitely need to test this on macOS and Ubuntu?

@Bo98
Copy link
Member Author

Bo98 commented Sep 29, 2023

macOS: yes, Cask had several issues
Ubuntu: don't think there was really anything flagged on this occasion, depends how much you value the extend/os/linux stuff.

@MikeMcQuaid
Copy link
Member

@Bo98 Cool. My temptation would be that we consider adding these tests and then just defaulting (all?) Linux CI to use the newest Ruby we plan on using and have this split for macOS. Thoughts?

@Bo98
Copy link
Member Author

Bo98 commented Sep 29, 2023

Until the point portable Ruby moves to 3.1, it's worthwhile having at least one of Linux CI (not sure which one) running on 2.6 since adjustments for Ruby 3 can break 2.6.

@Bo98
Copy link
Member Author

Bo98 commented Sep 29, 2023

Going forward might be good to have a policy of how we handle this. If we're doing a switch every year, do we have it so that when we switch to 3.1 default we have one or two jobs testing 3.2 ahead of time (so some on "default" and a couple on "default + 1").

The backbone is in place now, so it's simply a case of tweaking the matrix, setting ruby: whatever wherever.

@MikeMcQuaid
Copy link
Member

@Bo98 I think once we're back to supporting a specific major/minor version combination I think we just keep CI at the lowest version and let people use newer ones but flag it in brew doctor etc. and tell them to file PRs to fix. I don't want us to be actively supporting a too wide range of versions (which is also why newer versions are more appealing)

@Bo98
Copy link
Member Author

Bo98 commented Sep 29, 2023

Was more to prepare for when we migrate each year but yeah I'm guessing most Ruby versions don't have compatibility issues. In the scenario of a theoretical Ruby 4, it might be worth testing that ahead of time.

@Bo98 Bo98 merged commit 196b26b into Homebrew:master Sep 29, 2023
30 checks passed
@Bo98 Bo98 deleted the test-ruby-3.1 branch September 29, 2023 13:50
@Bo98
Copy link
Member Author

Bo98 commented Sep 29, 2023

I think we can move pretty quickly with the migration tbh. All the tests pass so it'll be a case of building a portable Ruby, adding an env to use it and most of the testing work will be areas we don't have CI coverage for (hopefully little) and individual formulae and casks (though I reckon kwarg hash usage there is minimal to none). I've not noticed any other issues using Ruby 3 so far with these fixes.

The larger changes, like dependency updates, will come after we drop 2.6 as it's signficantly easier to deal with if we wait until then. The TargetRubyVersion bump in RuboCop may or may not also bring up a lot of things.

@github-actions github-actions bot added the outdated PR was locked due to age label Oct 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants