AnonymousClassPatchPlugin For Kotlin #547
Replies: 4 comments
-
Hi, thanks for report. This problem is new for me and it has not been resolved in HotswapAgent yet, it would be great if you could share your soulution! |
Beta Was this translation helpful? Give feedback.
-
Thanks. If I can get something working, I will certainly try and contribute it to this project. |
Beta Was this translation helpful? Give feedback.
-
That feels similar to what I found there #420 (comment), it's about Are you using the latest JBR and latest HA build. |
Beta Was this translation helpful? Give feedback.
-
I was using the latest JBR and HA builds. I actually ended up migrating all my Kotlin code to Java for other reasons, so I haven't spent much time investigating this. |
Beta Was this translation helpful? Give feedback.
-
I'm currently trying to use HotswapAgent for a kotlin project running on the JVM and while it works great for the most part, rearranging lambdas/anonymous classes in a file almost always causes class hierarchy errors. For normal Java hot swapping, I think this issue is handled by the
AnonymousClassPatchPlugin
. From looking at it's code, it relies on the assumption that anonymous classes will always have a name of the form<class name>$<number>
, but this is not true in kotlin (which uses the format<class name>$<method name>($<number>)+
. For my own purposes, I am planning to make a modified version of the plugin that will work for kotlin, but before I do, I wanted to ask here if this is an issue that has already been solved.Beta Was this translation helpful? Give feedback.
All reactions