-
Notifications
You must be signed in to change notification settings - Fork 32
>= 0.4.20 broken on ruby 3.0 #471
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
Comments
from my research it seems that i think the ractor approach should be exclusive to the master branch, i.e., with required ruby >= 3.1. |
Thanks for diagnosing that. Your diagnosis ( But I wonder why this never failed in CI. It also passed for me locally... with 3.0.7. I suspect this was a bug in 3.0.2. Looking at the commits, I suspect it was fixed in 3.0.3 (2021-11-24) or maybe 3.0.4 (2022-04-12). Since versions 3.0.3 through 3.0.7 all contain security fixes, I strongly recommend upgrading to 3.0.7 ASAP. (Since ruby 3.0 and ruby 3.1 are both EOL, that should be upgraded too, but I know that upgrading to a new ruby release can be a bigger project.) On the one hand, I'm not inclined to workaround bugs in ruby which have been already fixed for over three years... especially for EOL ruby versions. On the other hand, I'd welcome a PR to remove the |
Tangentially, I didn't think
The stacktrace you posted comes from working on |
hi @nevans, i've run into the same issue with >= 0.4.20 of |
yes, the stack trace was from the net-imap source but the issue arose in a rails app that has eager_loading = true in ci and production. the code path you described above is correct, that's what lead me here. |
the railtie in actionmailer adds itself (ActionMailer module) to config.eager_load_namespaces over which the railties gem iterates and calls eager_load() on each (if app.config.eager_load = true). |
fwiw here's the stack trace from ci.
|
@mumkymikey Thanks for adding your report. What version of ruby are you running? 3.0.0-3.0.2? 3.0.3? 3.0.4? 3.0.5-3.0.7? |
This was just one piece of making config objects ractor sharableβit is insufficient by itself. And it caused problems with earlier versions of ruby 3.0. It should not have been committed to the v0.4-stable branch. Fixes: #471 Reported-by: @glaszig Reported-by: @mumkymikey
FYI: I just installed 3.0.3 locally, and (after upgrading rubygems so the tests could run) verified that v0.4.20 works fine with ruby 3.0.3. Important ruby 3.0.3 was released almost three and a half years ago. It (and every other 3.0.x release) contains security fixes and bug fixes. Even if you don't have the time to upgrade to 3.1+, please prioritize updating to the latest patch release of your ruby version! Patch releases are low risk: very unlikely to cause bugs and very likely to fix some. |
Okay... I've released v0.4.22 with the fix (#474)... Or at least, I assume that #474 fixes it. Because I can't reproduce this issue locally, even with ruby 3.0.2. I'm guessing that it may be architecture dependent. I'm using Linux, so maybe @glaszig, @mumkymikey, if you have the time, and to help out others who run into this, can you please:
If that v0.4.22 doesn't fix it, I'm going to need someone who can reproduce the issue to submit a PR. :) Thanks! |
@nevans the issue seems to be resolved with v0.4.22, thanks for the quick help here!! |
@mumkymikey great! If you have a moment, can you confirm your |
sure! $ ruby -e 'puts RUBY_VERSION'
3.0.0
$ gem env platform
ruby:x86_64-darwin-22 |
0.4.22 works for me. passes ci where 0.4.21 failed. thank you. can also confirm that on ruby 3.0.3 the issue is not present with v0.4.21 as follows.
|
eager loading fails with the following:
i nailed this down to the use of
Ractor.make_shareable
. it works when i remove that code path (config/attr_type_coercion.rb:31-33).The text was updated successfully, but these errors were encountered: