Skip to content

[2.x] feat: Forked compilation#8584

Open
eed3si9n wants to merge 3 commits intosbt:developfrom
eed3si9n:wip/worker2
Open

[2.x] feat: Forked compilation#8584
eed3si9n wants to merge 3 commits intosbt:developfrom
eed3si9n:wip/worker2

Conversation

@eed3si9n
Copy link
Copy Markdown
Member

Fixes #887

Problem

Currently Zinc runs in the same process as the sbt server, which means that the JDK/Java version of the build artifact gets tied to the JDK/Java version used by sbt itself.

Solution

This implements a command-line interface for Zinc, which can be invoked via the worker process.

  1. This can be used to compile using JDK 25, if Zinc works on JDK 25.
  2. When we upgrade to JDK 17, we can downgrade the compilation to use the real JDK 8, if Zinc itself it compiled with --release 8.

**Problem**
Currently Zinc runs in the same process as the sbt server,
which means that the JDK/Java version of the build artifact gets
tied to the JDK/Java version used by sbt itself.

**Solution**
This implements a command-line interface for Zinc,
which can be invoked via the worker process.

1. This can be used to compile using JDK 25, if Zinc works on JDK 25.
2. When we upgrade to JDK 17, we can downgrade the compilation to use
   the real JDK 8, if Zinc itself it compiled with --release 8.
@eed3si9n eed3si9n mentioned this pull request Jan 21, 2026
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.

Support compiling with a newer JDK version than the one running sbt

1 participant