-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Checker infinit looping when using patcher/value and operator overloading #637
Comments
@rrb3942 could you try to debug the problem? |
Even though the trace showed all the cpu in the checker it is actually a problem in the patching phase. Looks like there is some special logic around the operator overload patching that causes it to re-run all the patchers. Lines 202 to 222 in e6dfb71
So if the
Something I don't understand is why the operator patching continues to signal the ShouldRepeat(). My only guess is that Reordering the options so that the
Removing the check for |
@antonmedv I can try to write up a patch for this, just not sure on the approach to take. How do you feel about splitting any patcher that satisfies the |
I’m actually not understand this problem. Could you please explain what is happening? |
@antonmedv Please see pull request #658 which fixes part of the problem. The remaining issue is that an operator patcher applying causes all patchers to re-run, which makes the assumption that all patchers are idempotent. However in the case of this patcher it is not, as the node it patches is simply wrapped in a Please note that this is a change in behavior for patchers introduced with 3da8527 My thought is too run two passes over patchers. The first pass runs any non-repeatable patchers without looping (old patcher behavior). The second pass would run repeatable (aka operators) only, repeating as necessary. |
I'm adding support for "github.com/shopspring/decimal" to my project that makes use of "expr/patcher/value" and ran into an issue where cpu usage spikes to 100% and expr gets stuck compiling the expression when I try to introduce operator support.
trace.txt
From the trace it seems like it is getting stuck in the checker for some reason.
Here is an example program that can recreate the problem.
If there is any additional information that would help just let me know.
The text was updated successfully, but these errors were encountered: