JuliaLang / AllocCheck.jl

AllocCheck
Other
209 stars 8 forks source link

Find a way to get source excerpts for REPL code? #37

Open topolarity opened 8 months ago

topolarity commented 8 months ago
julia> @check_allocs foo() = rand(Any[1,1.0]) + true
julia> try foo() catch e e.errors[end] end
Dynamic dispatch in ./REPL[2]:1
  | (source not available)
Stacktrace:
 [1] var"##foo#225"()
   @ Main ./REPL[2]:1

For dynamic dispatches especially, this source information is pretty important.

fredrikekre commented 8 months ago

I believe CodeTracking.jl already support this with @code_expr and @code_string.