leangen / graphql-spqr

Build a GraphQL service in seconds
Apache License 2.0
1.09k stars 181 forks source link

Java 8 support dropped from 0.12.1 to 0.12.2 #457

Closed Julius-Rapp closed 1 year ago

Julius-Rapp commented 1 year ago

After upgrading to 0.12.2, we cannot compile our Java 8 application. The error message reads as follows.

java: cannot access io.leangen.graphql.annotations.GraphQLArgument
  bad class file: /home/directory/.m2/repository/io/leangen/graphql/spqr/0.12.2/spqr-0.12.2.jar!/io/leangen/graphql/annotations/GraphQLArgument.class
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

This is presumably caused by 5cb679d753b1670fcd02c54c5e75e264315c11bd. I believe that the upgrade to Java 11 was accidental.

kaqqao commented 1 year ago

graphql-java switched to Java 11 recently, so it only made sense for SPQR to follow, seeing how graphql-java is an essential dependency. I could revert the version bump and compile SPQR with Java 8, but wouldn't you still be in the same trouble since you'd be getting graphql-java compiled with 11 anyway?

Julius-Rapp commented 1 year ago

SPQR 0.12.2 depends on graphql-java 20.2, which still supports Java 8. The first version of graphql-java that requires Java 11 will be graphql-java 21. For now, it would be great if SPQR based on graphql-java 20.2 still supported Java 8.

I verified that very few changes are required on top of spqr-v0.12.2 in order to be compiled with Java 8 and be usable for our Java 8 app.

kaqqao commented 1 year ago

Ok, fair enough, SPQR should always support exactly what graphql-java does, so I'll keep it on Java 8 for the time being.

Julius-Rapp commented 1 year ago

Great to hear that you are planning to keep Java 8 support as long as graphql-java does.

Are there any plans for a Java-8 compatible release? I just rebased my changes for Java 8 support on the current master and verified that they still work for us.