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

Jdk 21 news scenario for some JEPs #99

Merged
merged 4 commits into from
Oct 3, 2023
Merged

Conversation

jedla97
Copy link
Member

@jedla97 jedla97 commented Sep 25, 2023

Hi, this PR adding showcase of some new features from JDK18-21.

The CI only adding JDK21 to jvm runs, as there is not ubi-quarkus-mandrel-builder-image available for JDK21.

Adding of -Dnet.bytebuddy.experimental=true is because bytebuddy is transitive dependency of hibernate and probably latest Quarkus don't have updated hibernate version which support latest bytebuddy (maybe even bytebuddy don't have version which goes from experimental to supported as latest version was released before JDK21)

@rsvoboda
Copy link
Member

rsvoboda commented Sep 25, 2023

there is not ubi-quarkus-mandrel-builder-image available for JDK21

I asked about it and there should be one within a month more or less. It's based on Temurin which is not in final version.
We may need some fixes on Quarkus side too.

pom.xml Show resolved Hide resolved
README.md Show resolved Hide resolved
@rsvoboda
Copy link
Member

rsvoboda commented Sep 25, 2023

Other things to check (or to tell me that they were checked or make no sense to you to be checked):

Sequenced collections with Hibernate, Sequenced collections with rest apis through json binding ...

String templates and QUTE (https://quarkus.io/guides/qute-reference)

Unnamed classes and instance main methods with

Vector API introduces new classes (https://docs.oracle.com/en/java/javase/21/docs/api/jdk.incubator.vector/jdk/incubator/vector/package-summary.html) maybe worth checking if they can be easily used in rest endpoints and in JPA.

@jedla97
Copy link
Member Author

jedla97 commented Sep 25, 2023

@rsvoboda Generally I create only showcase of new features which are ready (not preview or incubator) at least I take it we should watch them but they can never make it from preview or be discontinued.

For what I just try but not implement in this PR:

  • String templates (preview)
  • Unnamed Patterns and Variables (Preview) with enhanced switch case
  • Try virtual threads when main source was this
  • Sequenced Collections but my ideas just doesn't make most of the sense as I tried just basic new methods

But thanks for suggesting using the Sequenced Collections with hibernate I just get some idea which I'll try.

But if you want I can create some showcases for previews? I have some in mind.

For Unnamed classes and instance main methods with I don't think we need them here but just tried if it work would wort a shot.

@rsvoboda
Copy link
Member

Generally I create only showcase of new features which are ready (not preview or incubator)

OK, makes sense

But if you want I can create some showcases for previews? I have some in mind.

+1 for it, people will try preview stuff

Unnamed classes and instance main methods

it's ok to just check locally, should work, but Quarkus does some bytecode magic, so worth checking

@rsvoboda
Copy link
Member

@jedla97 just fyi, I checked simplified main and Quarkus has issues with that - quarkusio/quarkus#36154

Commit addin new JDK21 feature as the JEP 413, JEP 441, JEP 404, JEP 431.
@jedla97
Copy link
Member Author

jedla97 commented Oct 2, 2023

@rsvoboda I added the sequenced collection with hibernate. Unified the posgres version. At the moment I can't add preview because test framework not passing the --enable-preview when execute the jar so there will be need to update framework after I'll add it there.

Thanks for the testing the simplified main. +1

@michalvavrik
Copy link
Member

michalvavrik commented Oct 2, 2023

It don't need to be in this PR as it is not specific for 21, but I can see you are using records, so it'd be nice if you found scenario that catch template records as I don't believe we are testing it otherwise and native methods are ugly https://quarkus.io/guides/qute-reference#template-records. Just if you can.

@michalvavrik michalvavrik reopened this Oct 2, 2023
@michalvavrik
Copy link
Member

Sorry, wrong, button, I wanted to write comment :/

@rsvoboda rsvoboda merged commit 24fcdd7 into quarkus-qe:main Oct 3, 2023
8 checks passed
@jedla97 jedla97 mentioned this pull request Oct 23, 2023
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.

3 participants