scalameta / sbt-native-image

Plugin to generate native-image binaries with sbt
252 stars 22 forks source link

Is there a way to use native image agent while running test? #58

Open bilal-fazlani opened 2 years ago

bilal-fazlani commented 2 years ago

I have developed a fairly large cli application using scala and am using sbt-native-image plugin to create its native image. Ability to use sbt command "nativeImageAgentRun" is very helpful as it create the reflect-config.json automatically.

The issue is my application has many many logical branches. I supposed every cli application does have many code branches. To ensure I am creating correct reflect-config.json, I have run the CLI application many times with possibility. And it can be very hard depending on the size of application.

I have written tests for those scenarios. I would be very nice if there can be a way to execute the tests and use agent to derive the reflect-config.json via tests. That way I don't have to remember every code branch and manually test it every time.