Commit Graph

18038 Commits

Author SHA1 Message Date
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
eugene yokota 4617a6ca05
[2.x] fix: Fixes compilerPlugin(...) to ignore platform (#9135)
**Problem**
When using scala-native, we can't enable semanticdb etc
because of the platform-level platform.

**Solution**
Since compilerPlugin(...) is always going to be JVM,
just add an explicit JVM platform to the given ModuleID.
2026-04-26 15:14:51 -04:00
Ali Rashid 9275bda052
[2.x] feat: Expose `scripted / excludeFilter` and `scripted / includeFilter` keys for scripted test filtering. (#9131)
* [2.x] feat: Add scripted / includeFilter and scripted / excludeFilter

* [2.x] Add scripted-exclude-filter scripted test. Remove stale item from Scripted.sbtWindowsExcludeFilter
2026-04-26 14:31:42 -04:00
eugene yokota d132926197
Merge pull request #9130 from eed3si9n/wip/ignore-ctrl-c
[2.x] fix: Fixes ctrl-c handling
2026-04-25 18:03:50 -04:00
Eugene Yokota bf678f2d6a [2.x] fix: Fixes ctrl-c handling
**Problem**
Ctrl-C during client-side run gets interpreted in sbtn,
and shuts down the shell.

**Solution**
Ignore ctrl-c during client-side run.
2026-04-25 03:36:32 -04:00
eugene yokota 8d6627929d
[2.x] desp: Gigahorse 0.9.4 (#9125) 2026-04-23 23:40:54 -04:00
Zainab Ali 3b1dbae74a
[2.x] Add Test configuration to evictionWarningOptions (#9102)
* 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.
2026-04-23 23:06:54 -04:00
eugene yokota b98c4f8984
[2.x] fix: Fixes managedScalaInstance false support (#9121)
**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.
2026-04-23 00:30:32 -04:00
volcano303 ac0f3f5c6f
[2.x] fix: Cache AutoPlugin projectSettings/projectConfigurations (#9077)
- Cache AutoPlugin.projectSettings and projectConfigurations via AutoPluginCache so they are evaluated once per plugin instance during build loading, not once per subproject (N×M → M)
- Make GroupedAutoPlugins.globalSettings a lazy val and pre-compute buildSettingsMap to avoid repeated aggregation
2026-04-21 23:50:28 -04:00
Anatolii Kmetiuk 4ebacc6e05
[2.x] fix: Include platform suffix in Artifact.artifactName (#9118) 2026-04-21 22:58:34 -04:00
Matthias Kurz 1f0b0e1bfa
[2.x] ci: Update sbt-java-formatter (#9098) 2026-04-21 12:19:44 -04:00
kenji yoshida d2da9ce1e6
[2.x] refactor: Use exists instead of find and isDefined (#9111) 2026-04-19 00:27:39 -04:00
Matt Dziuban b721644cbc
[2.x] fix: Use rootPaths to replace virtual paths in console and doc scalac options. (#9110)
Rather than using the FileConverter to replace virtual paths, this uses the rootPaths directly. It only replaces a virtual path in a scalac option if the given segment of the option begins with the root path key.
2026-04-18 03:29:45 -04:00
eugene yokota af0cbaf74e
Merge pull request #9112 from xuwei-k/duplicate-hedgehog
[2.x] Remove duplicate hedgehog TestFramework setting
2026-04-18 03:21:31 -04:00
eugene yokota 95152f9745
Merge pull request #9083 from xuwei-k/mimaPreviousArtifacts-RC12
[2.x] Update mimaPreviousArtifacts
2026-04-18 03:05:57 -04:00
xuwei-k 639a19d262 Update mimaPreviousArtifacts 2026-04-18 15:38:09 +09:00