paketo-buildpacks / graalvm

A Cloud Native Buildpack that provides the GraalVM implementations of JREs and JDKs
Apache License 2.0
33 stars 13 forks source link

Investigate new GraalVM included native-image #320

Open anthonydahanne opened 1 year ago

anthonydahanne commented 1 year ago

Describe the Enhancement

GraalVM team recently announced a new release model, that will include native-image directly in the future GraalVM archives. https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5 It would be nice to evaluate the impact it could have on the graalvm buildpack.

Possible Solution

It should be possible to simplify the code and no longer rely on gu install; see https://github.com/paketo-buildpacks/graalvm/blob/main/cmd/main/main.go#L39 for example @pivotal-david-osullivan mentioned:

I think it will at least involve swapping the BundledWithJDK flag in GraalVM’s main to true and removing the other properties there that point to gu

Motivation

Adapt to new packaging, simplify the codebase

dmikusa commented 1 year ago

It looks like CI missed updates for Java 17 and 20. https://github.com/graalvm/graalvm-ce-builds/releases/tag/jdk-17.0.7

The Bellsoft repo picked them up here -> https://github.com/paketo-buildpacks/bellsoft-liberica/pull/422/files

anthonydahanne commented 1 year ago

there's also another point I missed: Native Image Bundles (NIB) The user could create a bundle from their jar: native-image -jar MyApp.jar -bundle-create=…/path/to/<imagename>.nib and later on create a native image with: native-image -bundle-apply=…/path/to/<imagename>.nib

we could decide to have the native-image buildpack support those uses cases

see: this issue instead: https://github.com/paketo-buildpacks/native-image/issues/270

danthe1st commented 1 year ago

I feel like native image bundles would better fit in a distinct issue as it is not directly related to native-image being included directly.

dmikusa commented 1 year ago

+1 @anthonydahanne I like that a lot. Can you open a new issue for it?