-
Notifications
You must be signed in to change notification settings - Fork 3k
Introduce property quarkus.native.additional-build-args-append
#47883
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for an additional native image build argument property, "quarkus.native.additional-build-args-append", along with documentation updates and test coverage.
- Updates the AsciiDoc file to explain the new property and its intended usage.
- Introduces a new method in the NativeConfig interface and corresponding tests.
- Modifies the native image build step to incorporate the newly added property.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
docs/src/main/asciidoc/building-native-image.adoc | Updates documentation to explain both additional-build-args and additional-build-args-append. |
core/deployment/src/test/java/io/quarkus/deployment/pkg/TestNativeConfig.java | Adds a new test method for additional-build-args-append. |
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java | Modifies build steps to iterate over both additional build args properties. |
core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java | Introduces a new interface method for additional-build-args-append. |
Comments suppressed due to low confidence (1)
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java:1066
- Using a raw array for Optionals may lead to type safety warnings; consider using a List of Optionals (e.g. List<Optional<List>>) to improve clarity and type safety.
Optional<List<String>>[] additionalBuildArgs = new Optional[] { nativeConfig.additionalBuildArgs(), nativeConfig.additionalBuildArgsAppend() };
[TIP] | ||
==== | ||
You can provide custom options for the `native-image` command using the `<quarkus.native.additional-build-args>` property. | ||
You can provide custom options for the `native-image` command using the `quarkus.native.additional-build-args` and `quarkus.native.additional-build-args-append` properties. |
Copilot
AI
May 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a brief example of how to use the new quarkus.native.additional-build-args-append
property on the command line in this documentation section to aid users in understanding its usage.
Copilot uses AI. Check for mistakes.
private void handleAdditionalProperties(List<String> command) { | ||
if (nativeConfig.additionalBuildArgs().isPresent()) { | ||
List<String> strings = nativeConfig.additionalBuildArgs().get(); | ||
Optional<List<String>>[] additionalBuildArgs = new Optional[] { nativeConfig.additionalBuildArgs(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional<List<String>>[]
is quite the type 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :), even co-pilot noticed it (for different reasons though).
See "Comments suppressed due to low confidence (1)" in #47883 (review)
Status for workflow
|
🙈 The PR is closed and the preview is expired. |
Status for workflow
|
CI failures are unrelated. |
Closes: #47762