Commit Graph

3732 Commits

Author SHA1 Message Date
Anatolii Kmetiuk 0acb12a978 Fix #8405: updateSbtClassifiers includes plugins in dependencies list
Preserve original direct dependencies (plugins) and merge with transitive dependencies
Original dependencies may include plugins that are NOT transitive dependencies of sbt
2025-12-11 10:50:29 +09:00
Aleksandra Zdrojowa 0d9f40811b return build targets sources from `buildTarget/dependencySources` request #8403 2025-12-08 19:22:35 +01:00
Aleksandra Zdrojowa 1f269ad604 change the order of FailureWall & PopOnFailure in the reload command #8389
- it's done to prevent the sbt process from being killed in case of task failure after a load failure has been executed
2025-12-04 16:12:11 +01:00
Eugene Yokota ffc2f8c35d fix: Fixes managed resources missing from the JAR
**Problem**
RC-7 is missing the managed resources.

**Solution**
This triggers managed resources so they get generated.
2025-11-28 23:51:08 -05:00
Eugene Yokota f097a12f7e fix: Fixes JLine history
**Problem**
JLine history disappears if we change the Scala version.

**Solution**
Put it back into a non-crossed path.
2025-11-25 23:06:46 -05:00
eugene yokota b43b73c319
Merge branch 'develop' into wip/remove-old-remote 2025-11-25 02:34:16 -05:00
Eugene Yokota fe266cd59e Merge branch '1.12.x' into wip/merge-1.12.x 2025-11-25 02:13:03 -05:00
Hamza Remmal 531c5d18db
do not assume scala3_library to be a jar 2025-11-24 22:01:33 +01:00
Eugene Yokota 5730383340 Merge branch '1.12.x' into wip/merge-1.12.x 2025-11-24 02:14:17 -05:00
Eugene Yokota 77e74871ad Remove sbt 1.x remote cache imple 2025-11-23 22:47:21 -05:00
Eugene Yokota d1e0a5a35d cleanFull 2025-11-23 14:45:21 -05:00
Eugene Yokota c8edb171ee [2.x] Adds cleanExpunge command
**Problem**
We might want to clear the disk cache.

**Solution**
This adds cleanExpunge command.
2025-11-22 23:12:18 -05:00
eugene yokota fe6e9b4802
Merge pull request #8377 from eed3si9n/wip/compiler-bridge
[2.x] perf: Cache compiler bridge binary
2025-11-22 15:30:00 -05:00
Eugene Yokota 68b2b7d025 [2.x] perf: Cache compiler bridge binary
**Problem**
Compiler bridge resolution calls out to Coursier,
and it shows up on the profiler.

**Solution**
This uses sbt 2.x caching to cache the prebuilt compiler bridge binaries
to avoid calling Coursier from second time onwards.
2025-11-19 03:26:13 -05:00
eugene yokota df11b264db
Merge pull request #8375 from azdrojowa123/reload-on-source-changes
Trigger only load (without loadFailed) in the case of NetworkChannel
2025-11-19 00:44:47 -05:00
Aleksandra Zdrojowa da42031bb3 remove the `isInteractive` check when deciding whether to trigger an additional reload #8371 2025-11-18 21:48:11 +01:00
Eugene Yokota 6a2e0a9b04 [2.x] perf: Avoid copying directories
**Problem**
Directory copying is showing up as performance hot spots.

**Solution**
This avoid copying classes or resources.
2025-11-17 05:25:59 -05:00
Aleksandra Zdrojowa 8770ad9de8 trigger an additional reload only if it's a ConsoleChannel, an interactive NetworkChannel, or a NetworkChannel where the exec ID is known, to ensure the response can be propagated correctly #8371 2025-11-17 11:16:07 +01:00
Aleksandra Zdrojowa 5d42dd65c8 filter out `bspReload` to avoid triggering an additional reload if bspReload is in the remaining commands #8371 2025-11-17 10:19:45 +01:00
Eugene Yokota d0ae314748 scalaEarlyVersion setting and source directories
**Problem**
During the milestone releases of Scala, e.g. Scala 2.13.0-M1,
scalaBinaryVersion by design points to 2.13.0-M1,
and also the source directory uses scala-2.13.0-M1,
but in most cases we actually want to pretend compatibility
and use scala-2.13 directory.

**Solution**
This introduces a new setting called scalaEarlyVersion,
which is the scalaBinaryVersion of the release version of milestones.
We have been calling this "partial version", but that broke
down for Scala 3, which adopted semantic versioning.
2025-11-16 18:02:17 -05:00
Eugene Yokota 6daa99b2db fix: Parse with -Xsource:3
**Problem**
On IntelliJ the users are getting the hint to upgrade to -Xsource:3
style, however the supported syntax do not parse.

**Solution**
This adds -Xsource:3 to the parser. The metabuild compilation uses
-Xsource:3 since sbt 1.6.0.
2025-11-14 00:51:28 -05:00
Eugene Yokota 8023eeee20 perf: Cache Zinc Analysis across compilation
**Problem**
Protobuf reading shows up as one of the bottlenecks during no-op compilation.

**Solution**
This adds a local, in-memory cache of Zinc Analysis using the timestamp
and the file size of the persisted protobuf file.
2025-11-12 02:35:18 -05:00
Eugene Yokota 4265b92aa4 perf: Cache content hash of binary files
**Problem**
sha256 is currently a bottleneck for no-op compilation.

**Solution**
This adds a local, in-memory cache of sha256 hashes of binary files
using their timestamp and file size.
The size of the digest cache can be configured using localDigestCacheByteSize,
which is set to 1MB by default.
2025-11-11 15:59:42 -05:00
xuwei-k 97b77c16dc Scala 3.7.4 2025-11-08 07:37:33 +09:00
Eugene Yokota 840b851445 [1.x] Add Scala 3.8 REPL support
**Problem**
Scala 3.8 REPL won't work since they've split the repl artifact into another JAR.

**Solution**
This works around it by creating a yet-another sandbox configuration ScalaReplTool
(similar to ScalaTool and ScalaDocTool) and a separate scalaInstance for
console task, so when Zinc is invoked we'll be able to conjure the right array of JARs.
2025-11-01 21:06:32 -04:00
Eugene Yokota ed7da85ef0 Backport Compiler
Backport scala.internal.Compiler from sbt 2.x so we can merge easier.
2025-11-01 15:16:11 -04:00
xuwei-k 49c8306091 Update semanticdbVersion 2025-10-23 16:38:26 +09:00
xuwei-k 14b7ddf867 remove redundant `val` modifier 2025-10-06 09:28:27 +09:00
eugene yokota 1138926f99
Merge pull request #8324 from xuwei-k/nowarn-annotation
remove unnecessary `@nowarn` annotations
2025-10-04 13:46:54 -04:00
eugene yokota f4277da9f1
Merge pull request #8323 from xuwei-k/unused-code
remove unused code
2025-10-04 13:45:54 -04:00
xuwei-k 038fa6c476 remove unnecessary nowarn annotations 2025-10-04 19:25:11 +09:00
xuwei-k d1a1dd9edd remove unused code 2025-10-04 19:16:22 +09:00
xuwei-k 3e1eb3737d remove Selectable.reflectiveSelectable in dependency-graph 2025-10-04 15:36:41 +09:00
Eugene Yokota 140274c31d fix: Fixes PluginCross 2025-09-29 01:18:31 -04:00
xuwei-k 246e060e53 update sbt-giter8-resolver version 2025-09-29 07:37:05 +09:00
Eugene Yokota 3e0f49d01b Update Giter8TemplatePlugin
Update to reference sbt-giter8-resolver 0.18.0
2025-09-25 21:58:34 -04:00
xuwei-k 1a882b0dc3 remove some `format: off` comments 2025-09-24 18:49:30 +09:00
Eugene Yokota 748bf1207f Auto aggregate
**Problem**
For sbt 1.x, the user is forced to pick between having a stable ID for the root project,
or having the automatic aggregation of all subprojects.
The problem becomes more pronounced for large build that frequent add/remove subprojects.

**Solution**
This implements `.autoAggregate` method on `Project`, which is implemented as
`this.aggregate(LocalAggregate)`.
At the loading time, we can automatically expand `LocalAggregate` to a list of subproject references,
after we discover all subprojects.
The `autoAggregate` will use the base directory of the subproject to pick the parent-child
relationship. For example, a root project would aggregate all subprojects,
but `bar` might aggregate only `bar/bar1` and `bar/bar2`.
2025-09-21 13:40:53 -04:00
Eugene Yokota 2fa3159f18 Update to Contraband 0.8.0 2025-09-19 00:46:34 -04:00
Eugene Yokota 64dcdafc07 Merge branch '1.11.x' into wip/merge-1.11.x 2025-09-17 23:35:59 -04:00
Billy Autrey 2f1de0b962
scalafmt 2025-09-15 11:53:23 -05:00
Billy Autrey f8903ab37a
Add runTaskUnhandled to Extracted 2025-09-15 11:17:19 -05:00
xuwei-k 8e1cebc8fc delete internal/ProjectMatrixReference.scala 2025-09-07 18:19:57 +09:00
xuwei-k 708fffa290 delete unused "internal" package code 2025-09-06 19:41:12 +09:00
xuwei-k 57c9253b5b fix scaladoc 2025-09-04 20:17:50 +09:00
Eugene Yokota 3a8a891d71 fix: Fixes client-side run
**Problem**
Client-side run currently fails on JDK 8 because sbtn
creates args file even though JDK 8 does not support it.
This is likely because sbtn is compiled using GraalVM on a modern JDK.

**Solution**
This adds a new fork option canUseArgumentsFile to delegate the args file decision
to the server, and default to false if the value is missing.
This retroactively fixes sbt 2.x client-side run.
2025-09-02 03:53:58 -04:00
Aleksandra Zdrojowa 622994b40d use reverse topological order for configurations when resolving internal dependencies
- changes the classpath order for internal dependencies
- fix #8249
2025-09-01 16:47:44 +02:00
Eugene Yokota 683a559b37 Remove log4j 2025-08-30 20:29:44 -04:00
Eugene Yokota 380af10e8f fix: Fixes exportJars false support
**Problem**
Setting exportJars to false causes issues due to hashing of the directories.

**Solution**
Make exportedProducts uncached for now.
2025-08-26 01:10:27 -04:00
eugene yokota a8fc24dda6
Merge pull request #8238 from eed3si9n/wip/junit-java
[2.x] fix: Java-only tests
2025-08-25 22:26:58 -04:00