-
Notifications
You must be signed in to change notification settings - Fork 76
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
Drop Java 8 #488
base: main
Are you sure you want to change the base?
Drop Java 8 #488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really ok with that. There are still project using Java8, and that doesn't have a notable cost for Anorm.
Hmm.. We decided to drop Java 8 for Play, see playframework/playframework#11078. The problem is more and more libraries Play depends on are not getting published anymore for Java 8, see https://github.com/playframework/playframework/issues?q=author%3Ascala-steward+label%3Atopic%3Ajdk-next+is%3Aclosed+ I guess, as soon as we publish Play with artifacts that are build with bytecode for Java 11+ you will have a problem with anorm (?) since you depend on Play libraries. |
}, | ||
scalacOptions ++= { | ||
if (scalaBinaryVersion.value != "2.11") { | ||
Seq("-release", "11") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of -target
we should use -release
, which however is not availabe in Scala 2.11. Bad news is in Scala 2.11 we can not set -target
to Java 11:
$ scalac -version
Scala compiler version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
$ scalac -help
...
-target:<target> Target platform for object files. All JVM 1.5 targets are deprecated. (jvm-1.5,jvm-1.6,jvm-1.7,jvm-1.8) default:jvm-1.6
So... if we drop Java 8 for anorm... we might also should think about dropping Scala 2.11? The last release was cut 5 years ago...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I would even drop Scala 2.12... build.sbt does lot of conditional stuff to make everyhing work. I think it's time to move on for people. Scala 2.13 has been out for a long time already and it just gets harder and harder to support older Scala and Java releases...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: I do not se a reason to not set release
for Scala 3, should be totally fine.
Anorm 2.6.x and 2.7.x still support Java 8, right? |
Yes, I am now just working against the main branch. So there could still be new 2.7.x releases with support for Java 8 (and Scala 2.11) |
@@ -371,7 +371,8 @@ lazy val docs = project | |||
libraryDependencies ++= Seq( | |||
"com.typesafe.play" %% "play-jdbc" % playVer.value % Test, | |||
"com.typesafe.play" %% "play-specs2" % playVer.value % Test, | |||
"com.h2database" % "h2" % "1.4.199" | |||
"com.google.inject" % "guice" % "5.1.0" % Test, // TODO: Remove when depending on play-jdbc/-specs2 2.8.x+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
playVer
is 2.6.14.... So need to pull in newer Guice version that works with Java 17... It's only in test scope however. But I think this needs more refactoring...
At least the pr is green now. I will convert it to a draft pull request. We can wait to merge it at the very end, after Play has a release with Java 11+ only support. |
I'm strongly against that choice. |
@cchantep Cedric, are you against with drop support Java 8 for Play or for Anorm? |
The problem is a lot of people support dropping Java 8 in Play, see playframework/playframework#11078
This is not possbile, some essential libraries do not publish Java 8 anymore. This is also becoming a security problem if we can not upgrade libraries anymore.... @cchantep Do you run applications on Java 8? Is it a problem to move to at least Java 11? |
Matthias, it's not only with security updates. We needs a new versions of libraries (like Guice) for support a new version of Java (for example 17). And if we want that Play might be work with a new Java versions we must drop support old versions 🤷♂️ We can't sit on two chairs at the same time 🤷♂️ |
@ihostage @mkurz Thanks for the feedbacks.
I would say both. But much more against for the standalone library like Anorm, Play-JSON and Play-WS, where on one side a compatibility is lost and on this otherwise currently the compatibility is already there with quite no cost.
I'm not the only one. I cannot always (unfortunately) chose the JVM version.
As long as enterprise are still deploying Java 8 (and against there is quite no cost to maintain the compatiblity). If some really one some artifact specifically built for late JVM, then rather add a cross build with a specific artifact name. With all the community drama the past years, and the drastic impact on Play projects, dropping compatibility really doesn't seem going in the right way for me. |
It's not always so easy. If we want to support newer Java versions, we probably just have to drop older ones. |
Plus: You can still keep using Play 2.8.x, we will support it for a while (probably like 6-12 month when Play 2.9 is released. That should give people even more time to upgrade. Java 8 was released 8 years ago now, and probably it will be 9 when we stop support Java 8 in 2.8.x. Java 8 does not even has public updates anymore (do you pay for security fixes)? |
We didn't have such issue previously.
That's why I would prefer to break this dependency, or as it's only tooling run only doc job in such JVM.
That's not comparable.
If the goal is to do another Spring, I'm sorry but then ... |
@cchantep Cédric, how do you propose to drop support Java 8 for Play (we already know that we can't don't do that, because we must support Java 17), but still support Java 8 for Anorm? 🤔 |
Either drop play-doc integration, or run it in a separate CI job. |
Not sure what's the status about this but definitely agree that we should move on. Many major libraries and frameworks stopped supporting Java 8 (Mockito recently on top of my head). It's also our responsibility as maintainers to incentivize others to move on. |
No it's not. |
No description provided.