Repository navigation
Support Ruby 4 - #138
Support Ruby 4#138The-Alchemist wants to merge 2 commits into
Conversation
eregon
left a comment
There was a problem hiding this comment.
LGTM, thank you.
Not super found of the noise of .freeze on constants, but since that seems the shopify style probably no good enough reason to deviate from it here.
| # rake < 13.2 requires ostruct, which is not a default gem in Ruby 4. | ||
| spec.add_development_dependency("rake", "~> 13.2") | ||
| spec.add_development_dependency("rspec", "~> 3.8") | ||
| spec.add_development_dependency("rubocop-shopify", ">= 2.9.0") | ||
| spec.add_development_dependency("rubocop-shopify", ">= 3.0") |
There was a problem hiding this comment.
I'd move these to the Gemfile, unless there is an advantage to keep them here?
There was a problem hiding this comment.
i don't think there's an advantage, but I'm not as familiar with the code base
| @@ -1 +1 @@ | |||
| 4.0.6 | |||
There was a problem hiding this comment.
Is this needed? If not could you remove this commit?
(maybe it was just to trigger CI again?)
There was a problem hiding this comment.
i wasn't sure whether to keep .ruby-version or not. i was confused, to be honest. i don't know what version I should pin it to, but I don't think I can say >4.
whatever you think is best
|
CI needs an approval from @nirvdrum to run |
|
@The-Alchemist Thanks for the PR. Modifying 126 files to support Ruby 4 seems wrong to me. Did you accidentally commit changes in this PR? If you have other changes you'd like to make, please pull those out into a separate PR so they can be evaluated separately. |
|
@nirvdrum you're right, my bad! i should have put that stuff on a separate branch. will update |
tsort is leaving the default gems in 4.1, rake 13.0.6 cannot load without ostruct on Ruby 4, and json 2.8+ changed empty-array pretty print. Drop EOL Rubies and freeze read-only constants for current RuboCop. Signed-off-by: The-Alchemist <kap4020@gmail.com>
33f9f59 to
ebad3be
Compare
Keep tsort as a runtime dependency so Ruby 4.1 installs still get it; rake, rspec, and rubocop-shopify are only needed in this repo. Signed-off-by: The-Alchemist <kap4020@gmail.com>
Summary of Changes
tsortas a runtime dependency (it leaves the default gems in Ruby 4.1) and bumpraketo~> 13.2so the default task can load withoutostructon Ruby 4.>= 3.3.0, retarget CI to 3.3/3.4/4.0, and update the JSON writer spec for json 2.8+ empty-array pretty-print. (Ruby 3.2 is EOL)Pass::SUBCLASSESmutable because subclasses still register into it.