ruby-i18n/i18n

[BUG] Latest Release Required Cmake (building native extensions)

Closed this issue · 6 comments

What I tried to do

  • We install i18n as a dependency of the activesupport gem, which is a dependency of various google cloud gems.
  • When installing v1.14.1, the gem installs fine without requiring cmake to build the native extension
  • After the release of v1.14.3, installation of i18n requires cmake to compile the gem on installation

What I expected to happen

  • As a patch release, I would expect this v1.14.3 to not require compilation upon installation, just as the prior release
  • Following semver, deprecating versions of Ruby would not simply be a patch release, but a major release (only supporting Ruby 3.0)

What actually happened

  • The only successful way to install v1.14.3 was to first install cmake
  • We had to pin our version of i18n to v1.14.1
  • The diff between 1.14.1 and 1.14.3 shows the addition of the racc dependency, the README now states that only Ruby 3.0 is supported, but neither are included in the release notes.
  • v1.14.1...v1.14.3#diff-08b59e99a05f45f9b13adfae273a8dcf0488f0c9a4a4e5fd6c33fb57751c6c4eR27
  • Specifically, the i18n.gemspec never updated the minimum version of Ruby, which would allow 2.x clients to request to install the new version, and fail.

Versions of i18n, rails, and anything else you think is necessary

  • i18n: v1.14.1 and v1.14.3
  • Ruby: 2.7.0 (as part of Puppet version 7.14.0)

root@ubuntu-focal:~# ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
root@ubuntu-focal:~# gem
gem     gem2.7
root@ubuntu-focal:~# dpkg -l | grep cmake
root@ubuntu-focal:~#
root@ubuntu-focal:~# gem install -v "1.14.3" --no-document i18n
Building native extensions. This could take a while...
ERROR:  Error installing i18n:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/racc-1.7.3/ext/racc/cparse
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20240306-2749-w64a6m.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/racc-1.7.3 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/racc-1.7.3/gem_make.out

Thanks! ❤️

I've opened a small PR to drop support for Ruby 2.x: #686

I would suggest withdrawing v1.14.3, then merge in my PR, and publish a new version (2.x)

Thanks for taking the time to write all that up.

I had planned on handling the Ruby bump in some separate work, but then real life took over. That would indeed be a major version bump change.

I hadn't remembered that racc required CMake extensions to run, and agree this shouldn't have been in the point release.

Historically, people get grumpy when I yank versions, typically because their Gemfile.lock says one thing, but RubyGems.org says another. I know I get grumpy when it happens to me, too.

So I think the way to make people happy here is to undo the racc dependency in 1.14.x. This would then allow most people to gem install i18n '~> 1.1' and it to succeed still.

Then, we can re-apply that in a v2, and fix the Ruby version to boot.

@radar Do you have a rough ETA on when you expect this fix to be pushed out?

@dsgithub81 Today, Australian Eastern Time. The day has just begun.

Please try out v1.14.4 and let me know how you go.

Thank you, it is working now!

Another question, are you planning to release the v2 soon? Curious how long I will have before the gem install i18n '~> 1.1' is a must have

@radar