Open colemanbroad opened 5 months ago
Yeah, Revise deliberately discards whitespace-only differences within function bodies. Are you saying this upsets error reports in line numbers?
Yep, the line numbers aren't updated when whitespace is added.
It works (or should) for whitespace added outside method bodies. The reason for the difference is that Revise can do external whitespace (e.g., adding a comment at the top of a file) "non-destructively," meaning it doesn't have to redefine any methods and thus does not trigger any invalidations. In contrast, the only way to update line numbering inside a method is to redefine the method. If that method is, e.g., Base.get(::Dict, ::Any, ::Any)
, you might be in for 60s or so of recompilation due to triggering a huge number of invalidations. Thus I've felt that the current system is the lesser of two evils.
I open a REPL and use
includet()
on the following...Tested in julia 1.9, 1.10, 1.11alpha