speedment / jpa-streamer

JPAstreamer is a lightweight library for expressing JPA queries as Java Streams
GNU Lesser General Public License v2.1
339 stars 35 forks source link

chore: update supported source version #327

Closed manuelserradev closed 1 year ago

manuelserradev commented 1 year ago

@SupportedSourceVersion is used to indicate the latest source version an annotation processor supports.

Link to javadoc.

I think is safe to say that we can work with the latest lts.

This should also silent this warning when working with the latest lts:

[WARNING] Supported source version 'RELEASE_8' from annotation processor 'com.speedment.jpastreamer.fieldgenerator.StandardFieldGeneratorProcessor' less than -source '17'
julgus commented 1 year ago

Sounds reasonable! However we need to investigate why the build fails with these changes:

image
manuelserradev commented 1 year ago

Yup, I will mark as draft for now.

manuelserradev commented 1 year ago

I finally decided to drop the annotation.

I think that it was originally added to indicate the minimum supported version, but accordingly to the spec it signals the latest instead. I think that it safe to say that we do support Java greater than version 8.

On the other hand we cannot reference RELEASE_17 if we source/target/release for Java 8. So I suggest to drop the annotation entirely so that jpastreamer does not confuse users with the above warning when using versions greater than 8.

Any other change looks like out-of-scope since I think is undesirable to officially drop Java 8.

julgus commented 1 year ago

Hmm... this is really interesting. When I tried dropping the annotation it instead seems as if it falls back on a default value - which is Java 6! I guess we need to stick with RELEASE_8 for now. We have actually considered dropping support for Java 8 in the near future and moving to Java 11, but it sounds like you disagree with that. Would you mind sharing why?

image