Skip to content

Commit

Permalink
Add a warning when we detect graal-sdk
Browse files Browse the repository at this point in the history
We need to get it out of the extension ecosystem.

Related to quarkusio#39440
  • Loading branch information
gsmet committed Mar 14, 2024
1 parent 92a3997 commit 8ed8792
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,14 @@ private NativeImageSourceJarBuildItem buildNativeImageThinJar(CurateOutcomeBuild
removedArtifacts.add("org.graalvm.sdk:word");
removedArtifacts.add("org.graalvm.sdk:collections");

// complain if graal-sdk is present as a dependency as nativeimage should be preferred
if (curateOutcomeBuildItem.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getGroupId().equals("org.graalvm.sdk") && d.getArtifactId().equals("graal-sdk"))) {
log.warn("org.graalvm.sdk:graal-sdk is present in the classpath. "
+ "From Quarkus 3.8 and onwards, org.graalvm.sdk:nativeimage should be preferred. "
+ "Make sure you report the issue to the maintainers of the extensions that bring it.");
}

doLegacyThinJarGeneration(curateOutcomeBuildItem, outputTargetBuildItem, transformedClasses,
applicationArchivesBuildItem, applicationInfo, packageConfig, generatedResources, libDir, allClasses,
runnerZipFs, mainClassBuildItem, classLoadingConfig);
Expand Down

0 comments on commit 8ed8792

Please sign in to comment.