Skip to content

feat: Support older java versions, preserving functionality#51

Merged
julienvincent merged 1 commit into
kepler16:masterfrom
ovistoica:support-older-java-versions
Jun 23, 2026
Merged

feat: Support older java versions, preserving functionality#51
julienvincent merged 1 commit into
kepler16:masterfrom
ovistoica:support-older-java-versions

Conversation

@ovistoica

Copy link
Copy Markdown
Contributor

We are using java 17 on our build & release VMs which breaks using kmono due to reliance on virtual threads. With this change, virtual threads are only used on Java 21+. As per the comment, using this logic instead of reflection to ensure GraalVM still compiles the cli.

Tested both cli compilation and running on Java 17 and now all work.

Happy to do any further changes if you need it!

@julienvincent julienvincent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small nit, but happen to merge otherwise

Comment on lines +9 to +10
;; Using Runtime/version instead of reflection for VirtualThreadExecutor to
;; ensure GraalVM compilation works correctly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems a bit pointless? I'm not really sure what it's trying to say, can you remove?

@ovistoica ovistoica Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically I was trying to say I didn't use sth like this

(def virtual-threads-supported?
  (try
    (Class/forName "java.lang.Thread$Builder$OfVirtual")
    true
    (catch ClassNotFoundException _
      false)))

Because I think it wouldn't have went well with GraalVM compilation. I'll remove it anyway

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@ovistoica ovistoica force-pushed the support-older-java-versions branch from e08192c to 93dce73 Compare June 23, 2026 03:00
@julienvincent julienvincent merged commit 3a5bd2c into kepler16:master Jun 23, 2026
8 checks passed
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.

2 participants