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

Prepare NBT for release of GraalVM for JDK 21. #496

Merged
merged 2 commits into from Sep 5, 2023

Conversation

fniephaus
Copy link
Member

This PR changes NBT so that it only uses public / stable Native Image API, which otherwise would require uses to unlock experimental options (see oracle/graal#7105 for context) in the next release of GraalVM.

@fniephaus fniephaus self-assigned this Sep 1, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 1, 2023
@@ -119,13 +125,15 @@ public List<String> asArguments() {
appendBooleanOption(cliArgs, options.getVerbose(), "--verbose");
appendBooleanOption(cliArgs, options.getSharedLibrary(), "--shared");
appendBooleanOption(cliArgs, options.getQuickBuild(), "-Ob");
appendBooleanOption(cliArgs, options.getRichOutput(), "-H:+BuildOutputColorful");
appendBooleanOption(cliArgs, options.getRichOutput(), majorJDKVersion >= 21 ? "--color" : "-H:+BuildOutputColorful");
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this option is only used in the Gradle plugin. Since Maven doesn't need it, it also doesn't need to check native-image --version unconditionally.

Copy link
Collaborator

@melix melix 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 overall, except for the change to the command line provider. We should simply add another provider as a constructor argument. It's a breaking change, but I think it's fine (the only known consumer is the Micronaut Gradle plugin). This will be easier to maintain.

Also I need to have a method which computes the JDK version for the Micronaut plugin too, so having this code shared would be simpler.

Thanks!

@fniephaus fniephaus force-pushed the fniephaus/GR-47647/revise-options branch from b931846 to 97955df Compare September 4, 2023 13:27
@dnestoro
Copy link
Collaborator

dnestoro commented Sep 4, 2023

Please mention this change in our changelog before merging

@fniephaus fniephaus force-pushed the fniephaus/GR-47647/revise-options branch from 5fc1a64 to 3855c06 Compare September 4, 2023 16:44
@fniephaus fniephaus force-pushed the fniephaus/GR-47647/revise-options branch from 3855c06 to 2f191a2 Compare September 5, 2023 05:09
@fniephaus fniephaus merged commit b168dc7 into master Sep 5, 2023
21 checks passed
@fniephaus fniephaus deleted the fniephaus/GR-47647/revise-options branch September 5, 2023 11:02
@sschuberth
Copy link

Any idea why I'm still seeing

Warning: Option 'BuildOutputColorful' is deprecated and might be removed in a future release: Please use '--color' instead.. Please refer to the GraalVM release notes.

despite using version 0.9.27 of the Gradle plugin, which should include this PR?

@fniephaus
Copy link
Member Author

@sschuberth is that still the case with 0.9.28? Which GraalVM distribution are you using? /cc @dnestoro

@sschuberth
Copy link

I cannot reproduce this anymore with plugin version 0.9.28 and GraalVM runtime version 21.0.1+12-jvmci-23.1-b22. So I was probably just too impatient WRT the version this got fixed in...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants