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

ruby: move towards 3.1 #192860

Merged
merged 1 commit into from
Oct 7, 2022
Merged

ruby: move towards 3.1 #192860

merged 1 commit into from
Oct 7, 2022

Conversation

raboof
Copy link
Member

@raboof raboof commented Sep 25, 2022

Description of changes

Currently, pkgs.ruby is ruby 2.7.6, which is in 'security updates only' mode and scheduled to go EOL April 2023. Updating pkgs.ruby to be ruby 3.1 would be a rather large change, but at least using ruby 3.1 to bootstrap building ruby itself would be a nice first step.

Tested with asciidoctor that this indeed now allows building a ruby application without getting ruby 2.7 in the build closure.

Also fixes #192729

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

bundlerApp = bundlerApp.override {
# there is no particular reason to pick 3.1 specifically,
# but we don't want to be stuck on the currently-default 2.7:
ruby = ruby_3_1;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ruby = ruby_3_1;
ruby = ruby_3;

How about we add an alias for 3.X to not accidentally forget this for 3.2?

Copy link
Member Author

Choose a reason for hiding this comment

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

ruby_3 does not exist yet, and if we want to add it I think we should add it in a separate PR. It is not completely obvious to me that it is desirable, as it introduces the same problem we have with ruby right now, i.e. that we don't dare to update it to the newer ruby because it would cause many rebuilds and it's not reasonably easy to test all impacted packages.

Perhaps explicitly referencing ruby_3_1 is actually better, perhaps not, but in any case introducing ruby_3 does not belong in this PR IMHO.

Copy link
Member

Choose a reason for hiding this comment

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

if we want to add it I think we should add it in a separate PR

Thats not really a problem, we can do it in this one with no problems.

that we don't dare to update it to the newer ruby because it would cause many rebuilds and it's not reasonably easy to test all impacted packages.

The rebuild count is fine, we just target staging. Also Jumping from 2.X to 3.X is way more impactful than from 3.1 to 3.2 and if a small amount of packages breaks that is okay. We cna fix them in staging-next.

Copy link
Member Author

@raboof raboof Oct 2, 2022

Choose a reason for hiding this comment

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

if we want to add it I think we should add it in a separate PR

Thats not really a problem, we can do it in this one with no problems.

I know I can, but I didn't want to, since I think this is a decision that the ruby ecosytem maintainers (like @marsam, @vrthra, @manveru) should be involved in - I didn't want to make that change without their input.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since there were no objections from the ruby maintainers pinged here, I went ahead and made the change suggested by @SuperSandro2000 - though TBH I still prefer to keep PR's smaller in scope, if not for technical reasons then for social ones.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think adding ruby_3 may be less useful than its Python counterpart, since ruby 3 didn't represent a huge breakage and its adoption is doing well; also ruby 2.7 is going EOL on March 2023, so we probably are going remove it for 23.05.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, given that feedback I moved to ruby_3_1 again 👍

Copy link
Member

Choose a reason for hiding this comment

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

TBH I still prefer to keep PR's smaller in scope, if not for technical reasons

which means more PRs and more notifications.

@raboof raboof force-pushed the ruby-move-towards-3.1 branch 2 times, most recently from 1be5fad to 15ed706 Compare October 5, 2022 08:05
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 5, 2022
Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates
only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby`
to be ruby 3.1 would be a rather large change, but using ruby 3 to
bootstrap building ruby itself would be a nice first step in that
direction.

Tested with asciidoctor that this indeed now allows building a ruby
application without getting ruby 2.7 in the build closure.

Also fixes NixOS#192729
@marsam marsam merged commit 7a2dd2e into NixOS:staging Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants