Ruby: Support Herb in Ractors - #2261
Conversation
Mark the native extension as Ractor-safe and cover concurrent use of its public entry points. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3961363f-e675-400a-949d-d7fc8366193b
marcoroth
left a comment
There was a problem hiding this comment.
Hey @joelhawksley, I'm not sure if we can just set rb_ext_ractor_safe(true) without changing anything about the code.
Ractor-safety wasn't in the scope of my thinking when I designed the parser and the Ruby C-Extension. So I'm not certain that it's just compatible as-is.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@marcoroth I'll move this back to draft and investigate further. I was poking around at various ways of speeding up our usage of ActionView::Precompiler with Herb 鉂わ笍. For what it's worth, I was able to use Herb in Ractors successfully. |
|
Thanks @joelhawksley, that's valuable feedback and makes this decision a bit easier down the road! I know that @geeksilva97 mentioned to me at RubyConf a few weeks ago that he found some issues with Ractors and Herb. Edy, would you mind elaborating what you found? Thank you! |
Summary
Testing
bundle exec ruby -Itest test/herb_test.rbon Ruby 3.3.12bundle exec ruby -Itest test/herb_test.rbon Ruby 4.0.6bundle exec rake teston Ruby 4.0.6bundle exec rubocop test/herb_test.rb --format quiet