question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide GraalVM metadata repository support with Buildpacks

See original GitHub issue

(edit)

Splitting into sub-tasks:

External issues:


As discussed with @dmikusa-pivotal, @mhalbritter and @scottfrederick, we need to integrate GraalVM metadata repository in Buildpacks in addition to Native Build Tools current support (see #31687) in order to allow compiling Spring Boot application with third-party dependencies to a native executable. 2 implementations have been discussed.

Based on our discussions, integration at Spring Boot Maven and Gradle plugin AOT generation level is the recommended way to implement such integration because:

  • It allows a single and consistent way to provide third-party native configuration for Spring Boot applications
  • It can leverage graalvm-reachability-metadata Java library and its GraalVMReachabilityMetadataRepository class maintained by GraalVM team.
  • Reference implementation in NBT Gradle and Maven plugins can help us for the Spring Boot implementation.
  • Conceptually a good fit to put third party hints along to Spring ones
  • Better DevXP (all the JSON hints generated at the same location at the same time)
  • Better build reproducibility
  • Gives more control to Spring Boot on the reachability metadata repository release a certain version of Spring Boot uses

The alternative way is to have 2 distinct implementations : the one at NBT plugins level and another at Buildpacks level, but the lack of consistency, poorer DevXP, the fact that we would likely have to reimplement graalvm-reachability-metadata in Go and maintaining it seems to indicate this should not be the way to move forward.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
sdeleuzecommented, Oct 5, 2022

@philwebb So my discussion with @vjovanov confirmed there is no hope for bringing back support for --exclude-config in META-INF/native-image/native-image.properties. So I think that means we should move forward with the solution described above.

1reaction
sdeleuzecommented, Aug 23, 2022

We have already discussed this possibility with the GraalVM team in the past which has been refused, no hope to see this happening short/middle term.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Provide GraalVM metadata repository files in Spring Boot jar ...
Provide GraalVM metadata repository files in Spring Boot jar built with Gradle #32408 ... Provide GraalVM metadata repository support with Buildpacks #31782.
Read more >
Use Shared Reachability Metadata with Native Image Gradle ...
This repository provides GraalVM configuration for libraries which do not support GraalVM Native Image by default. The support needs to be enabled explicitly....
Read more >
Using Java Native Image | Cloud Foundry Docs
This section describes how to deploy a Java app with native image support using Cloud Native Buildpacks. To deploy an app compiled using...
Read more >
Gradle plugin for GraalVM Native Image building
This repository provides reachability metadata for libraries that do not support GraalVM Native Image. This version of the plugin defaults to the using...
Read more >
Spring Native documentation
Spring Native provides support for compiling Spring applications to native executables using the GraalVM native-image compiler.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found