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

Add native-image.properties that defers the inicialization of some classes #527

Closed
wants to merge 2 commits into from

Conversation

jkremser
Copy link

GraalVM's native-image tool can create executable self-contained applications out of jar files by doing a lot of magic, like evaluating static initializers during the compilation, making a snapshot of the memory heap, etc. However sometimes some classes' initialization need to be deferred to run-time to pass the build. This PR adds the property file that is read by the native-image tool during the compilation and the argumets are appended to the build tool. It's harmless for the jar itself and will be ignored by all the other tools.

Namely, it adds these classes:

  • com.mongodb.UnixServerAddress
  • com.mongodb.internal.connection.SnappyCompressor

… com.mongodb.UnixServerAddress and com.mongodb.internal.connection.SnappyCompressor to the run-time
@rozza
Copy link
Member

rozza commented Dec 12, 2019

Hi @jkremser,

Thanks for the ticket, I've added https://jira.mongodb.org/browse/JAVA-3537 to track this feature request.

Ross

@jkremser
Copy link
Author

jkremser commented Jan 7, 2020

should I close this one on behalf of rozza#345 ?

@rozza
Copy link
Member

rozza commented Jan 7, 2020

Hi @jkremser - I rebased your change, made a minor change (removed the clirr addition) and once ok'd it will be merged into master for the forthcoming 4.0 release.

You can close this or I'll close once its in master.

Once again, many thanks for bringing this to our attention and providing the original PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants