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

Scalac can't generate 55(jvm11) bytecode version #12588

Closed
chucheng92 opened this issue May 8, 2022 · 6 comments
Closed

Scalac can't generate 55(jvm11) bytecode version #12588

chucheng92 opened this issue May 8, 2022 · 6 comments
Labels
Milestone

Comments

@chucheng92
Copy link

chucheng92 commented May 8, 2022

Reproduction steps

I try to use scalac compile (environment bounding jdk is jdk11) scala source code, but the generate bytecode version always be 52(jdk8). My scala version is 2.12.15. I notice that scalac help show target:

-target:<target> Target platform for object files. All JVM 1.5 - 1.7 targets are deprecated. (jvm-1.5,jvm-1.6,jvm-1.7,[jvm-1.8])

so, my question is scala-2.12 now whether didnot support generate jvm-11(55) or higher bytecode ? whether user must use 2.13 or higher version?

Problem

didnot support generate jvm-11 (55) or higher bytecode.

@chucheng92 chucheng92 changed the title How to use scalac compile 55(jvm11) bytecode version Scalac cant generate 55(jvm11) bytecode version May 8, 2022
@chucheng92 chucheng92 changed the title Scalac cant generate 55(jvm11) bytecode version Scalac can't generate 55(jvm11) bytecode version May 8, 2022
@som-snytt
Copy link

I don't know, I thought the getting started page had guidance on platform support, but now I can't find it again, so I'm just frustrated again with the docs.

The output of scalac -help is definitive.

There is a newer PR that says to prefer -release scala/scala#9982 which they will hopefully merge in 2.13.9. That says that if you're targeting platform N you probably also intend to target its API.

@SethTisue
Copy link
Member

scala/scala#9916 and scala/scala#10000 will be released in Scala 2.12.16, which we may publish as soon as this week.

@SethTisue SethTisue added this to the 2.12.16 milestone May 9, 2022
@SethTisue
Copy link
Member

If you want to test this support now, you could try a nightly build: https://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-or-scala-cli-to-use-a-nightly-build-of-scala-2-12-or-2-13

@SethTisue SethTisue added the jdk11 label May 9, 2022
@chucheng92
Copy link
Author

@SethTisue OK, Thanks.

@chucheng92
Copy link
Author

chucheng92 commented Jun 8, 2022

@SethTisue Hi, the background is that apache flink community discuss upgrade their scala version to 2.12.x. I suggested 2.12.16 because 2.12.16 backport jvm11,jvm17 target jvm functionality, and the flink need this functionality. So i wonder what's the timeline of 2.12.16 released version? I have just noticed a v2.12.16 tag.

@SethTisue
Copy link
Member

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

No branches or pull requests

3 participants