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

Please update the bom version of all jackson modules to 2.13 #20690

Closed
MartinX3 opened this issue Oct 12, 2021 · 15 comments
Closed

Please update the bom version of all jackson modules to 2.13 #20690

MartinX3 opened this issue Oct 12, 2021 · 15 comments
Labels
area/housekeeping Issue type for generalized tasks not related to bugs or enhancements area/jackson Issues related to Jackson (JSON library) area/kotlin triage/duplicate This issue or pull request already exists

Comments

@MartinX3
Copy link

MartinX3 commented Oct 12, 2021

Description

jackson 2.13 adds support for kotlin 1.5.30 which is used in quarkus 2.3 (1.5.31)

Implementation ideas

Pushing the package versions in the quarkus-bom

@MartinX3 MartinX3 added the area/housekeeping Issue type for generalized tasks not related to bugs or enhancements label Oct 12, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 12, 2021

/cc @evanchooly, @geoand, @gsmet

@quarkus-bot quarkus-bot bot added area/jackson Issues related to Jackson (JSON library) area/kotlin labels Oct 12, 2021
@MartinX3 MartinX3 changed the title Please update the bom version of jackson-module-kotlin to 2.13 Please update the bom version of all jackson modules to 2.13 Oct 12, 2021
@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

See #20651 for details. We will be holding off on this for now

@geoand geoand closed this as completed Oct 12, 2021
@geoand geoand added the triage/duplicate This issue or pull request already exists label Oct 12, 2021
@MartinX3
Copy link
Author

Sorry, somehow I didn't see it in the github search, maybe because it is closed.

@netodevel
Copy link
Contributor

@MartinX3,
i needed to force to use java 16 records

It's not recommended but you can force use of the newest one like this:

 <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>${quarkus.platform.artifact-id}</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.13.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.13.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

Attention: It is not a guarantee that the quarkus extension will work correctly.

@MartinX3
Copy link
Author

MartinX3 commented Oct 14, 2021

@netodevel thank you for the information :)
My project is based on java 11 LTS and I think the next java bumb will be java 17 LTS. :)
But I'm unsure if Quarkus 2.3 or 2.4 is the official java 17 support version, since I saw 2.4 milestones in combination with java 17 in this project.

@geoand
Copy link
Contributor

geoand commented Oct 14, 2021

Quarkus 2.3 and Jackson 2.12 already work with Java 17

@MartinX3
Copy link
Author

Thank you very much, I'll test it tomorrow (wooohooo). :)

@netodevel
Copy link
Contributor

@geoand,
but only in jvm mode right?
in native mode (graalvm) is also going well?

@geoand
Copy link
Contributor

geoand commented Oct 14, 2021

What's wrong with native mode?

@netodevel
Copy link
Contributor

netodevel commented Oct 14, 2021

@geoand,

I'm using records for dto's in my project and in native mode it fails if I don't specify
@RegisterForReflection on record.

I will prepare a better sample and open an issue.

Another detail is that it still doesn't have an image to generate a native image for java 17.

the latest is 16:
quay.io/quarkus/ubi-quarkus-native-image:21.2.0-java16

(I imagine that because graalvm hasn't informed full support for the java 17 yet)

@geoand
Copy link
Contributor

geoand commented Oct 14, 2021

That's no different from what you need to do for a regular class, no?

In any case, GraalVM for Java 17 is not ready yet, nor is it even officially released

@gsmet
Copy link
Member

gsmet commented Oct 14, 2021

I wonder if we will have to tweak our build steps for records. Are they handled like regular classes by Jandex?

@netodevel
Copy link
Contributor

@gsmet,
I'm already testing a tweak here in the quarkus-jackson extension if it works, I open a pull request to be evaluated;

@netodevel
Copy link
Contributor

@gsmet, @geoand,
follows the sample and fix I mentioned above: #20784

@MartinX3
Copy link
Author

MartinX3 commented Oct 15, 2021

@geoand
I tried java 17 by using the java 17 JDK on my computer, gradle 7.2, quarkus 2.3.0 and in the build.gradle.kts:

import org.gradle.api.JavaVersion.VERSION_17

java {
    sourceCompatibility = VERSION_17
    targetCompatibility = VERSION_17
}

tasks {
    withType<JavaCompile> {
        options.compilerArgs.add("-parameters")
        options.encoding = "UTF-8"
    }

    withType<KotlinCompile> {
        kotlinOptions.jvmTarget = VERSION_17.toString()
        kotlinOptions.javaParameters = true
    }
}

And the task :compileKotlin returns:

Unknown JVM target version: 17
Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16

Probably gradl 7.2 has no java 17 support,
Their 7.2 docs are outdated, sadly.
https://docs.gradle.org/current/userguide/compatibility.html
But I think it needs 7.3 according to gradle/gradle#16857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/housekeeping Issue type for generalized tasks not related to bugs or enhancements area/jackson Issues related to Jackson (JSON library) area/kotlin triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants