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

Build failures caused by using a version of GraalVM that does not meet our minimum requirements are hard to diagnose #32924

Closed
sdeleuze opened this issue Oct 31, 2022 · 1 comment
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Milestone

Comments

@sdeleuze
Copy link
Contributor

As discussed with @philwebb, @wilkinsona and @scottfrederick, in order to improve the usability of Spring Boot native support, I have implemented on Native Build Tools side the support to set the minimal GraalVM version to use. That will avoid hard to diagnose errors like #32915.

The related issue graalvm/native-build-tools#346 has been merged, and will be soon released as part of NBT 0.9.17. Based on that feature, Spring Boot 3 should configure by default with Maven:

<configuration>
    <requiredVersion>22.3</requiredVersion>
</configuration>

And with Gradle:

graalvmNative {
    requiredVersion = "22.3"
}

Depends on #32923.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 31, 2022
@mhalbritter mhalbritter added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 31, 2022
@mhalbritter mhalbritter added this to the 3.0.x milestone Oct 31, 2022
@wilkinsona wilkinsona changed the title Check GraalVM version is at least 22.3 for native compilation Build failures caused by using a version of GraalVM that does not meet our minimum requirements are hard to diagnose Oct 31, 2022
@wilkinsona wilkinsona added type: bug A general bug status: blocked An issue that's blocked on an external project change and removed type: enhancement A general enhancement labels Oct 31, 2022
@wilkinsona wilkinsona removed the status: blocked An issue that's blocked on an external project change label Nov 4, 2022
@wilkinsona wilkinsona self-assigned this Nov 4, 2022
@wilkinsona
Copy link
Member

With the required changes in place, a Maven build using Graal 22.2 now fails like this:

[INFO] --- native-maven-plugin:0.9.17:compile (default-cli) @ demo-aot-native ---
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  25.964 s
[INFO] Finished at: 2022-11-04T12:56:25Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.9.17:compile (default-cli) on project demo-aot-native: Execution default-cli of goal org.graalvm.buildtools:native-maven-plugin:0.9.17:compile failed: GraalVM version 22.3 is required but 22.2 has been detected, please upgrade. -> [Help 1]

Similarly, a Gradle build fails like this:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':nativeCompile'.
> GraalVM version 22.3 is required but 22.2 has been detected, please upgrade.

@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.0-RC2 Nov 4, 2022
wilkinsona added a commit that referenced this issue Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants