Skip to content
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

Add documentation to handle Java preview features for building natives #23172

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

galderz
Copy link
Member

@galderz galderz commented Jan 25, 2022

Based on the feedback in this Zulip stream.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. I added a few suggestions.

[NOTE]
.Java preview features
====
Java code might that relies on preview features requires special attention.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Java code might that relies on preview features requires special attention.
Java code that relies on preview features requires special attention.

====
Java code might that relies on preview features requires special attention.
To produce a native executable, this means that the `--enable-preview` flag needs to be passed to the underlying native image invocation.
You can do so by prepending the flag with `-J` and passing it as additional native builder argument: `-Dquarkus.native.additional-build-args=-J--enable-preview`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can do so by prepending the flag with `-J` and passing it as additional native builder argument: `-Dquarkus.native.additional-build-args=-J--enable-preview`.
You can do so by prepending the flag with `-J` and passing it as additional native build argument: `-Dquarkus.native.additional-build-args=-J--enable-preview`.

[NOTE]
.Java preview features
====
Java code might that relies on preview features requires special attention.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Java code might that relies on preview features requires special attention.
Java code that relies on preview features requires special attention.

====
Java code might that relies on preview features requires special attention.
To test a native executable, this means that the `--enable-preview` flag needs to be passed to surefire plugin.
Adding `<argLine>--enable-preview</argLine>` to surefire plugin `configuration` section is one way to do so.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Adding `<argLine>--enable-preview</argLine>` to surefire plugin `configuration` section is one way to do so.
Adding `<argLine>--enable-preview</argLine>` to the Surefire plugin `configuration` section is one way to do so.

.Java preview features
====
Java code might that relies on preview features requires special attention.
To test a native executable, this means that the `--enable-preview` flag needs to be passed to surefire plugin.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To test a native executable, this means that the `--enable-preview` flag needs to be passed to surefire plugin.
To test a native executable, this means that the `--enable-preview` flag needs to be passed to the Surefire plugin.

@galderz galderz force-pushed the t_native_java17_enable_preview branch from d04bc0b to bc9bb38 Compare January 25, 2022 10:48
@galderz
Copy link
Member Author

galderz commented Jan 25, 2022

@gsmet Fixed comments

@gsmet gsmet merged commit d44c123 into quarkusio:main Jan 25, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Jan 25, 2022
@gsmet
Copy link
Member

gsmet commented Jan 25, 2022

Thanks!

@gsmet gsmet modified the milestones: 2.8 - main, 2.7.0.Final Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants