helidon icon indicating copy to clipboard operation
helidon copied to clipboard

Add Gson Support

Open eiselems opened this issue 5 months ago • 1 comments

Adds GSON support (similar to Jackson, JSON-B, JSON-P)

Resolves #10133

eiselems avatar Jun 16 '25 16:06 eiselems

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

Thank you for signing the OCA.

@tomas-langer I feel this is a general issue, when I ran the /etc/scripts/test-quickstarts.sh on my own mac book I got the same error (also on the master branch). Is it ok to assume you gonna tackle it from here and eventually merge it?

eiselems avatar Jul 01 '25 18:07 eiselems

@tomas-langer I feel this is a general issue, when I ran the /etc/scripts/test-quickstarts.sh on my own mac book I got the same error (also on the master branch). Is it ok to assume you gonna tackle it from here and eventually merge it?

I will try to reproduce and pinpoint the issue.

tomas-langer avatar Jul 02 '25 10:07 tomas-langer

@eiselems can you please share the exact version of GraalVM you use? I cannot reproduce this on my Mac, so probably a difference in the version...

Thanks

tomas-langer avatar Jul 02 '25 11:07 tomas-langer

@tomas-langer

Used one quite similar to what the CI reported ( JAVA_VERSION: 21 GRAALVM_VERSION: 21.0.3)

Personally I used GraalVM CE 21.0.2

❯ ./java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)

running on a M1 Macbook Air

❯ ./etc/scripts/test-quickstarts.sh
...
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.2:compile-no-fork (build-native-image) on project helidon-quickstart-mp: Execution of /Users/marcus/.sdkman/candidates/java/21.0.2-graalce/bin/native-image @target/tmp/native-image-4950850370218738797.args io.helidon.Main returned non-zero result -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.2:compile-no-fork (build-native-image) on project helidon-quickstart-mp: Execution of /Users/marcus/.sdkman/candidates/java/21.0.2-graalce/bin/native-image @target/tmp/native-image-4950850370218738797.args io.helidon.Main returned non-zero result
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    ..

Assuming usage of sdk man

sdk install java 21.0.2-graalce
export GRAALVM_HOME=/Users/marcus/.sdkman/candidates/java/21.0.2-graalce

eiselems avatar Jul 02 '25 11:07 eiselems

Unfortunatelly cannot reproduce on my Macbook yet

tomas-langer avatar Jul 02 '25 12:07 tomas-langer

Finally managed to reproduce, but only with this branch.

tomas-langer avatar Jul 02 '25 12:07 tomas-langer

The problem is caused by update to new annotations for features without changing the annotation processor paths (the old processor would not understand the new annotations, and it produces an empty file, which causes failure in GraalVM extension)

tomas-langer avatar Jul 02 '25 12:07 tomas-langer

Ok I missed doing this on all modules, that makes sense, thank you! Let's see if everything builds.

eiselems avatar Jul 02 '25 12:07 eiselems

@eiselems thanks for the contribution!

tomas-langer avatar Jul 02 '25 14:07 tomas-langer