These are chat archives for HotswapProjects/user

21st
Nov 2018
Vladislav Tankov
@TanVD
Nov 21 2018 10:17
Well, right now we have disabled AnonymousClassPath plugin due to HotswapProjects/HotswapAgent#263 . As far as I understood -- you've found the bug and it is possible that solution will be included in next releases?
Vladimir Dvorak
@skybber
Nov 21 2018 11:24
It is hard to fix it in HotswapAgent, since it should be race condition between HotsawpAgent and IDE synchronization, may be we can increase delay in some way.... But yanonymous class plugin is not necessary if you don't create/remove anonymous classes in hosting class.
Vladislav Tankov
@TanVD
Nov 21 2018 18:02
Well, for the Kotlin as far as I understand it is more than likely. There are a lot of anonymous classes supporting, for example, creation of lambdas (which are everywhere)
But I am not sure that problem is in syncronization in my case. I was sending Reload changed classes signal from IDEA after build is definitely done.
Vladimir Dvorak
@skybber
Nov 21 2018 19:24
Modified classes must be saved on classpath before IDEA sends a new bytecode via JVMTI to hotspot (JVM). Redefinition is initialized from JVMTI call (if you do not use extraclasspath), and consequently it calls HotswapAgent intrumentation before classes are actually modified in JVM . I've seen problem when the JVMTI was called before IDE finished saving of classes to classpath - then HotswapAgent does not see new classes on classpath. May be you can try add some sleep (1s) to AnonymousClassPatchPlugin code to check it
Otherwise we need some good testing example to fix the problem, since Kotlin will be priority for us in next few months.