100 Commits
Author SHA1 Message Date
eugene yokota 4700d305cc Merge commit from fork
fix: disable BSP over TCP and gate requests before auth
2026-08-20 23:13:00 -04:00
cdf6b25106 [2.x] fix: Avoid rewriting unchanged plugin descriptors (#9612) (#9624) (#9628)
Only rewrite generated plugin descriptors when their normalized lines change, preserving the descriptor timestamp and downstream cache inputs for unchanged plugin discovery.

Add unit coverage plus direct packageBin and assembly Scripted scenarios. The descriptor regressions fail with the former unconditional write and pass with this change; the packageBin fixture also preserves SBT 2’s existing cache-hit behavior.

Co-authored-by: Dmitrii Naumenko <[email protected]>
Co-authored-by: Codex <[email protected]>
2026-08-19 13:05:17 -04:00
eugene yokota 7115e7c36b [2.x] Update sbtn to 2.0.0-8753a981 (#9630) 2026-08-19 12:53:20 -04:00
eugene yokota 8753a98161 [2.x] fix: sbtn to retry on corrupt active.json (#9617)
**Problem**
sbtn gets stuck when active.json is corrupt.

**Solution**
Delete active.json, and retry.
2026-08-19 02:26:44 -04:00
eugene yokota 6b3d7c6301 [2.x] fix: Fixes cache invalidation on version change (#9471)
**Problem**
packageBin includes version into the file name, which ends up
invalidating the cache.

**Solution**
Define packageInternal, which does not include version in the file name, and used during Compile or Test/compile. Note that publishing and Runtime classpath would continue to use packageBin.
2026-08-19 00:13:59 -04:00
eugene yokota 27c3f035e5 [2.x] feat: Test summary (#9602)
**Problem/Solution**
This extends the idea started with TestRecap, and applies it to
both test success and failures.

1. Existing TestResultLogger trait is extended to handle the summary
   rendering.
2. TestSummary enum is added to control the verbosity via
   commandline option, system property, or a setting.
3. Script test captures the log.
2026-08-17 23:54:32 -04:00
eugene yokota 0ae3c152bd [2.x] fix: Guard diskcache against path traversal (#9605)
**Problem**
There are several places in diskcache where resolve is called
without guards.

**Solution**
This adds guards to prevent path traversal.
2026-08-17 14:09:03 -04:00
eugene yokota c0ffc9dc60 [2.x] test: Add a regression test for incremental test (#9608)
**Problem/Solution**
This tests incremental test's stability post-version bump.
2026-08-17 00:07:28 -04:00
eugene yokota a94ef44178 [2.x] fix: Forward build.sbt compilation errors to logger (#9599)
**Problem**
1. build.sbt was compiled with console reporter,
   so we couldn't capture the error.
2. Another problem was that reload deleted global log
   so we couldn't get to the previous load failure.

**Solution**
1. This forwards build.sbt compilation errors to the logger.
2. This retains the failed loading log.
3. Using the facility above, this adds negative test for loading.
2026-08-14 08:51:51 -04:00
eugene yokota c717609ab2 [2.x] doc: Start sbt 2.1.0 release note (#9595) 2026-08-13 17:00:17 -04:00
eugene yokota b23891a643 Merge pull request #9574 from anatoliykmetyuk/br/fix-9343-export-pipelining
Ensure Java artifacts are exposed when usePipelining is set to true
2026-08-10 15:49:36 -04:00
eugene yokota 90582a3438 [2.x] fix: Fixes publishing with sbt-pgp (#9533)
**Problem**
Ivyless publishing doesn't work with sbt-pgp.

**Solution**
This refactors the ivyless publishing code and revives publishOrSkip, which is called by the plugin.
Instead of overriding publish task, implement proper PublisherInterface.
2026-08-09 00:37:25 -04:00
eugene yokota b338dfcec2 [2.x] ci: Remove cla-checker v1 (#9570) 2026-08-07 14:48:15 -04:00
eugene yokota 6365a07230 Merge commit from fork
[2.x] fix: Gate LSP calls behind auth
2026-08-06 23:04:54 -04:00
eugene yokota b109068711 [2.x] fix: Preserve file timestamp in local diskcache (#9559)
**Problem**
In theory, we shouldn't have to care about the timestamps,
but for local optimization it's still a useful key for caching.
Currently local Analysis cache gets invalidated after
syncBlob replaces the Analysis file with a symlink.

**Solution**
This preserves the original timestamp when copying files to
the local diskcache.
2026-08-06 20:51:23 -04:00
Eugene Yokota fb233e9411 [2.x] Retire textDocument/definition 2026-08-06 14:02:51 -04:00
Eugene Yokota e6ac4ecffc [2.x] fix: Gate LSP calls behind auth
**Problem**
Some custom LSP calls do not check initialize-handshake,
which over TCP includes token-based authentication.

**Solution**
This adds checkAuthenticated check around sbt/exec etc.
2026-08-06 14:02:51 -04:00
eugene yokota 380ff6b569 [2.x] test: Add regression test for resource reading (#9552) 2026-08-04 15:03:25 -04:00
eugene yokota 5d7dbdb427 [2.x] sbtn 2.0.0-731e6666 (#9545) 2026-08-03 03:38:20 -04:00
eugene yokota 67faa44a1d [2.x] test: Add test for Test/baseDirectory (#9544) 2026-08-03 03:32:19 -04:00
eugene yokota 731e666603 [2.x] fix: Fixes AccessDeniedException issue on Windows (#9538)
**Problem**
When test classloader holds on to the JAR file, Windows gets
AccessDefinedException on packageBin.

**Solution**
Flip the default to close the test class loader.
2026-08-03 00:24:41 -04:00
eugene yokota bb141109e1 Merge pull request #9523 from hoangmaihuy/perf/update-report-interning
[2.x] perf: Intern `UpdateReport` values
2026-07-31 00:58:19 -04:00
eugene yokota 130ee707b9 [2.x] fix: Fixes forked run baseDirectory, take 2 (#9531)
**Problem**
Forked run baseDirectory was changed to current directory in sbt 2.0.4,
which on its own is fine, but it doesn't respect
Compile / run / baseDirectory.

**Solution**
This fixes that.
2026-07-31 00:04:22 -04:00
eugene yokota 67924298f2 [2.x] fix: Fixes sbtn stdin race condition (#9521)
**Problem**
There's a race condition between per-byte readSystemIn notification
and one-byte-read thread lifecycle.

Note: One-byte-read thread was introduced as a solution to the problem
that switching the terminal between raw and canonical mode cannot happen
if it's blocked by read.

**Solution**
This eliminates the thread lifecycle issue by keeping the thread alive
throughout the lifecycle of sbtn itself.
read is still called on demand by the server readSystemIn notification.
2026-07-27 19:52:30 -04:00
eugene yokota ab340b02bd [2.x] fix: Fixes a/build.sbt leakage (#9519)
**Problem**
subproject build.sbt like a/build.sbt leaks to siblings.

**Solution**
Don't forward freshly computed common settings unless
the build.sbt is at root.
2026-07-27 15:43:20 -04:00
eugene yokota b130cbcd05 [2.x] Use sbt 2.0.4 (#9512) 2026-07-27 00:02:28 -04:00
eugene yokota 017ee92527 [2.x] Zinc 2.0.4 (#9508) 2026-07-26 14:45:03 -04:00
eugene yokota f6cb28bd22 [2.x] fix: Fixes scalaCompilerBridgeBin (#9506)
**Problem/Solution**
Fixes scalaCompilerBridgeBin leaking project names
across different builds.
2026-07-26 14:04:04 -04:00
eugene yokota f59c12559f [2.x] ci: Fix publishLocalBin (#9505)
**Problem/Solution**
dummyDoc was not cached properly.
2026-07-26 02:08:54 -04:00
eugene yokota 9f0a459f81 Merge pull request #9502 from eed3si9n/wip/grpc
[2.x] fix: Intern GrpcActionCacheStore
2026-07-26 01:01:27 -04:00
eugene yokota b81265bdb5 [2.x] sbtn 2.0.0-a0c4773a (#9503) 2026-07-26 00:57:19 -04:00
Eugene Yokota b98c443b5c Add remote-cache test 2026-07-25 23:27:49 -04:00
Eugene Yokota 65e8f34696 [2.x] fix: Intern GrpcActionCacheStore
**Problem**
GrpcActionCacheStore gets recreated per reload.

**Solution**
This interns GrpcActionCacheStore based on the parameters.
2026-07-25 22:38:32 -04:00
eugene yokota a0c4773a73 [2.x] fix: Skip checksum generation for asc file, take 2 (#9499)
**Problem**
Checksums are still generated for asc file.
1. localStaging is a file repo, which was not handled
2. It was checking Artifact name, not the file name

**Solution**
This fixes both.
2026-07-24 16:42:04 -04:00
eugene yokota 0a0d6f67df [2.x] Zinc 2.0.3 (#9498) 2026-07-24 15:53:41 -04:00
eugene yokota 2e303787a5 [2.x] Allow opt-out of transient warning (#9437)
**Problem**
We want to opt out of the transient key warning.

**Solution**
This implements an optout via nowarn annotation.
2026-07-24 01:42:06 -04:00
eugene yokota 3520576a54 [2.x] clean task cleans sona-staging (#9479)
**Problem/Solution**
1. clean task cleans sona-staging directory.
2. cleanFull calls clean task.
2026-07-23 22:30:16 -04:00
eugene yokota fc3666586a [2.x] fix: Fixes common settings with extraProjects (#9495)
**Problem**
The presence of extraProjects broke common settings.

**Solution**
This fixes it by passing finalRoot.commonSettings.
2026-07-23 20:16:54 -04:00
eugene yokota d4e8fb583c [2.x] Zinc 2.0.2 (#9489) 2026-07-23 02:47:12 -04:00
eugene yokota 3f073b0059 [2.x] Use JDK's Unix domain socket for bootserver (#9427)
Use JDK's Unix domain socket for bootserver.
2026-07-22 23:57:13 -04:00
eugene yokota c352da8cf9 [2.x] ci: Use --server (#9483) 2026-07-20 16:34:10 -04:00
eugene yokota 204468b84c [2.x] fix: Fixes stale resources in test (#9469)
**Problem**
sbt 2.x currently constructs the test classloader using symlinks
to the JARs in CAS (content-addressable storage).
This causes issues because JVM apparently caches opened JAR files by path,
and since the symlink itself doesn't change it could end up
serving stale resource files.

**Solution**
We can workaround this issue by resolving the symlinks to the real path.
2026-07-18 09:24:09 -04:00
eugene yokota b76ac09d44 [2.x] Bump version number (#9470) 2026-07-17 18:53:28 -04:00
eugene yokota e68edc51a3 [2.x] sjson-new 0.15.1 (#9458) 2026-07-16 01:02:56 -04:00
eugene yokota 427b444ba5 [2.x] Ivy 2.3.0-sbt-f686954b0021a5c3245766ced0cdaeca8ba2fd7a (#9457) 2026-07-16 01:02:39 -04:00
eugene yokota 9f83cb1ef0 [2.x] sbtn 2.0.0-b4d628dd (#9443) 2026-07-12 21:07:14 -04:00
eugene yokota d3141f1391 [2.x] scala-dyn-version working again (#9438) 2026-07-12 01:19:22 -04:00
eugene yokota 898e79fe86 [2.x] fix: Fixes shutdownall (#9435)
**Problem**
sbt shutdown all requires --server.

**Solution**
Fix it so it doesn't need extra flag.
2026-07-11 16:04:01 -04:00
eugene yokota 257fb50e4c [2.x] ipcsocket 1.8.0 (#9433) 2026-07-11 15:01:20 -04:00
eugene yokota 45a4e88adb [2.x] Tweak server startup message (#9429)
**Problem/Solution**
sbt 2.x uses client-server by default.
This makes the message a bit more obvious when the build is using a client.
2026-07-11 12:51:47 -04:00
eugene yokota 209867c7db [2.x] ivy 2.3.0-sbt-939a7ea82f140cdb1f51dc404bb43e00a8c43b83 (#9423) 2026-07-10 17:17:47 -04:00
eugene yokota 4edd5521c6 Merge pull request #9420 from eed3si9n/wip/url
[2.x] Deprecate url(...) and Resolver.url(...) in favor of uri(...)
2026-07-10 18:54:57 +02:00
Eugene Yokota e1dad1a057 [2.x] Mark project/scala-dyn-version as pending
Scala 3.9.0-RC2 is missing scala3-directives-parser_3.
2026-07-10 12:23:58 -04:00
Eugene Yokota 74f76e5445 [2.x] Deprecate Resolver.url
This adds Resolver.uri instead.
2026-07-10 11:46:26 -04:00
Eugene Yokota b804634c4e [2.x] Deprecate url(...)
**Problem**
In sbt 2.x url already reaturns URI, but it's somewhat confusing.

**Solution**
Deprecate it instead.
2026-07-10 11:10:56 -04:00
eugene yokota c4e5e8654e [2.x] Mark log-related keys transient (#9407) 2026-07-03 10:40:10 +02:00
eugene yokota c8312cdd88 [2.x] fix: Fixes WinGet release config (#9404) 2026-06-30 21:27:56 -04:00
eugene yokota 69fa196803 [2.x] fix: Fixes sbt runner openbsd support (#9394)
**Problem**
sbt runner script defaults to sbtn, even on the operating system
where sbtn is not available.

**Solution**
This fallbacks to the jvm client.
2026-06-28 15:30:54 -04:00
eugene yokota 0ef972706c [2.x] fix: Fixes global plugin loading (#9391)
**Problem**
Global plugin loading doesn't work.

**Solution**
1. Use ModuleID from to supply the location of global-plugin module.
2. Update pluginData with the global plugin classpath.
2026-06-28 14:57:18 -04:00
eugene yokotaandJason Zaugg af37f1f765 [2.x] Update Coursier to version 2.1.25-M26 (#9393)
Includes performance improvements.

https://github.com/coursier/coursier/compare/v2.1.25-M25...v2.1.25-M26

Co-authored-by: Jason Zaugg <[email protected]>
2026-06-27 16:36:14 -04:00
eugene yokota 3dd7c92979 [2.x] Add devcontainer (#9392) 2026-06-27 15:21:49 -04:00
eugene yokota b1392daa60 [2.x] test: Refactor global plugin test (#9380) 2026-06-27 00:13:54 -04:00
eugene yokota 128697c73b [2.x] ci: Modify bug report template for custom labels (#9384)
Updated bug report template to allow custom labels.
2026-06-27 00:13:34 -04:00
eugene yokota f468735c9f [2.x] sbtn 2.0.0-2932685e (#9363) 2026-06-21 14:41:45 -04:00
eugene yokota 2932685ed2 [2.x] ipcsocket 1.7.0 (#9361) 2026-06-21 01:31:40 -04:00
eugene yokota d8929ad8d7 [2.x] ci: sbt-salad-days (#9360) 2026-06-21 01:08:31 -04:00
eugene yokota 183ed46375 [2.x] sbtn 2.0.0-f0d2fae4 (#9333) 2026-06-14 01:32:02 -04:00
eugene yokota bb981d7e02 [2.x] fix: Fixes console / javaOptions (#9322)
**Problem**
console / javaOptions is ignored.

**Solution**
1. This enables forked console even for sbt --server mode.
2. This includes console / javaOptions to the forkOptions.
2026-06-10 12:23:43 -04:00
eugene yokota 75f1d15a81 [2.x] fix: Fixes chunked upload/download (#9318)
**Problem**
Chunked upload/download doesn't work.

**Solution**
1. This fixes the SERVICE_NAME shading.
2. This fixes the resource name.
3. This fixes download stream processing.
2026-06-09 21:48:07 +09:00
eugene yokota 81ecab120a [2.x] fix: Fixes cross build caching (#9305)
**Problem**
We can get into a situation where CompileInputs2 become identical for Scala 3.x and 2.13, which breaks the recovery of Zinc analysis.

**Solution**
This includes Scala version into CompileInput2 to workaround this issue.
2026-06-07 23:49:02 -04:00
eugene yokota b9e98b9e8a [2.x] Update to Scala 3.8.4 (#9302) 2026-06-07 20:52:13 -04:00
eugene yokota ac320c7fd0 [2.x] fix: ByteStream chunked upload/download (#9298)
**Problem**

BatchUpdateBlobsRequest suffers from gRPC's message size limitation.

**Solution**

For larger files, we switch to using the ByteStream API, chunked to 1MB at a time.
2026-06-07 15:17:20 -04:00
eugene yokota fcd247e7c6 [2.x] fix: Avoid updateFull (#9290)
**Problem**
updateFull is called in no-op compile.

**Solution**
Avoid it for the default dependency mode.
2026-06-01 07:00:21 -04:00
eugene yokota 25cb2f3e60 [2.x] fix: Add warning about trainsient key (#9288)
**Problem**
Transient key is silently excluded from caching.

**Solution**
Add a warning.
2026-06-01 06:29:44 -04:00
eugene yokota b34323c39e Merge pull request #9282 from eed3si9n/wip/bump-sjsonnew
[2.x] sjson-new 0.15.0 + Contraband 0.9.0
2026-06-01 02:20:16 -04:00
eugene yokota 619e034ec9 [2.x] perf: Improve incremental test stamper (#9257)
**Problem**
Incremental stamper is still causing perf issue.

**Solution**
This further avoids SHA-256 calls to calculate the stamp.
2026-06-01 02:17:39 -04:00
Eugene Yokota f327ef14d0 [2.x] sjson-new 0.15.0 2026-06-01 01:52:50 -04:00
Eugene Yokota c1219702d5 Contraband 0.9.0 2026-06-01 01:52:50 -04:00
eugene yokota 5dd886e243 Merge pull request #9278 from eed3si9n/wip/access
[2.x] Reimplement FarmHash
2026-05-31 18:19:28 -04:00
Eugene Yokota 0bab2066df [2.x] Reimplement FarmHash
**Problem**
sbtn and server uses FarmHash.

**Solution**
This reimplements FarmHash using Scala.
2026-05-31 16:07:28 -04:00
Eugene Yokota e8a358373c Refactor VarHandle to Access typeclass 2026-05-31 16:07:28 -04:00
eugene yokota 315202181c [2.x] ci: Scalafmt 3.11.1 (#9279)
Apply Scalafmt
2026-05-31 16:01:15 -04:00
eugene yokota ffa8c14ca6 [2.x] Migrate FarmHash usage to xxhash64 (#9267)
Problem
ZAHa, which we use for FarmHash, uses Unsafe.

Solution
This ports xxhash64 to Scala.
2026-05-30 19:14:53 -04:00
eugene yokota 2488e973db [2.x] Update sbtn to 2.0.0-RC14 for timeout fix (#9240) 2026-05-17 14:12:57 -04:00
eugene yokota df038e78a7 [2.x] fix: Catch timeout on sbtn exit (#9239)
**Problem**
sbtn tries to wait on a thread on exit, and times out.

**Solution**
Shorten the timeout and catch it.
2026-05-17 05:44:40 -04:00
eugene yokota 46f0b89642 [2.x] Add runner support for execution log (#9237)
**Problem/Solution**
This adds runner commandline option experimental_execution_log.
2026-05-17 03:01:12 -04:00
eugene yokota ae87d1a196 Merge pull request #9232 from eed3si9n/wip/bump-coursier
[2.x] Update to lm-coursier 2.1.25-M25
2026-05-16 04:59:06 -04:00
Eugene Yokota f8504f2a4d Revert "[2.x] fix: Skip Conflict when dependency relocations form a cycle (#8919)"
This reverts commit b24ecddbd6.
2026-05-16 04:25:37 -04:00
Eugene Yokota ade9885ce6 [2.x] Update to lm-coursier 2.1.25-M25 2026-05-16 04:24:11 -04:00
eugene yokota 57495c28dc [2.x] fix: Include test arg into hash (#9222)
**Problem**
test -- foo passes on MUnit, allowing failing tests to be validated.

**Solution**
Include test args into the cache input.
2026-05-16 04:12:33 -04:00
eugene yokota b3d29b6bac [2.x] Zinc 2.0.0-M18 (#9219) 2026-05-14 23:50:10 -04:00
eugene yokota d27c6a46df [2.x] fix: Invalidate on JDK version (#9216)
**Problem**
sbt 2.x caching doesn't invalidate on JDK version.

**Solution**
Invalidate on JDK version.
2026-05-14 03:13:16 -04:00
eugene yokota 7681cb3980 [2.x] feat: Execution log (#9203)
**Problem**
We need some tooling to debug caching issues.

**Solution**
This adds an exeprimental execution log support,
which shows input and output of cached tasks.
2026-05-14 02:27:38 -04:00
eugene yokota 4630ddfb38 Merge pull request #9211 from xuwei-k/nio-Files-readString 2026-05-13 13:12:45 -07:00
eugene yokota 49f19feef1 Merge pull request #9207 from eed3si9n/wip/bump-zinc
[2.x] Cache analysis using file last modified
2026-05-11 10:20:27 -04:00
Eugene Yokota e69e23aae1 Remove tests that checks for the iteration 2026-05-11 05:10:07 -04:00
Eugene Yokota 566f888045 [2.x] Cache analysis using file last modified
**Problem**
Current MixedAnalyzingCompiler analysis cache caches using the last write,
assuming all writing happens via it. However, this doesn't work with
sbt 2.x caching system where the gz file under it can switch.

**Solution**
This switches to using caffeine caching, which includes file size
and file timestamp for local analysis caching.
2026-05-11 04:29:28 -04:00
eugene yokota c491f035f8 [2.x] test: Port tests to use lm-coursier (#9205)
**Problem**
Some tests are failing.

**Solution**

* Port EvictionErrorSpec to lm-coursier
* Port EvictionWarningSpec to lm-coursier
* Port InclExclSpec to lm-coursier
* Port ZincComponentCompilerSpec to lm-coursier
* Apparently we still need lmIvy
2026-05-10 04:40:15 -04:00
eugene yokota 59c007d6a4 [2.x] test: Add move-file test (#9197)
**Problem**
Moving files around seems to break compile task.
2026-05-07 11:23:22 -04:00
eugene yokota 63d5a1103b [2.x] Improve --help (#9180)
**Problem**
Some runner options are not documented in --help.

**Solution**
Fix it.
2026-05-03 21:24:16 -04:00