sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 438 forks source link

Support for running GrallVM native agent #1606

Open exoego opened 2 months ago

exoego commented 2 months ago

Background

Since 2019, GraalVM offers Java agent to collect native image configuration from running JVM app. GraalVM's official Gradle plugin offers support for the agent. It's user can collect configuration by gradlew test metadataCopy which dramatically help native image build workflow.

I am not sure such feature is covered in the scope of sbt-native-packager, but it is highly helpful. There is a feature request in other sbt plugin https://github.com/scalameta/sbt-native-image/issues/58, but it seems that the plugin is not so actively maintained.

Expected behaviour

sbt test runs tests with GraalVM native agent so metadata for native image build are collected automatically.

Actual behaviour

Such feature is not implemented.

Information