Remote process interpretation?
The flow of bug reports for Revise 2.x may finally be slowing. I've started going through older issues, and one that seems potentially fixable now is https://github.com/timholy/Revise.jl/issues/147, which relates to synchronizing anonymous functions across remote workers. Formerly it wasn't really fixable, but thanks to the rewrite around lowered code I think it's in reach now. I'm contemplating my best strategy for fixing it and the potential implications for this package.
My "default" fix this goes like this: LoweredCodeUtils has functionality to identify and "redefine" anonymous functions. I can change it so that it flags the relevant part of the CodeInfo to also be re-executed by Revise on each worker. Not completely trivial to implement, but not bad either.
However, there's potentially an alternate approach: have the interpreter execute the instructions in define_anonymous (and the succeeding :method definition statement) not just on process 1 but also on a list of workers. That would imply modifying JuliaInterpreter to be able to evaluate code on a remote worker. This is a more difficult path, but perhaps one with more far-reaching implications.
Is remote-process stepwise evaluation this something we're going to want? I worry it could be insanely slow, so it's not obvious to me that it makes sense, OTOH remote-process debugging seems heavily used in some situations (I never have myself, but...)
Thoughts?