Skip to content

Provide GraalVM metadata repository support with Buildpacks #31782

@sdeleuze

Description

@sdeleuze

(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.

Metadata

Metadata

Assignees

Labels

status: supersededAn issue that has been superseded by anothertheme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions