I am not certain whether this is a Julia bug or something you need to fix here, but I think it's probably something you need to fix here. In any case I thought I should report it. I detected it in https://github.com/timholy/Revise.jl/issues/439 (CC @ablaom), as the error comes from inside this conditional block.
Here's the lowered code that gets created for one of your constructors (RandomForestRegression):
The linetable is particularly relevant. The first line is attributed to file :none and line 0. The rest get the line number correct but attribute it to logging.jl (one of Julia's base/ files).
Going off the names of the calls in @mlj_model (in particular from the fact that it looks like you're calling a function to build the constructor), I suspect this isn't a Julia bug but something you need to handle here. You might be able to use :push_loc and :pop_locmeta expressions. A possible demo PR is https://github.com/mauro3/SimpleTraits.jl/pull/6, although note that was for a rather old version of Julia.
I am not certain whether this is a Julia bug or something you need to fix here, but I think it's probably something you need to fix here. In any case I thought I should report it. I detected it in https://github.com/timholy/Revise.jl/issues/439 (CC @ablaom), as the error comes from inside this conditional block.
Here's the lowered code that gets created for one of your constructors (
RandomForestRegression
):The
linetable
is particularly relevant. The first line is attributed to file:none
and line 0. The rest get the line number correct but attribute it tologging.jl
(one of Julia'sbase/
files).Going off the names of the calls in
@mlj_model
(in particular from the fact that it looks like you're calling a function to build the constructor), I suspect this isn't a Julia bug but something you need to handle here. You might be able to use:push_loc
and:pop_loc
meta
expressions. A possible demo PR is https://github.com/mauro3/SimpleTraits.jl/pull/6, although note that was for a rather old version of Julia.