Skip to content

chore: study bumping the Java baseline from 17 to 21 - #6890

Draft
monperrus wants to merge 2 commits into
INRIA:masterfrom
monperrus:chore/bump-java-21
Draft

monperrus wants to merge 2 commits into
INRIA:masterfrom
monperrus:chore/bump-java-21

Conversation

@monperrus

@monperrus monperrus commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Bumps Spoon's Java baseline from 17 to 21

Motivation: Java 21 makes virtual threads final (JEP 444), which would give the Spoon pipeline a heap-grown stack for free.

This a candidate alternative to #6882's sized platform thread for fixing #6804 (stack overflow on legal deeply nested expressions, e.g. OpenJDK's DeepStringConcat.java with ~32,000 binary operators). See also @SirYwell's comment on #6882.

Changes

  • spoon-pom/pom.xml: maven.compiler.release / testRelease 17 → 21
  • .github/workflows/tests.yml: drop Java 17 from the matrix, Windows tests on 21
  • flake.nix: default dev shell jdk17 → jdk21 (the jdk17 shell definition stays available)

Refs #6804, #6882

🤖 Generated with agentknit

monperrus and others added 2 commits September 12, 2026 11:43
Study PR, not intended for merge as-is: measure the impact of requiring
Java 21, notably to evaluate whether virtual threads (JEP 444, stable in
21) become a viable alternative for running the Spoon pipeline on a
growable stack (see INRIA#6804, INRIA#6882).

- spoon-pom: maven.compiler.release/testRelease 17 -> 21
- CI: drop Java 17 from the test matrix, Windows tests on 21
- flake.nix: default dev shell is now jdk21

Co-Authored-By: agentknit+k3 <agentknit+k3@monperrus.com>
@monperrus

Copy link
Copy Markdown
Collaborator Author

@SirYwell WDYT? that would be good for virtual threads. 21 is already old at internet time.

@SirYwell

Copy link
Copy Markdown
Collaborator

I'm not sure if the changes are enough like that (especially tests might also need revisiting), but generally I'm not opposed to upgrading. I assume @MartinWitt would also be happy about it.

This branch has not been deployed

No deployments
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