-
Notifications
You must be signed in to change notification settings - Fork 9
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
Infinite recursion on unique(::Vector{Symbol})
within Reactant
#493
Comments
This comment has been minimized.
This comment has been minimized.
okay, if i replace the code to this: x = [:a, :b, :c]
Reactant.compile(()) do
unique(x)
end then the generate IR is smaller and the error is still reproducible: line 1args (var\"#15#16\",) line 2src CodeInfo(
@ REPL[26]:2 within `#15`
1 ─ %1 = Main.x::Any
│ %2 = (Reactant.call_with_reactant)(Main.unique, %1)::Any
└── return %2
) line 3code_info CodeInfo(
@ REPL[26]:2 within `#15`
1 ─ %1 = Core.getfield(##redub_arguments#232, 1)
│ (Reactant.safe_print)("fn arg[1]", %1)
│ %3 = (Reactant.make_oc_ref)(Base.RefValue{Core.OpaqueClosure}(#undef), Tuple{}, Any, CodeInfo(
@ REPL[26]:2 within `#15`
1 ─ %1 = Main.x::Any
│ %2 = (Reactant.call_with_reactant)(Main.unique, %1)::Any
└── return %2
), 0, false, %1)
│ %4 = (%3)()
│ (Reactant.safe_print)("ocres", %4)
└── return %4
) line 4fn arg[1] #15 |
Lines 444 to 450 in 47f363b
here says that calls to type unstable code are replaced with @wsmoses could it be that it's rewriting a call that it shouldn't? my bet is that...
and that |
i finally fixed it by using doing sth similar to @avik-pal in other Base methods: create a method with the same signature in Reactant's method table with |
Reproducer
Error
Log from debug interpreter
The text was updated successfully, but these errors were encountered: