docker-library / ruby

Docker Official Image packaging for Ruby
http://www.ruby-lang.org/
BSD 2-Clause "Simplified" License
590 stars 334 forks source link

Add Debian sid to support YJIT on Ruby 3.2 #398

Closed Willianvdv closed 1 year ago

Willianvdv commented 1 year ago

Inspired by #390 I wanted to take a stab at trying to add YJIT to Debian-based images. The sid upgrade was required to get a version of rustc newer than 1.58.1.

I've validated the YJIT working by building and running the sid Ruby build and executing:

root@f95b728b4716:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
...
root@f95b728b4716:/# RUBY_YJIT_ENABLE=1 irb
irb(main):001:0> RubyVM::YJIT.enabled?
=> true
tianon commented 1 year ago

Nice, it's neat that you got this working! Unfortunately, however, we're not comfortable officially basing images on Debian's Unstable (Sid) repository as it changes often, and many times in ways that break our builds (which makes sense, given it is the "development" repository within Debian).

Once Debian Bookworm is officially released (likely sometime next year), we will add new variants based on it, and then we can revisit this.

Willianvdv commented 1 year ago

@tianon that makes sense! For now, I'll use the generated Dockerfile locally (which I forgot to add to this PR 😅). Thanks for your prompt reply!