Allow empty classpath for layer-create builds by jormundur00 · Pull Request #895 · graalvm/native-build-tools (original) (raw)
Conversation
Fixes #892
Summary
- allow Maven layer-create builds to omit
-cpwhen the computed image classpath is empty - detect the hosted layer-create flag emitted by native-build-tools:
-H:LayerCreate... - add Maven coverage for empty classpath layer-create builds and regular empty classpath failures
- add Gradle regression coverage showing existing no-
-cpbehavior for empty classpath layer-create builds
Testing
JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-maven-plugin:test --tests org.graalvm.buildtools.maven.AbstractNativeImageMojoTestJAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:test --tests org.graalvm.buildtools.gradle.tasks.NativeImageCommandLineProviderTest
Note: :native-maven-plugin:checkstyleMain currently fails on pre-existing unused imports in NativeTestMojo.java, unrelated to this change.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
| protected static final String NATIVE_IMAGE_PROPERTIES_FILENAME = "native-image.properties"; |
|---|
| protected static final String NATIVE_IMAGE_DRY_RUN = "nativeDryRun"; |
| private static final Pattern LAYER_CREATE_ARG = Pattern.compile( |
| Pattern.quote(NativeImageFlags.LAYER_CREATE) + "(@[^=]*)?=.+"); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future (when layers will stop being experimental), we will also allow --layer-create. We don't have to support it now as I don't really know when we will remove the experimental part for layers, but since this is silent, it might be hard to remember.
mergify Bot added a commit to robfrank/linklift that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})