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 #39440

(cherry picked from commit 8ed8792)
  • Loading branch information
gsmet committed Mar 15, 2024
1 parent a230b3f commit 1671edb
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 1671edb

Please sign in to comment.