Skip to content
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

Open
krisfoster opened this issue Sep 14, 2022 · 6 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@krisfoster
Copy link

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!

@krisfoster krisfoster added the bug Something isn't working label Sep 14, 2022
@lazar-mitrovic lazar-mitrovic added the documentation Improvements or additions to documentation label Sep 19, 2022
@sbrannen
Copy link
Collaborator

@sdeleuze, is this similar to an issue you once raised?

@sdeleuze sdeleuze added this to the 0.9.15 milestone Sep 23, 2022
@sdeleuze
Copy link
Collaborator

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.

@sdeleuze
Copy link
Collaborator

sdeleuze commented Sep 23, 2022

Potentially depends on #260.

@linghengqian
Copy link
Contributor

@melix melix modified the milestones: 0.9.15, 0.9.16 Oct 17, 2022
@sdeleuze sdeleuze modified the milestones: 0.9.16, 0.9.17 Oct 17, 2022
@sdeleuze sdeleuze modified the milestones: 0.9.17, 0.9.18 Oct 28, 2022
@sdeleuze sdeleuze modified the milestones: 0.9.18, 0.9.19 Nov 14, 2022
@dnestoro dnestoro modified the milestones: 0.9.19, 0.9.20 Dec 2, 2022
@sdeleuze sdeleuze modified the milestones: 0.9.20, 0.9.21 Jan 31, 2023
@linghengqian
Copy link
Contributor

  • Considering Add maven support for agent #343 , if the maven plugin has the same experience with the agent mode as the gradle plugin, shouldn't this issue be considered resolved? Because there is a metadataCopy task.

@sdeleuze
Copy link
Collaborator

Potentially yes.

@dnestoro Could you please check and close this issue if confirmed?

@dnestoro dnestoro modified the milestones: 0.9.21, 0.9.22 Apr 13, 2023
@dnestoro dnestoro modified the milestones: 0.9.22, 0.9.23 May 11, 2023
@dnestoro dnestoro modified the milestones: 0.9.23, 0.9.24 Jun 16, 2023
@dnestoro dnestoro modified the milestones: 0.9.24, 0.9.25 Aug 9, 2023
@dnestoro dnestoro removed this from the 0.9.25 milestone Aug 28, 2023
@dnestoro dnestoro added this to the 0.9.26 milestone Aug 28, 2023
@olpaw olpaw modified the milestones: 0.9.26, 0.9.27 Sep 7, 2023
@olpaw olpaw modified the milestones: 0.9.27, 0.9.28 Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

8 participants