-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the documentation relating to using the tracing agent to generate reflection config from the unit tests #299
Comments
@sdeleuze, is this similar to an issue you once raised? |
Yes I think. There is a pretty complete documentation on https://github.com/oracle/graalvm-reachability-metadata/blob/master/docs/CollectingMetadata.md but it is on reachability metadata side and it is currently Gradle only. @gradinac Maybe we could document this properly on NBT Gradle and Maven documentation and just point reachability metadata to the related sections of NBT documentation. |
Potentially depends on #260. |
|
|
Potentially yes. @dnestoro Could you please check and close this issue if confirmed? |
I think the documentation for the maven tool needs to be expanded. It's not super clear what the process should be using the tracing agent when you have tests and when you build a native binary. Consider the following (assumes some project using maven that has tests, uses reflection etc and has a profile for the native build tools):
// Builds the tests natively and runs them - picks up the reflection config from target (-H:ConfigurationFileDirectories)
// Note that the native unit testing explicitly passes in the location of the tracing agent config, see above
mvn -Pnative -Dagent=true test
// Builds the native binary, BUT it doesn’t reference the reflection config. The binary fails at runtime
mvn -Pnative -Dagent=true package
What one needs to do is to copy over the reflection config generated by the tracing agent when running the tests. Without this, this leads to the binary failing at runtime.
Think we should have an example of working through this. Can fully understand that we don't necessarily want to copy over the tracing config, but the fact that the tests work with no change but the binary fails is confusing for the the end user.
Thanks!
The text was updated successfully, but these errors were encountered: