-
Notifications
You must be signed in to change notification settings - Fork 38
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
Get everything working with Java 9+ #262
Comments
It's this line where we use an Integer constructor with a String that fails validation as it's deprecated: https://github.com/build-canaries/nevergreen/blob/master/src/nevergreen/config.clj#L28 We did have an issue where we accidentally used some Java9 features which didn't work in Java8. I think it was around the AES stuff. So we should probably keep targetting against Java8 runtime, but make it work with higher levels of Java. The other issue is that Midje isn't supported with Java9, which will mean rewriting the tests. |
The constructor is deprecated in new JDK versions
I've fixed the deprecation issue with the linting as that was easy. I've tried with Java 11 and all the midje tests passed, so maybe the issues have been fixed (but maybe only for 11)? I used Jabba to easily switch JDKs but for some reason it doesn't have Oracle JDK9 or 10? |
I found this article which is pretty informative: https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-11/
Maybe this is why you can't install 9 or 10 via Jabba? This also implies we probably shouldn't bother testing with those versions and just test supporting 11? |
It also seems getting a Alpine based Docker image for JDK11 might not be simple: We might be able to use https://hub.docker.com/r/adoptopenjdk/openjdk11/tags I've tested running a Docker image from |
Just remembered we don't actually use the Docker image on nevergreen.io so we'd need to update that separately, which I'm assuming we'd do manually for now? How we originally installed via infra:
I'm assuming we got Java8 as it was the latest/default at the time. |
I think this only affects development, but, yeah, let's forget 9 and 10 as they weren't proper releases. 8 and 11 we should support. For the infra: we used the OS provided default via that line which was 8. Are we looking to upgrade to using 11 in production? It'll probably mean adding a yum repo to get it to work |
I think it would be good to switch to 11 for prod and recommended people use it during development, but I guess it isn't required if it's difficult. Edit: I don't mind opening a new issues for upgrading production and the docker image to Java 11. That would allow us to close this issue as I'm pretty sure everything should be working with newer version of Java now. |
I've opened #267 for updating the Docker image and build-canaries/nevergreen-infra#13 for updating production. I'm going to close this for now, if it turns out we still have problems with newer JDKs we can open specific issues to fix those problems. |
My understanding is our server linting currently fails if you use a Java version greater than 8. It would be good to get this working so we can upgrade to using Java 11 in production.
@joejag Is linting the only issue?
Also Java 8 is no longer getting any public updates, https://www.oracle.com/technetwork/java/java-se-support-roadmap.html
Edit: Should we include a Java Version Manager like Jabba and recommend that to users in the wiki docs (like we do with nvm)?
The text was updated successfully, but these errors were encountered: