JunoLab / Traceur.jl

Other
319 stars 15 forks source link

@trace not updating with method redefinition #14

Open MasonProtter opened 6 years ago

MasonProtter commented 6 years ago

If one defines a method, uses @trace on that method and then redefines the method and runs @trace on it again, it will give the output from the old method definition, not the new one. This seems to be a pretty major bug.

julia> using Traceur

julia> foo() = -10.0:10.0
foo (generic function with 1 method)

julia> foo()
-10.0:1.0:10.0

julia> @trace foo()
-10.0:1.0:10.0

julia> foo() = -10:10
foo (generic function with 1 method)

julia> foo()
-10:10

julia> @trace foo()
-10.0:1.0:10.0
pfitzseb commented 6 years ago

I suspect that happens because of https://github.com/jrevels/Cassette.jl/issues/6, but it's definitely rather unfortunate.

MikeInnes commented 6 years ago

If ASTInterpreter and Vinyl can be upgraded to 1.0, it'd be better to switch back to them to avoid this. Cassette makes sense right now just because it works, but we don't really need this to be compiled.