@[email protected] <[email protected]> : Indeed, it seems that lot of Apache commons project are still using Java8, for example, Commons Lang3 <https://github.com/apache/commons-lang/blob/master/pom.xml#L605-L606>, and even Apache Arrow <https://github.com/apache/arrow/blob/master/java/pom.xml#L204-L205> which purpose is near to Avro is comiled in Java 8 version. So, it may be to soon to move to 11.
For spark 2.4.8, it also use Avro 1.8.2 <https://github.com/apache/spark/blob/v2.4.8/pom.xml#L143>, so, it would not be an issue to put compile 1.12 with Java11. To be completed, you can see here a branch on my avro fork project that use Java11 <https://github.com/clesaec/avro/tree/Java11Experience>(mainly by using java.lang.invoke.MethodHandles instead of sun.misc.Unsafe in org.apache.avro.reflect.FieldAccess sub-classes. Le ven. 9 sept. 2022 à 21:58, Oscar Westra van Holthe - Kind < [email protected]> a écrit : > Hi everyone, > > In my experience, there's been quite a bit of movement the past few years > to get the major big data components that require Java 8 into the modern > age. Most notable is Spark; all versions 3.x work with Java 11. > > However, the oldest supported version seems to be 2.4.8, released in May > 2021, which only works with Java 8 (not version 9 or later, and support for > Java 7 was dropped in 2.2.0). As a result, I think we should still build > for & support Java 8... > > But if someone can prove me wrong, that would make me quite happy. > > > Kind regards, > Oscar > > > On Fri, 9 Sept 2022 at 18:51, Ryan Skraba <[email protected]> wrote: > > > I'm not particularly attached to Java 8 either! > > > > I guess we've traditionally been pretty conservative, especially > > because Avro is widely used in big data environments -- back when > > on-premise clusters were the norm, it used to be trickier to bump Java > > versions across all nodes. That's really not a thing any more, is it? > > > > We currently build and test all major java versions[1] but only upload > > Java 8 compiled artifacts. > > > > Any idea what other projects are doing? I'd say pick a widely used > > one (Apache Commons might be a good candidate) and track what they do, > > much like how we follow pip to determine which versions of python we > > support. > > > > I created https://issues.apache.org/jira/browse/AVRO-3627 to make sure > > this gets tracked one day for easy reference! > > > > All my best, Ryan > > > > [1]: > > > https://github.com/apache/avro/blob/d6a0d0a790274de27b2cfde07d14151a4a327a96/.github/workflows/test-lang-java.yml#L43-L47 > > > > On Fri, Sep 9, 2022 at 3:50 PM Christophe Le Saëc <[email protected]> > > wrote: > > > > > > Hello here, > > > Is there any reason to stay in Java8 for Avro project ? > > > > > > On my laptop, i succeed to change to version 11 > > > > > > <maven.compiler.source>11</maven.compiler.source> > > > <maven.compiler.target>11</maven.compiler.target> > > > > > > just by adding a new FieldAccessor class using > > > java.lang.invoke.MethodHandles instead of sun.misc.Unsafe (And compile > > > FieldAccessUnsafe or the new class depends of JDK version with Maven > > trick). > > > Whole unit tests work fine. > > > I wonder if there are other good reasons to stay with Java 8 version. > > > > > > Best regards, > > > Christophe Le Saëc > > > > > -- > > ✉️ Oscar Westra van Holthe - Kind <[email protected]> >
