-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update minimum Ruby version to 3.0 #3698
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
Conversation
Updates the available performance cops, these needed fixing: ``` lib/puma/control_cli.rb:251:35: C: [Correctable] Performance/DeletePrefix: Use delete_prefix instead of sub. if Signal.list.key? sig.sub(/\ASIG/, '') ^^^ test/helper.rb:151:23: C: [Correctable] Performance/DeletePrefix: Use delete_prefix instead of sub. signal = sig.to_s.sub(/\ASIG/, '').to_sym ^^^ test/runner:61:23: C: [Correctable] Performance/DeleteSuffix: Use delete_suffix instead of sub. file_arg = ARGV.pop.sub(/\.rb\z/, '') ^^^ test/runner:63:68: C: [Correctable] Performance/DeleteSuffix: Use delete_suffix instead of sub. file_args = file_arg.split(File::PATH_SEPARATOR).map { |fn| fn.sub(/\.rb\z/, '') } ```
862a6b3
to
6603abb
Compare
But, now that we're at v3.0, should we try to leave each installed version of RubyGems and Bundler as is? In some cases they're updated. To fix, both MRI & nonMRI would need |
I added a proposed policy doc today #3700. If we follow the policy for Rack support listed there, then rack1 support can be removed. I'll add another commit to remove that test, I wasn't sure if it would be runnable with Ruby 3.0 or not and wanted CI to tell me.
I figured that one out after a cascade of CI failures 😅. In blame, the other lines were added after you added that comment (IIRC).
I added them back in as they were originally. I'm not totally following what your asking or suggesting here. For github actions yaml I tend to make fairly mechanical changes, if you can make inline code suggestions or describe a higher level change, I'll be happy to look into it. |
I see your commit on this branch, thanks. Stepping out for a bit if you need to iterate. |
Yes, added the commit. I'm too familiar with Re the failures, I've got PR #3694 (only test fixes) and also PR #3582 (sizable refactor), both of which seem to pass CI. Not sure why #3582 is passing the few odd jobs that fail, I need to compare the two. PR #3582 doesn't change any public API's, but it may mess up a lot of open PR's when it's merged. Simply put, it encapsulates all request code in |
This is all green now. Thanks for your help! I approved #3694, can you merge these two and resolve conflicts? (merge order is up to you). I peeked at #3582 it seems large I've not dug in. If it's not a change we could merge post v7, there are some config related PRs that are ready to merge, but need rebase and re-test https://github.com/puma/puma/issues?q=state%3Aopen%20label%3Av7. If those are merged and tests are passsing on this #3582 I'm okay merging it in (pending a review). |
I did run the failed tests again, but it shows the intermittent issues with CI (fail, then pass).
Not sure what you mean by two? This and #3694? I'd like to look at why tests are passing with #3582, because I did not make the changes that were contained in #3694. |
Yes.
It's my general assumption that the suite is flappy right now and that some re-starts fix intermittent issues. As long as they're all green once, that's good enough for me, for now. |
This is looking great!! Some other things I found that can probably be updated or removed:
|
The prior code used branching with an else and a negation. Flipping the order and removing the negation makes it easier to read. Added code comments demonstrating why truffle ruby is special cased
6194a83
to
e32e96f
Compare
https://hub.docker.com/layers/library/ruby/3.4.5-alpine/images/sha256-5dd7ab3c51da265f3b3a4eed3dfd90ffd116c32dc99d1a584c7141cca92a6c93 Trim trailing whitespace and make sure there's vertical whitespace after a paragraph, before a code section
``` ⛄️ 3.4.5 🚀 /Users/rschneeman/Documents/projects/puma (schneems/rev-min-ruby) $ irb irb(main):001> Thread.attr_accessor :puma_server => [:puma_server, :puma_server=] ```
Patch #1345 was added as a workaround for https://bugs.ruby-lang.org/issues/13632. The gem addition was already removed in another commit. An un-monkey-patched version of Ruby does not have this method, so the respond_to? check always returns false, so this code is currently a no-op anyway. ``` (irb):2:in '<main>': undefined method 'purge_interrupt_queue' for an instance of Thread (NoMethodError) from <internal:kernel>:168:in 'Kernel#loop' from /Users/rschneeman/.gem/ruby/3.4.5/gems/irb-1.15.2/exe/irb:9:in '<top (required)>' from /Users/rschneeman/.gem/ruby/3.4.5/bin/irb:25:in 'Kernel#load' from /Users/rschneeman/.gem/ruby/3.4.5/bin/irb:25:in '<main>' ```
This version was previously removed from CI, this is the only `rack1` reference in the codebase.
@joshuay03 thanks for the assist 💯 I searched for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Discussion around this decision is in #3588
close #3588
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.