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

[Java 21] Remove H:Name and H:Path GraalVM experimental options from runtime #43493

Draft
wants to merge 2 commits into
base: java21
Choose a base branch
from

Conversation

ravinperera00
Copy link
Contributor

Purpose

$subject

Fixes part of ballerina-platform/ballerina-library#7252

Approach

Replace the options with -o <entire-file-path-and-name.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@@ -86,4 +86,4 @@ EXAMPLES
$ bal build <app-package-path>

Build the package with additional GraalVM native image options.
$ bal build --graalvm --graalvm-build-options="--static -H:Name=hello-world"
$ bal build --graalvm --graalvm-build-options="--static -o <entire-file-path-with-name>"
Copy link
Contributor

@TharmiganK TharmiganK Oct 18, 2024

Choose a reason for hiding this comment

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

We should not use the -o option again
Since this is an example for the --graalvm-build-options we may add this --enable-monitoring option instead of -H:Name=hello-world option

Suggested change
$ bal build --graalvm --graalvm-build-options="--static -o <entire-file-path-with-name>"
$ bal build --graalvm --graalvm-build-options="--static --enable-monitoring"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. I'll fix these.

@@ -187,4 +187,4 @@ EXAMPLES
$ bal test -Cval1=add -Cval2=10 -Cval3=5

Test the package with additional GraalVM native image options.
$ bal test --graalvm --graalvm-build-options="--static -H:Name=hello-world"
$ bal test --graalvm --graalvm-build-options="--static -o <entire-file-path-with-name>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as the previous comment

@@ -86,7 +86,7 @@ public void testBuildProjectWithAdditionalArgs() throws IOException {
Path projectPath = this.testResources.resolve("nativeimageProject");
System.setProperty(ProjectConstants.USER_DIR, projectPath.toString());
BuildCommand buildCommand = new BuildCommand(projectPath, printStream, printStream, false,
false, true, "-H:Name=hoo");
false, true, "-o " + projectPath + "/hoo");
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this overwrite the output path? Is the test passing with this change?

Copy link
Contributor Author

@ravinperera00 ravinperera00 Oct 18, 2024

Choose a reason for hiding this comment

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

Noted. The tests actually do pass. I'll have a deeper look.

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.24%. Comparing base (6860ffb) to head (5595869).
Report is 37 commits behind head on java21.

Files with missing lines Patch % Lines
.../java/io/ballerina/projects/JBallerinaBackend.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             java21   #43493      +/-   ##
============================================
+ Coverage     75.01%   77.24%   +2.22%     
- Complexity    56725    58256    +1531     
============================================
  Files          3447     3447              
  Lines        218878   218847      -31     
  Branches      28846    28852       +6     
============================================
+ Hits         164187   169044    +4857     
+ Misses        45736    40422    -5314     
- Partials       8955     9381     +426     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants