-
Notifications
You must be signed in to change notification settings - Fork 7
-
Notifications
You must be signed in to change notification settings - Fork 7
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
monitor methods convert die into crazy #8
Comments
OK, it may have nothing to do with OO::Monitors per se, just something OO::Monitors happens to do that triggers a different bug. Attacking the golfing problem from another angle, I reached this arrangement:
This turns out to be remarkably finicky about the contents of C.pm6. For example, instead of storing the pointy in a hash entry, let's just bind it to a scalar:
OK, instead of binding, we'll assign:
OK, let's supply sane arguments:
Well, that works! But wait, what about if I use a hash again, just with proper arguments this time?
Boom! What if I get rid of INIT?
And now it works again. WAT. |
Is this a slight variation on https://rt.perl.org/Ticket/Display.html?id=127858 which seems to be that some Code objects don't survive pre-compilation? |
Yeah, I was thinking something similar and then saw your comment, jonathanstowe. Just to confirm, I went back to the second-to-last version above, the one with INIT that fails, and just add
Sure enough, it works. So there are at least two bugs here: A confirmation of RT #127858 with a few more variants, and that the workaround that OO::Monitors uses doesn't quite work (see the original issue description). |
@japhb So I'm a tad confused. I turned the original issue reported here into what I'm pretty sure is a representative pre-comp test case. The test failed. Then I pulled in the changes from my proposed maybe-fix-exception-stuff branch. That made the test pass. So, that's in the commit I linked. However, I thought you'd mentioned that the branch did not help? So, I tried your original example:
This case seems fixed also (so the test was covering the right thing). Yes, there is a Rakudo bug that also wants looking at, but in all those cases OO::Monitors has been golfed out of the issue. |
For some reason, ad hoc (die "...") exceptions get swallowed and replaced with a 'Cannot invoke this object (REPR: Null; VMNull)' error; here's a golf:
Given that the current version of OO::Monitors specifically claims to work around "Cannot invoke this object" errors, something is fishy.
The text was updated successfully, but these errors were encountered: