JuliaDebug / JuliaInterpreter.jl

Interpreter for Julia code
Other
162 stars 34 forks source link

Don't error if we don't have line information #634

Closed Keno closed 2 months ago

Keno commented 3 months ago

whereis is already allowed to return nothing. It's possible for codeloc to be != 0, but for Core.Compiler to still be unable to produce a location. In that case, also return nothing.

timholy commented 2 months ago

I've finished off the nothing case (I think), please review.

Also, it sure would be nice to have a test! I know they can be hard to capture, but there's a real sense in which JuliaInterpreter/Revise/etc work only because of their test suites. If we don't keep capturing that we become vulnerable to regressions.

We also shouldn't be too optimistic that Revise will "work" once this is merged and a new LoweredCodeUtils is released; JuliaInterpreter tests still fail, and thus it's very likely that Revise will fail on certain files as a consequence. The difference in stepping on Julia 1.12 (#636) could absolutely break Revise.

timholy commented 2 months ago

Thanks for the fix!