From 85da8a27508466b2bd243eb6cae2f7ce7287876e Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 8 Nov 2023 12:32:52 +0200 Subject: [PATCH] Option TraceServiceLoaderFeature removed in GraalVM 23.1 The option `TraceServiceLoaderFeature` is no longer available starting with GraalVM 23.1 as part of a refactoring in how the `ServiceLoaderFeature` works. There is currently no option offering similar output. Fixes https://github.com/quarkusio/quarkus/issues/36129 --- .../quarkus/deployment/pkg/steps/NativeImageBuildStep.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index c4a367b89fcee..77ad5a2dc78eb 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -911,8 +911,10 @@ public NativeImageInvokerInfo build() { if (nativeConfig.autoServiceLoaderRegistration()) { addExperimentalVMOption(nativeImageArgs, "-H:+UseServiceLoaderFeature"); - //When enabling, at least print what exactly is being added: - nativeImageArgs.add("-H:+TraceServiceLoaderFeature"); + if (graalVMVersion.compareTo(GraalVM.Version.VERSION_23_1_0) < 0) { + // When enabling, at least print what exactly is being added. Only possible in <23.1.0 + nativeImageArgs.add("-H:+TraceServiceLoaderFeature"); + } } else { addExperimentalVMOption(nativeImageArgs, "-H:-UseServiceLoaderFeature"); }