RuedigerMoeller / fast-serialization

FST: fast java serialization drop in-replacement
Apache License 2.0
1.58k stars 248 forks source link

Java 21 LTS java.lang.foreign #346

Open istinnstudio opened 9 months ago

istinnstudio commented 9 months ago

This is not a "real" issue, it is just a reminder that Java 21 LTS has changed the "preview" feature of the used memory API in branches 17 and 20. So we need a revision of source for Java 21 by using the finalized [java.lang.foreign] (https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/foreign/package-summary.html), hopefully RuedigerMoeller will do magic again and introduce an updated 21 source branch using the final Foreign Memory Access API, replacing the non existent jdk.incubator.foreign in 21 LTS. Also there is a naming conflict with janassist lib in FieldAccess at FSTStructFactory class.

maximevdk-tidal commented 9 months ago

Do you know if there there is a way to get it working on Java 21 while waiting for the changes?

istinnstudio commented 9 months ago

Compiled sources with java17 should work just fine with 21, only latest source needs update, there has been significant changes on java.lang.foreign, so jdk17/20 branch source is not compatible with java21 for compile from source