timholy / Revise.jl

Automatically update function definitions in a running Julia session
https://timholy.github.io/Revise.jl/stable
Other
1.19k stars 109 forks source link

Failed to track in-struct anonymous function #716

Open Rratic opened 1 year ago

Rratic commented 1 year ago

I want to fix a package, and there's a piece of code like this:

# Rule is a struct with field fn::Function
inline_rule(rule::TableRule) = Rule(0, "|") do parser, block
    println("flag")
    ...
end

I changed the println content, but Revise.jl doesn't seem to work. (it works pretty well for other changes, I tried retry but still got no result) Other features show that Revise.jl probably just thought inline_rule as static.

timholy commented 8 months ago

Thanks. This snippet probably isn't enough to develop a test case. If this issue hasn't been fixed on recent versions of Revise, I'd appreciate a runnable, self-contained demo.