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
Update dependencies for RUBY_VERSION 3.1.0dev #41902
Conversation
nokogiri (1.11.1-x86-mingw32) | ||
racc (~> 1.4) | ||
nokogiri (1.11.1-x86_64-darwin) | ||
racc (~> 1.4) |
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'm not sure why these other architectures were removed 🤔
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 think this is expected behavior since nokogiri gem is now precompiled native gem since 1.11.0. Refer sparklemotion/nokogiri#2075 and sparklemotion/nokogiri#2185 From Rails side, what we can do now is waiting for a new version of nokogiri gem after Ruby 3.1.0 is released.
Also, Rails CI actually removes Gemfile.lock
then bundle install
.
&& rm Gemfile.lock && bundle install -j 8 && cp Gemfile.lock tmp/Gemfile.lock.updated \
So, unless we need to bump gem version at Gemfile
itself, we do not need to update Gemfile.lock
to support Ruby 3.1.0-dev.
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.
@yahonda Hello!
this is expected behavior since nokogiri gem is now precompiled native gem since 1.11.0. Refer sparklemotion/nokogiri#2075 and sparklemotion/nokogiri#2185
I understand that the behavior of nokogiri is to install the precompiled gem for my architecture, but I'm wondering why just bumping from 1.11.1
to 1.11.3
would remove the other architectures from the lock file. Maybe its my version of bundler from ruby HEAD?
It also seems that only this version on x86_64-darwin
is affected.
Would it be a big deal to just merge these versions which are working locally? I assume they don't break for existing Ruby versions, but the alternative is having to maintain a dirty Gemfile.lock
in my local checkout in order to hack on Rails 🤔
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 think this is a Bundler issue: rubygems/rubygems#4516
👋 Nokogiri maintainer here. I believe these precompiled versions were removed from the lock file not because you bumped from 1.11.1 to 1.11.3, but because you did the bumping on Ruby 3.1.0dev for which there aren't any precompiled native gems available. The behavior of modern bundler on Ruby 3.1.0dev will be to use Nokogiri's vanilla I'm not comfortable shipping a precompiled version of Nokogiri that attempts to be compatible with 3.1.0dev, because the Ruby ABI may still change before official 3.1 prereleases, which would cause a gem version I ship today to segfault or otherwise be buggy for future versions of Ruby 3.1. If someone thinks this would be OK to do, I'd love to talk and understand how to safely do this. If you choose to bump the Nokogiri dependency to cover Ruby 3.1.0dev, please understand that you'll be taking a step backwards to compiling the vanilla |
These versions are required to work on Rails with Ruby 3.1.dev, without having to maintain a dirty Gemfile.lock The update was done by using a version of Ruby (2.7.2) and bundler (2.1.4) that would avoid making any big changes to the lock file, as discovered here: rails#41902 (comment)
e1050d9
to
095f5c9
Compare
@flavorjones Hello Mike! Thanks for taking your time to look into this for me. After re-reading your message and trying this myself ( 095f5c9 ), I realized what you mean. We can't have our cake (using Ruby 3.1.dev) without changing Gemfile.lock, TIL. FWIW: I think this file is there to aid developers working on Rails and probably few of them are using Ruby's master and not some already-released version. So I think it's fine to keep "stable" dependencies in here, and not force packages to adopt unreleased versions of Ruby downstream. It's much easier for me to change a lockfile, than it is to patch a gem. |
bundle update nokogiri curses blade
after editingGemfile.lock
by handnokogiri in particular had a weird version requirement which specified "< 3.1.DEV" for RUBY_VERSION
blade and ncurses weren't compiling with new version of Ruby, so this fixes it.
I also didn't bother updating "BUNDLED WITH".