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

Build of IgnoreSuite uses the latest class file version supported by the JDK #868

Open
cushon opened this issue Jan 15, 2025 · 0 comments
Open

Comments

@cushon
Copy link
Contributor

cushon commented Jan 15, 2025

When building with newer JDK versions, the class file outputs for Scala files in this project target JDK 8 bytecode, but Java files like ./munit/jvm/src/main/java/munit/IgnoreSuite.java are being built with the default javac flags and use the latest target version supported by the JVM.

Should the build be configured to use a consistent target version for the Java files?

Demo:

$ java -version
openjdk version "23.0.1" 2024-12-05
$ sbt compile
$ javap -v -p ./munit/jvm/target/scala-2.13/classes/munit/IgnoreSuite.class
...
  major version: 67
cushon added a commit to cushon/munit that referenced this issue Jan 15, 2025
This avoids building e.g. IgnoreSuite targeting the latest class file
version supported by the JDK used at build time.

scalameta#868
cushon added a commit to cushon/munit that referenced this issue Jan 15, 2025
This avoids building e.g. IgnoreSuite targeting the latest class file
version supported by the JDK used at build time.

scalameta#868
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

No branches or pull requests

1 participant