Scala graalvm-native-image Projects
Plugin to generate native-image binaries with sbtProject mention: GraalVM native-image with Scala 3 reflection hell | reddit.com/r/scala | 2022-01-09
The reason seems to be Scala 3's new encoding for lazy vals, where a reflective access to a variable called bitmap takes place. To demonstrate this, I took the http4s g8 template, set it up with Scala 3.1.0, added sbt native-image, started the nativeImageRunAgent and ran a single request against GET /joke. After stopping the server, the native-image run agent generated the reflective configs that are required for this path of execution. Comparing the generated Scala 2.13 with the Scala 3 configs, yields a bloated version for Scala 3 that contains these additional rules:
Scala graalvm-native-image related posts
Native Image Compilation for A Purely Functional Example Application
2 projects | reddit.com/r/scala | 15 Aug 2021
Are you hiring? Post a new remote job listing for free.