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
Bootsnap breaks Zeitwerk on Ruby 2.5.x #244
Comments
This bug is fixed already in Ruby, it is just not released. They are planning a release next week. Related with rails/rails#35475. I think we can just wait the new Ruby release. It will happen before Rails 6 final is released. |
Oh great. Well closing this then. |
Ruby 2.5.5 still has this problem. |
Yeah we discovered this the hard way. The TracePoint patch was supposed to be part of 2.5.5, but the release was borked and that fix wasn't properly included... |
For the archives: after #257 the default setup has this cache disabled. The issue is probably worth being open still, however, because it affects people enabling the cache by hand. |
Seems like the fix was never properly backported to 2.5, however bootsnap no longer enable ISeq caching by default on 2.5.x, and I added a warning if users enable it manually: eab8d8d I think we can close this now. |
There's a bug on Ruby 2.5, when code is loaded a ISeq TracePoint callbacks are not fired:
This snippet prints nothing on MRI 2.5, but works as expected on 2.6.
The issue with this is that Zeitwerk, that's the default autoloader on Rails 6 rely on TracePoint to work properly. Since Rails also include bootsnap as default, 2.5 users trying to use Rails 6 might encounter very weird load issues.
I'm not quite sure what can be done, but It would probably be best to figure something out before Rails 6 is released.
@burke @fxn @rafaelfranca thoughts on this?
Rails load
bootsnap/setup
: https://github.com/Shopify/bootsnap/blob/master/lib/bootsnap/setup.rbI suppose we could check the Ruby version and set
compile_cache_iseq: false
for MRI 2.5 ?The perf hit is quite significant, but if it can save headaches for users, it might be best.
The text was updated successfully, but these errors were encountered: