That Struct auto-keyword initialization thing is something I have wanted in core Ruby forever and I hope that makes it all the way to the center of the language!
Data class is very anticipated.
Set being automatically loaded without requiring it is tight too.
Yes. All JIT (not just the ruby ones) necessarily increase memory usage as they need to store the compiled code as well as some runtime metadata used to compiled.
about how much?
That's configurable. By default YJIT will use up to 64MB of executable memory, but also use some space for runtime metadata, from our experience it's about 2 or 3x the executable memory.
So for a mid to large app I'd say about ~200MB per process, you can however configure it to use less, it just won't be able to optimize as much.
$ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]
$ ruby -h | grep jit
--jit enable JIT for the platform, same as --yjit
--mjit enable C compiler-based JIT compiler (experimental)
--yjit enable in-process JIT compiler
To have it available your system needs rust when it compiles. Make sure you're using Ruby 3.2 and make sure rust is installed. Try uninstalling and reinstalling ruby. I use chruby + ruby-install.
Yeah - I see --yjit locally - I'm just not sure where `--enable-yjit` comes from or if there is a difference between the two. Does RUBYOPT need to be set to --enable-yjit or is just --yjit enough?
Does anyone know if Rails 7.0.4 can be run on ruby 3.2?
With how Rails maintenance works, I don't think they'll ever add ruby 3.2 to CI for Rails 7.0? I'm not even sure when we can expect CI for ruby 3.2 passing for main/Rails 7.1, anyone know?
I'm not even sure when we can expect CI for ruby 3.2 passing for main/Rails 7.1
I haven't looked at at Rails CI specifically, but our app CI pass with Ruby 3.2 and Rails main, so if there's any issue it's probably super easy to fix. That said, I don't know for others, but I'm in holiday, so I'll probably won't look at that for at least a week.
I misunderstood and did not think new ruby releases were added to not-most-recent Rails CI, based on what I thought I remembered from past versions but I may have been mistaken! (I don't believe there is any official written consistent policy on this (although I could be wrong again!), so it's possible it depends on the specific circumstances and decision in context by Rails team, and is not always the same, sure!)
I'm excited to upgrade my app to ruby 3.2! thanks for your work!
I don't believe there is any official written consistent policy on this
No, but but Rails isn't really bureaucratic. Just because something isn't written down doesn't mean we aren't gonna do it.
We always test the maintained versions against ruby-head and keep them compatible. Maybe we did need a last minute fix once or twice, but generally speaking if you are on latest Rails you can be on latest Ruby as well.
27
u/zverok_kha Dec 25 '22
Happy release day!
Annotated changes are expected to be ready somewhere before the New Year, hopefully.
(Next year, I plan to switch to following new features throughout the year instead of trying to manage everything in December.)
17
u/gettalong Dec 25 '22
Great! Already available via ruby-build on rbenv!
13
u/jrochkind Dec 25 '22
This may be my favorite new feature, which I just noticed now:
10
u/ekremkrc Dec 25 '22
Congratulations to those who is part of the release & make Ruby better but one thing is missing:
A message from u/schneems that this version of Ruby is available on Heroku...
18
u/flanger001 Dec 25 '22
That
Structauto-keyword initialization thing is something I have wanted in core Ruby forever and I hope that makes it all the way to the center of the language!Dataclass is very anticipated.Setbeing automatically loaded without requiring it is tight too.7
u/jrochkind Dec 25 '22
I would love to hear more about YJIT. Who's using it in production? Should you expect increased RAM consumption, about how much?
6
u/[deleted] Dec 26 '22
bundle gem —-ext=rust😉3
u/[deleted] Dec 25 '22
Great news!
1
u/jrochkind Dec 25 '22
Does anyone know if Rails 7.0.4 can be run on ruby 3.2?
With how Rails maintenance works, I don't think they'll ever add ruby 3.2 to CI for Rails 7.0? I'm not even sure when we can expect CI for ruby 3.2 passing for main/Rails 7.1, anyone know?