Skip to content

JVM 8 #97

Closed
Closed

Description

@wilburx9

So we're migrating Okio from Burst to TestBalloon in lysine-dev/okio#1865, and apparently, the minimum supported version of the JVM is 8. I am curiously to why and if v8 could be possibbly supported

Activity

  1. wilburx9 commented on Sep 1, 2026

    @wilburx9
    Author

    If this is something you'd like to support, I can take a stab at it.

  2. OliverO2 commented on Sep 3, 2026

    @OliverO2
    Collaborator

    Thank you for bringing this up! Technically, TestBalloon can support Java 8 with some minor tweaks. I have a working prototype locally with all tests green.

    I have one question about the migration path. @martinbonnin states in these guidelines:

    Note that targeting Java 8 became deprecated in Java 25. Targeting a higher version of Java might become the default soon.

    So does it make sense to go back to Java 8 as the minimum target now when it looks like it might not be sustainable? But that would be the same story for Okio, so I wonder how you're planning to handle the scenario.

  3. martinbonnin commented on Sep 3, 2026

    @martinbonnin
    Contributor

    It's always a tradeoff between modern tools and compatibility. As long as the latest Javac supports Java8, the most compatible choice is still 8.

    I suspect Javac will probably keep Java8 support around for some time since it's soooo ubiquitously used.

    For the record, the policy for -source and -target is at https://openjdk.org/jeps/182 (tracking issue).

    -source/-target 1.7 was removed in Java 20.

    No more indication about the removal of -source/-target 1.8 but according to the policy, that could happen anytime soon

  4. OliverO2 commented on Sep 3, 2026

    @OliverO2
    Collaborator

    I couldn't find the source explaining the deprecation of the Java 8 target. For TestBalloon (and others) the main point that matters is that we don't accidentally exclude Java >25 users. I understand that this is not the case, right?

  5. JakeWharton commented on Sep 3, 2026

    @JakeWharton

    No, lowering compatibility will never exclude a newer JDK. That warning is for javac producing new bytecode, not consuming it. You can still run a library compiled against Java 1.0 with JDK 26 even though it can't produce Java 1.0 bytecode.

  6. OliverO2 commented on Sep 3, 2026

    @OliverO2
    Collaborator

    So then let's just do it. The Java 8 support sits on top of a major refactoring adding support for multiple KGP versions (required for configuration changes in Kotlin 2.4.20 and above). I'd suggest to

    • release 1.1.0 today (still with JDK 11 minimum),
    • release 1.2.0-Beta1 with the new Gradle plugin structure and JDK 8 minimum over the weekend.

    Would that work for you?

  7. JakeWharton commented on Sep 3, 2026

    @JakeWharton

    Yep! Thanks!

  8. self-assigned this
    on Sep 3, 2026
  9. added
    Feature 💡
    on Sep 3, 2026
  10. added this to the Framework 1.2.0 milestone on Sep 3, 2026
  11. OliverO2 commented on Sep 7, 2026

    @OliverO2
    Collaborator

    Addressed in b952b59, released in 1.2.0-Beta1.

  12. OliverO2 commented on Sep 17, 2026

    @OliverO2
    Collaborator

    I wonder whether the JVM 8 downgrading of TestBalloon is actually effective, because TestBalloon's transitive JUnit Platform dependencies like junit-platform-commons-1.13.4.jar still target class file version 53.0 (Java 9).

    In addition, Okio depends on the newer version junit-platform-commons-1.14.4.jar which targets same class file version 53.0 (Java 9). Also, in RealBufferedSource it overrides java.io.InputStream#transferTo which is documented as @since 9+.

  13. JakeWharton commented on Sep 18, 2026

    @JakeWharton

    We override it but without the annotation specifically because we don't require Java 9.

  14. OliverO2 commented on Sep 18, 2026

    @OliverO2
    Collaborator

    Any idea why the junit-platform-commons-1.14.4 test dependency doesn't hurt, but the TestBalloon 1.1 one did?

  15. OliverO2 commented on Sep 18, 2026

    @OliverO2
    Collaborator

    A possible cause could be that in the JUnit Platform case, Tapmoc indicates that only the module-info.class files are affected, not the regular ones:

    w: .../org.junit.platform/junit-platform-commons/1.13.4/8f63c7ed05b473d95cc63d1082054d7bfcf9c0e5/junit-platform-commons-1.13.4.jar:module-info.class targets class file version 53.0 (Java 9) which is newer than supported <= 52 (Java 8).
    w: .../org.junit.platform/junit-platform-engine/1.13.4/cdd49063ae6e25494d1a9a08f4a9ab5de2b73bcb/junit-platform-engine-1.13.4.jar:module-info.class targets class file version 53.0 (Java 9) which is newer than supported <= 52 (Java 8).
    w: .../org.opentest4j/opentest4j/1.3.0/152ea56b3a72f655d4fd677fc0ef2596c3dd5e6e/opentest4j-1.3.0.jar:module-info.class targets class file version 53.0 (Java 9) which is newer than supported <= 52 (Java 8).
    
  16. martinbonnin commented on Sep 21, 2026

    @martinbonnin
    Contributor

    A possible cause could be that in the JUnit Platform case, Tapmoc indicates that only the module-info.class files are affected, not the regular ones

    Tapmoc doesn't parse multi-release jars. I have opened a follow up issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Feature 💡

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions