While debugging I try to hot swap a groovy class.
It always fails with messages "Schema change not implemented. Operation not supported by VM".
With Java classes there is no such problem - hot swap works as long as I don't add/remove any field or method or change a method signature.
I had hoped to gradually convert my Java app to groovy, but this made me refrain from using groovy for anything more complex than "java" beans.
Looking at the bytecode with javap, it is obvious where the problem is:
There is an artifical field that changes its name on each compilation.
public static java.lang.Long _timeStamp_239_neverHappen1268432715287;
public static java.lang.Long _timeStamp_239_neverHappen1268433121889;
What is this field used for? Can't we get rid of it?
All other fields/methods look the same after recompilation, so I am pretty sure that hot swap will work without this field change.