Commit Graph

18053 Commits

Author SHA1 Message Date
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
kenji yoshida eabfe1b5e8
[2.x] optimize InterfaceUtil (#9223) 2026-05-16 04:15:40 -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
BrianHotopp 68dde13fdc
[2.x] feat: Print cross-project test failure recap at end of aggregated run (#9214)
Fixes #2998

When test is run at the prompt in a multi-project build,
sbt aggregates <proj>/test across subprojects. Each subproject's
TestResultLogger emits its own pass/fail summary inline, but the
aggregation layer never restated which projects failed. The final
"sbt.TestsFailedException" line surfaced no project names or failing
test classes, so on CI users had to scrollback-grep through thousands
of log lines to find what broke.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 15:41:39 -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
kenji yoshida 56cdef09f7
[2.x] refactor: Use InputStream.transferTo (#9212) 2026-05-14 00:36:20 -04:00
eugene yokota 4630ddfb38
Merge pull request #9211 from xuwei-k/nio-Files-readString 2026-05-13 13:12:45 -07:00
xuwei-k 04d9f36414 Use Files.readString instead of readAllBytes 2026-05-13 21:21:18 +09:00
kenji yoshida 00bd61d411
Add definedTestNames test (#9210) 2026-05-11 20:01:59 -04: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
kenji yoshida 412801fc54
[2.x] refactor: Use scala.jdk.OptionConverters instead of JavaInterfaceUtil (#9200) 2026-05-10 00:58:24 -04:00
kenji yoshida 76992ed3f6
[2.x] test: Enable run/fork-loader scripted test (#9199) 2026-05-08 01:00:08 -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
Anatolii Kmetiuk 1f151ad6e3
[2.x] Fix #9190: Ensure resources are copied atomically (#9193)
Bumps io to released 1.12.0 which contains the atomic-write changes
to IO.copyFile, IO.transfer(InputStream, File), and IO.jar/zip.
ActionCacheStore.putBlob now uses IO.transfer instead of duplicating
staging logic.
2026-05-07 01:22:22 -04:00
kenji yoshida 0638907349
[2.x] test: Enable actions/eval-is-safe-and-sound scripted test (#9192) 2026-05-06 20:29:06 -04:00
kenji yoshida f4ae966a22
[2.x] test: Enable project/source-plugins scripted test (#9191) 2026-05-06 16:02:40 -04:00
kenji yoshida 6b39acc892
[2.x] ci: Fix warnings in launcherPackage sub project (#9188) 2026-05-05 00:18:16 -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
eugene yokota 0de038e20b
[2.x] sjson-new 0.14.0 (#9177) 2026-05-03 16:50:51 -04:00
kenji yoshida 21403eeefc
[2.x] Add ForkOptions.connectionTimeout (#9172)
---------

Co-authored-by: Eugene Yokota <eed3si9n@gmail.com>
2026-05-03 13:51:09 -04:00
kenji yoshida 2dbc85ffcf
[2.x] ci: Avoid deprecated replaceAllLiterally (#9173)
- b4aa12d2b0
- https://github.com/scala/scala/blob/v2.12.21/src/library/scala/collection/immutable/StringLike.scala#L177-L184
- https://github.com/scala/scala3/blob/3.8.2/library/src/scala/collection/StringOps.scala#L746-L747
2026-05-03 12:40:44 -04:00
kenji yoshida 590dbbacb8
Avoid infix syntax in build files (#9175) 2026-05-03 12:40:00 -04:00
eugene yokota 4847f31219
Merge pull request #9176 from xuwei-k/source-3-7-option
[2.x] Remove "-source:3.7" option
2026-05-03 12:39:10 -04:00
eugene yokota 3bef48d366
Merge pull request #9174 from xuwei-k/project-Utils-unused
[2.x] Remove unused code in `project/Utils.scala`
2026-05-03 12:38:44 -04:00
xuwei-k a377790ed7 Remove "-source:3.7" option 2026-05-03 21:02:56 +09:00
xuwei-k 871706bf83 Remove unused code in project/Utils.scala 2026-05-03 16:53:26 +09:00
eugene yokota 5586488f6c
[2.x] fix: Adjust the forked test classpath (#9170)
**Problem**
We can't test WorkerMain using forked test.

**Solution**
Allow WorkerMain to be shadowed.
2026-05-03 02:36:00 -04:00
eugene yokota 4ec3a753e7
[2.x] fix: Fix build.sbt file loading in subdirs (#9165)
**Problem**
Projects defined in subdirectory build.sbt files are
not correctly resolved to the base directory relative to the file.

**Solution**
Call resolveBase.
2026-05-02 21:17:55 -04:00
Matt Dziuban 5757955fc7
[2.x] Fix console output not appearing with bgRun and run / fork := true (#9166)
Bug 1: bgRun forks with inheritIO() instead of LoggedOutput

bgRunTask / bgRunMainTask resolve their fork options via (run / forkOptions), which inherits run / connectInput := true. That has two downstream consequences:

1. ForkRun.configLogged (in run/src/main/scala/sbt/Run.scala) skips installing OutputStrategy.LoggedOutput(log) whenever config.connectInput == true.
2. Fork.apply (in run/src/main/scala/sbt/Fork.scala) sees connectInput && outputStrategy == StdoutOutput and takes the interactiveFork path, which calls jpb.inheritIO().

Bug 2: Background-job log relay drops messages after the spawning task ends

Even after Bug 1 is fixed, LoggedOutput routes the forked process's stdout into the background ManagedLogger, whose appenders include a shared RelayAppender. The relay calls CommandExchange.logMessage(event), which uses isChannelOwner(c) to pick the target channel.
2026-05-02 14:04:10 -04:00
kenji yoshida 0af7c2f4a6
[2.x] test: Add more ClassLoaderLayeringStrategy.Raw test (#9163) 2026-05-01 00:33:09 -04:00
kenji yoshida 71a5ad6448
[2.x] test: Add javaagent test (#9164) 2026-05-01 00:29:16 -04:00
eugene yokota 4a02167fa4
[2.x] feat: ClassLoaderStrategy.Raw (#9161)
**Problem**
In sbt 2.x, forking still creates layered classloader in the worker process,
which doesn't work for some tests.

**Solution**
This provides an escape hatch to emulate the sbt 1.x semantics of
using the system classpath for testing.
2026-04-30 12:35:30 -04:00
kenji yoshida b3d16be556
[2.x] fix: Fix error with "-language:postfixOps" (#9151) 2026-04-29 13:21:26 -04:00
kenji yoshida ddd888dc42
[2.x] Remove duplicate packageSrc/mappings (#9156) 2026-04-29 08:58:36 -04:00
kenji yoshida dd1eb78e8a
Remove unnecessary code in build.sbt (#9154) 2026-04-29 08:56:08 -04:00
kenji yoshida 2893bff7ca
[2.x] ci: Filter NOTICE file (#9155) 2026-04-29 08:45:08 -04:00
kenji yoshida 01fbc474f1
[2.x] ci: Avoid infix syntax in build files (#9157) 2026-04-29 08:41:54 -04:00
eugene yokota 0968cbf7ef
[2.x] perf: Use bytecodeHash for incremental test (#9146)
**Problem**
There's perf issue building ClassStamp for the incremental test.

**Solution**
This reuses the bytecodeHash created during compilation.
2026-04-29 03:27:04 -04:00
kenji yoshida c9c90978e4
[2.x] ci: Avoid postfix in build files (#9150) 2026-04-29 03:13:17 -04:00
kenji yoshida 3d64237122
[2.x] ci: Update sbt and sbt-scalafmt plugin (#9148) 2026-04-29 03:12:09 -04:00
jimcody1995 0f2c973452
[2.x] fix: Avoid dependencyTree browse crashes on Linux (#9147)
**Problem**
`dependencyTree` with `--browse` can throw when desktop browse is unavailable (for example on Wayland/headless environments), causing command failure.

**Solution**
Handle unsupported desktop/browse actions and runtime browse failures gracefully by logging a warning instead of throwing, and add regression tests for unsupported/throwing desktop scenarios.

Generated-by: Cursor Codex 5.3
2026-04-27 22:12:14 -04:00
eugene yokota cd5fb7f7fb
[2.x] fix: Remove will-be-ignored warning (#9143)
**Problem**
run warns about jvm option not being applied,
but it is applied for client-side run.

**Solution**
Remove the warning.
2026-04-27 03:18:47 -04:00
eugene yokota 5b9553af9e
[2.x] Bump sbtn to 2.0.0-RC13 (#9140) 2026-04-27 01:03:42 -04:00
eugene yokota 64463535ca
[2.x] refactor: Replace string Array with ju.List (#9138)
**Problem**
Scala 3 supposedly has problem with String array in structural types.

**Solution**
This works around the issue by using ju.List.
2026-04-27 00:22:30 -04:00