MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
966 stars 133 forks source link

* transforms unknown dynamic invoke into NoSuchMethodError #764

Closed dkimitsa closed 9 months ago

dkimitsa commented 11 months ago

currently only StringConcat and Lambda bootstraps are recognized and cause DynamicInvoke to be transformed/dessugared.

in other cases DynamicInvoke instruction will stay in place and will cause compilation type exception:

Java.lang.ClassCastException: soot.jimple.internal.JDynamicInvokeExpr cannot be cast to soot.jimple.InstanceInvokeExpr

Issue was risen in gitter channel in scope Scala/desirialize labda being inserted in all classes. All these classes were failed to compile. Even if this functionality is not used (https://github.com/scala/scala/pull/4501).

As a workaround changed how InvokeDynamic is being handled:

ccellado commented 9 months ago

That's great, will it be included in next release?

dkimitsa commented 9 months ago

@ccellado hello, probably it will not go into 2.3.21 release. but in next release snapshot as there was no feedback on this feature. meanwhile you can try it by building RoboVM locally

ccellado commented 9 months ago

@dkimitsa what feedback would you require to speed up the release?

Tom-Ski commented 9 months ago

2.3.21 has been released. If release is ok this will be merged and testable on snapshot. From there scheduled into next release

dkimitsa commented 9 months ago

@ccellado you can build it locally from branch and test on local build.