-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add workaround for truffleruby 24.1.0 and add truffleruby in CI #303
Conversation
* The fact it's a Symbol is key, otherwise `cname.name` would be NoMethodError.
* See oracle/truffleruby#3683 * Without this the test suite has 6 failures, 26 errors.
d1c9552
to
25838ef
Compare
25838ef
to
b6de3f0
Compare
I explained the root cause in oracle/truffleruby#3683: class Module
def const_added(cname)
puts const_get(cname).name
end
end
module M
end which prints "Object::M" instead of "M". As you know, this is not what it is supposed to print, because from the user point of view, That root cause manifests in the callback If the only |
OK, I'll try to move the workaround to |
I tried with eregon@b59c019 but that's not enough https://github.com/eregon/zeitwerk/actions/runs/11305154330/job/31444355057
It's called quite deep and using the workaround in multiple places starts to feel brittle. So I think doing the check for all |
For completeness, eregon@36c800f passes the test suite but I'm not confident it's using the workaround in all the needed places, there are many other calls to It's great Zeitwerk has this |
Cool, that is what I had in mind in that comment in the original thread, I cannot know which is the exact compatibility difference in TruffleRuby. I spotted one case. I'm out now on my phone, will look at the details later. Thanks for looking into it @eregon! |
@eregon could you confirm these working hypothesis I have about the bug? (this is the hard part from my side, understanding the blast radius):
|
Nah, this is more complicated: class Module
def const_added(cname)
p const_get(cname).name
end
end
H = Class.new This prints And this is only what I can find by trial and error. For me, the bottom line is that the internal state in TruffleRuby is not correct in the current stable release, and I don't want to assume all possible side-effects can be anticipated and corrected with a workaround. I would have considered a trivial one, but it starts to feel brittle and out of the scope of this gem. So, my resolution is the following:
|
I have updated the README to document this (1ea9729). |
It turns out after the workaround for oracle/truffleruby#3683 there were only 2 failures in the test suite.
One is well known: oracle/truffleruby#2431.
The other I didn't find out why after a quick look. Given it's the only failure left it seems best to skip it for now and still add truffleruby in CI to notice any potential issue.
It would be good to investigate that failure but I don't have time for that now.
I did some quick checks and
const_added
is called correctly for things likeHotel = Class.new
so that doesn't seem the problem.