-
Notifications
You must be signed in to change notification settings - Fork 189
Support Ruby 3.0 #524
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
Support Ruby 3.0 #524
Conversation
When running `bundle install`, it tried to install the latest minitest version, as it was defined again in the Gemfile. This caused issues with Ruby 2.5, as support for it was dropped in v5.16.0. Removing this extra code makes bundler correctly install 5.14.0 as defined in the gemspec.
This is the last release that supports Ruby 2.5.
1.1.1d threw error messages, but compiling against 1.1.1s seems to work.
@andyundso this looks really nice! @aharpervc will probably be the one to review it. |
|
||
RakeCompilerDock.sh build.join(' && ') | ||
GEM_PLATFORM_HOSTS.keys.each do |plat| | ||
RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION='2.7.0:2.6.0:2.5.0:2.4.0' CFLAGS='-Wall' MAKE='make -j`nproc`' rake native:#{plat} gem", platform: plat |
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.
- This command switched from
rake cross native gem
torake native:{plat}
. Why does this need to change? - I see we have Ruby 2.4 on the cross compile list. Given the other commit about bundler (etc), and that Ruby 2.4 is well out of support, what do you think about dropping it? That'd mean that our current release is the last one tested on 2.4. We have the same questions about 2.5 and 2.6, although those ought to continue to work for the time being, so I don't think we also need to drop those right now.
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1d' | ||
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1s' |
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.
I assume this is fine. Are the 1.1.1 release variants cross compatible with each other? Is there any downside to moving as far forward as the latest l
(L) release?
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.
FYI, l
doesn't refer to latest, they're just going through the alphabet on releases for 1.1.1
, and s
is the most recent at the moment
RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION='2.7.0:2.6.0:2.5.0:2.4.0' CFLAGS='-Wall' MAKE='make -j`nproc`' rake native:#{plat} gem", platform: plat | ||
RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION=#{RUBY_CC_VERSION} CFLAGS='-Wall' MAKE='make -j`nproc`' rake native:#{plat} gem", platform: plat |
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.
Would you mind moving this to a separate commit, such that adding 3.0 to the list only adds 3.0 and no other code changes (adding to the changelog can also be in this commit)?
My thinking here is to help others understand what the commit should look like going forward for other versions.
build = ['bundle'] | ||
sh "bundle package --all" # Avoid repeated downloads of gems by using gem files from the host. |
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.
Should the similar lines in ports.rake (etc) also be changed?
This is cool... very exciting. Are you able to also do any of the suggestions here? At least having build artifacts for this would be great to get more people for testing. |
Would be great to get this as I assume many (as us) are planning moving to v3 soon. |
Please add also 3.1 and 3.2. |
As long as things are still moving here, I created a fork with support for Ruby 3.0, 3.1 and 3.2, including a fat gem for Windows. |
Thank you! |
Replaced with #530. |
This PR adds support for Ruby 3.0. It needed a couple of changes, including a few that are technically for Ruby 2.5 support.
bundle exec rake gem:windows
, but this failed with a Rake error that it is unable to find this task. I updated the Rake task in this project to match the example from therake-compiler-dock
docs, which made the build start.I tested the changes against a project of mine. It's a "traditional" Rails v6.1 application using 6.1.2.1. I ran our CI with a version of the gem build based on my changes and everything is green with the following combinations:
Credits to @bryanwieg for the initial work in #521.