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

READMEI is not match CI of java version #1181

Closed
liangyuanpeng opened this issue Jun 30, 2023 · 22 comments
Closed

READMEI is not match CI of java version #1181

liangyuanpeng opened this issue Jun 30, 2023 · 22 comments

Comments

@liangyuanpeng
Copy link
Contributor

liangyuanpeng commented Jun 30, 2023

README is talking java8 and CI is java 11

https://github.com/etcd-io/jetcd/blob/main/README.md#java-versions

https://github.com/etcd-io/jetcd/blob/main/.github/workflows/build-pr.yml#L48-L49

@lburgazzoli
Copy link
Collaborator

feel free to amend the CI but I'm considering dropping support for java 8 soon since java 8 is quite outdated

@liangyuanpeng
Copy link
Contributor Author

I'm considering dropping support for java 8 soon since java 8 is quite outdated

Agree with it.

@johnshajiang
Copy link
Contributor

It looks some Gradle plugins, like spotless-plugin-gradle, don't support JDK 8 anymore.
So, it cannot build this project with JDK 8, though the outputted classes are compatible with JDK 8.

Now that jetcd is expected to support JDK 8, it would be better to build and test this project with this JDK version, in case that JDK 8-specific issues raise.

Additionally, although JDK 8 is quite old, it possibly live longer than JDK 11, even 17 ;-)

@liangyuanpeng
Copy link
Contributor Author

It depends on how active the jetcd community is. Basically, I agree not to put more effort into jdk8.

@lburgazzoli
Copy link
Collaborator

@johnshajiang the code should be compatible with java 8 as far as I know as the target is still java 8, however as you mentioned, java 8 is quite old so I will move to java 11 at least.

WDYT ?

@johnshajiang
Copy link
Contributor

@lburgazzoli

the code should be compatible with java 8 as far as I know as the target is still java 8

I did see.
In fact, I also mentioned that ... the outputted classes are compatible with JDK 8.

java 8 is quite old so I will move to java 11 at least

If jetcd declares the required minimum JDK version is 11, I think that is OK.
Currently, the README states that Java 8 or above is required for this tool, but it may not build and test with JDK 8, I just thought this may be a problem.

@lburgazzoli
Copy link
Collaborator

yep it is, unfortunately I did migrate to java 11 some time ago but got some complaining and I had to implement this middle ground solution :(

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Sep 1, 2023

If jetcd declares the required minimum JDK version is 11, I think that is OK.

So, let me create a PR to update it to say jetcd is working for Java 11 or above is required.

WDYT?


UPDATE

I did migrate to java 11 some time ago but got some complaining

So there are some problem with java 11,right?

@lburgazzoli
Copy link
Collaborator

can you also amend the gradle build script and eventually the ci ?

@johnshajiang
Copy link
Contributor

@lburgazzoli

... but got some complaining

No surprise. JDK 8 is used widely in real world projects.
And I suppose jetcd should just be a component in a real project, and the tool chain of the project may have to depend on JDK 8.

.. I had to implement this middle ground solution

Looks jetcd doesn't want to lose such users.
Or you need two releases, one supports JDK 8 and the other supports 11+.
Many open source projects apply this solution, undoubtedly it requires much more efforts.

@johnshajiang
Copy link
Contributor

@liangyuanpeng

So, let me create a PR to update it to say jetcd is working for Java 11 or above is required.

This problem is not the wordings, instead, the real design purpose.

@lburgazzoli
Copy link
Collaborator

lburgazzoli commented Sep 1, 2023

@lburgazzoli

... but got some complaining

No surprise. JDK 8 is used widely in real world projects.

And I suppose jetcd should just be a component in a real project, and the tool chain of the project may have to depend on JDK 8.

.. I had to implement this middle ground solution

Looks jetcd doesn't want to lose such users.

Or you need two releases, one supports JDK 8 and the other supports 11+.

Many open source projects apply this solution, undoubtedly it requires much more efforts.

I don't think this can last forever as many libraries and tools will at some point drop java 8 support. Also, I'm the only maintainer so I would like to minimize maintenance as much as possible.

My proposal is to support LTS-2 which mean to drop java 8 when after java 21 GA. If java 8 is a requirement somewhere has to actively join me in maintaining the library as I cannot guarantee to have the time.

@johnshajiang
Copy link
Contributor

My proposal is to support LTS-2 which mean to drop java 8 when after java 21 GA.

Oh, JDK 21 will be GA very soon, exactly on 19th this month.

@lburgazzoli
Copy link
Collaborator

Right, which means I have to support Java 21, 17, 11 which in my opinion is more than enough for me :)

@liangyuanpeng
Copy link
Contributor Author

I think it's time to notify the user jetcd will be update to java 11.

@lburgazzoli
Copy link
Collaborator

@liangyuanpeng can you open an issue for that and open a PR to amend the readme ?

@johnshajiang
Copy link
Contributor

Right, which means I have to support Java 21, 17, 11 which in my opinion is more than enough for me :)

Just out of curiosity, which JDK 11 features do you need to apply for this project?
Especially, which newer APIs, not compiler sugars, are essential for the future development of jetcd?
At least, currently the codes of jetcd itself are compatible with JDK 8.
Only some building dependencies, say Spotless, have to run on JDK 11+.

@lburgazzoli
Copy link
Collaborator

At this point very few, but in the past I did want to leverage i.e. java.util.concurrent.Flow for the watch interface, but that's not possible because they are part of java 11. Same is true for new things added to in recent (well, already quite old) version of java such as records (every Response can be turned into a record at some point).

I also want to leverage some syntax sugar to remove some dependencies/custom code when possible.

@liangyuanpeng
Copy link
Contributor Author

can you open an issue for that and open a PR to amend the readme ?

@lburgazzoli Absolutely, i think the first step is create a pin issue to let user know about jetcd will be update to java11,And then it goes on for a while. so PR is the next one, WDYT?

If java 8 is a requirement somewhere has to actively join me in maintaining the library as I cannot guarantee to have the time.

Agree with it, if users must to run jetcd on java8, then they should need to maintain a java8 jetcd and work with the community because there is a lack of community maintainers right now.

@lburgazzoli
Copy link
Collaborator

can you open an issue for that and open a PR to amend the readme ?

@lburgazzoli Absolutely, i think the first step is create a pin issue to let user know about jetcd will be update to java11,And then it goes on for a while. so PR is the next one, WDYT?

+1

@liangyuanpeng
Copy link
Contributor Author

@lburgazzoli

Created a issue #1218 for it and please help to pin it.

Feel free to edit it if it is not clear,Thanks!

@liangyuanpeng
Copy link
Contributor Author

please help to pin it.

Add more comment for let it clear, Set this issue to Pin issue.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants