Avoid launching sbt just to render --version by reading sbt.version directly from project/build.properties in the shell script, batch script, and sbtw wrapper. Tighten launcher integration assertions to verify version output no longer depends on the sbtVersion command output.
Co-authored-by: bitloi <89318445+bitloi@users.noreply.github.com>
The console/consoleQuick REPL loader rejects JDK platform-module
classes: ClasspathFilter's post-check refuses classes whose code
source is a jrt: URL, so a top-down REPL reference to java.sql.* falls
through to the REPL's own classloader, which finds the bytes in the
runner-generated java9-rt-ext jar (via scala.ext.dirs) and dies in
defineClass:
java.lang.SecurityException: Prohibited package name: java.sql
Wrap the REPL parent loader with a fallback that consults
ClassLoader.getPlatformClassLoader (reflectively; absent on JDK 8,
which has no platform loader) only after the existing chain misses,
so project classes keep winning and platform classes resolve instead
of being redefined. Linkage through the classpath loader (a JDBC
driver implementing java.sql.Driver) was already sound: the launcher's
topLoader delegates to the platform loader on JDK 9+; only the
top-down path through ClasspathFilter was broken.
Verified against sbt 1.11.7 (fails) and a patched 1.12.3-SNAPSHOT
(passes) with the original report's repro: java.sql.Timestamp,
a project class extending it, and DriverManager.getConnection with
the postgresql driver, which now reaches the network layer.
The console/* scripted group is added to CI; it was not in any
scripted glob, so the new test (and the pre-existing
console/project-compiler-bridge) never ran.
Fixes#4328 (still reproducible on 1.11.7 before this change).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Since #8678 (sbt 1.12.2), Fork.apply has routed the
connectInput && outputStrategy == StdoutOutput case through a new
JProcess path that calls jpb.inheritIO(). inheritIO ties the child
JVM's stdio to the sbt server JVM's OS-level fd 1/2, bypassing the
Terminal indirection. In server mode (which sbt --client uses),
that indirection is how task output reaches the client terminal — so
the child's stdout/stderr went nowhere observable to the client.
Keep redirectInput(Redirect.INHERIT) so REPL/raw-mode keystrokes
still reach the child (preserving the use case #8678 added), but
leave stdout/stderr as PIPE and pump them to the active terminal's
output/error streams in two daemon threads. The pump threads are
joined after p.waitFor() so all buffered output drains before the
task completes.
The active terminal is captured once on the task thread rather than
re-resolved per-write via the `System.out`/`err` proxies, otherwise a
concurrent terminal swap can route mid-pump bytes to the wrong client
(observed on the CI JDK 8 matrix; the proxy's `activeTerminal.get()`
is evaluated at every write).
Forced scala/scala3 CI to downgrade from sbt 1.12.10 to 1.12.1 (see
scala/scala3#25995).
Diagnosis credit: @mbovel in #9185.
Fixessbt/sbt#9185.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The original fixture pinned
scalaOrganization := "io.github.scala-wasm"
scalaVersion := "3.8.3-RC1-wasm-bin-SNAPSHOT"
and ran compile. The wasm fork never published a release of
scala3-library_3 -- only a snapshot to Sonatype's central-snapshots
repo, which has ~90-day retention. #8732 merged 2026-02-21; the
snapshot was GC'd ~2026-05-22 and develop CI began failing
deterministically.
Fixes#9259.
Co-authored-by: BrianHotopp <brihoto@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resource and JAR atomicity is pushed down into sbt/io 1.12.0-SNAPSHOT
(IO.copyFile, IO.transfer, IO.jar/zip stage to a sibling temp file and
atomic-move into place). Bump sbt's io dependency to consume that.
In Package.makeJar, stop deleting the existing JAR before calling IO.jar.
Atomic IO.jar replaces the destination only after the staged JAR is
complete, so deleting up front would just destroy the last good artifact
on interrupt without changing the failure mode.
Generated-by: Codex (gpt-5.5) and Claude Sonnet 4.6
* Add Test configuration to evictionWarningOptions
* Add Test configuration to default evictionWarningOptions
* Deduplicate eviction errors based on callers.
* Update eviction error test for semantic versioning.
* Group evictions by configuration and update test.
**Problem**
When managedScalaInstance is set to false, we stopped creating
ScalaInstance, but the documentation says the user can
pull in their own dependencies.
**Solution**
Attempt to construct a ScalaInstance from update report
even when managedScalaInstance is set to false.
**Problem**
Running sbt 2.x with JDK 8 produces a confusing "server was not
detected" error because the JDK version check only required JDK 8+
and only ran in the non-native-client path.
**Solution**
Move java_version detection before the native client decision and add
checkJava17ForSbt2 that requires JDK 17+ when sbt major version >= 2.
Fixes#8813
Co-authored-by: Dream <42954461+eureka928@users.noreply.github.com>