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

JDK compat page: add Scala 3 LTS column #3083

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Oct 14, 2024

realized recently that was a significant omission we ought to address

@Gedochao @sjrd need your help here — I left two cells blank because I don't know what to put, and I'm not sure some other entries are correct (see below)

@SethTisue
Copy link
Member Author

in addition to the blank cells, I'm also wondering if the Scala 3 LTS column values are actually correct. I no longer remember what the basis for the "3.3.4" and "3.3.5" entries was

JDK 21 support landed in scala/scala3#17536, in scala/scala3@5038c9c which is in 3.3.1's history but not 3.3.0's , so I believe that 3.3.1 entry is correct for JDK 21

but what about 22 and 23? did we actually do anything to support those versions?

I suspect the "3.3.4" and "3.3.5" entries might have come about because those are the versions were we upgraded ASM. in Scala 2, it makes sense for the ASM upgrade PRs to be the vital ones, because the Scala 2 optimizer uses ASM to read bytecode

but Scala 3 doesn't have the optimizer. does it ever use ASM for reading bytecode, or does it only ever use ASM to generate bytecode? if the latter, than maybe 3.3.1 actually works fine on JDK 22 and 23 and the table ought to indicate that?

I see that https://www.scala-lang.org/news/3.3.4 does say "Support for JDK 22", but there's no link that goes with it. what is the basis for that claim? I would like to understand

cc @Philippus, who has taken an interest in ASM upgrades

cc @bishabosha who is responsible for scala/scala3#18618 and might have some insight

@bishabosha
Copy link
Member

bishabosha commented Oct 14, 2024

You are right that 3.3.0 didn't work with JDK 21, it crashed in a weird way due to the constant pool change - so in 3.4.0 (and backported to LTS) we introduced more explicit reporting of breaking due to failures in reading class files

@SethTisue
Copy link
Member Author

SethTisue commented Nov 11, 2024

@Gedochao @sjrd hoping for your help here. I think this is pretty basic information that we should be providing people

if it feels like I'm asking you to do more work than is reasonable, perhaps we could find a low-effort solution, like filling in some cells to the best of our recollection and figure that if a mistake is ever found, we can fix it then, that kind of thing?

@sjrd
Copy link
Member

sjrd commented Nov 11, 2024

From my tests, Scala 3.3.1 and 3.4.0 both support JDKs up to 23. I did not manage to make them crash, unlike Scala 3.3.0 which definitely fails with JDK 21+.

@SethTisue SethTisue marked this pull request as ready for review November 11, 2024 15:29
@SethTisue
Copy link
Member Author

SethTisue commented Nov 11, 2024

thanks Seb! I'll merge this in a week or so if we haven't heard from Piotr by then. maybe I'll ask at core if the agenda isn't too full

@SethTisue
Copy link
Member Author

Piotr has his hands full right now, so I'm just going to merge this – I'll run it by him at a more opportune time later

@SethTisue SethTisue merged commit 3d17208 into scala:main Nov 13, 2024
1 check passed
@SethTisue SethTisue deleted the jdk-compat-scala-3-lts branch November 13, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants