Commit Graph

353 Commits

Author SHA1 Message Date
xuwei-k d3f7f6bf90 Add test for 8458 2026-01-12 10:03:00 +09:00
xuwei-k 2d14adc721 avoid deprecated scala.App
7ddf329f6f/library/src/scala/App.scala (L65)
2026-01-09 20:10:28 +09:00
eugene yokota b537afee76
Merge pull request #8452 from calm329/fix/8441-jna-nosys-conditional
[2.x] Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional
2026-01-08 20:07:22 -05:00
calm 8c20401fb9
[2.x] Report eviction errors for Test dependencies (#8451)
Eviction warnings and errors were not reported for Test dependencies because
`EvictionError` only checked the Compile configuration.

This fix runs the eviction check for both Compile and Test configurations
separately, with distinct error messages:

- Compile: `found version conflict(s) in library dependencies`
- Test: `found version conflict(s) in Test dependencies`
2026-01-08 20:01:18 -05:00
calm329 1054ee851e Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional 2026-01-08 15:19:36 -08:00
Eugene Yokota e3f99d39cb Merge branch '1.12.x' into wip/merge-1.12.x 2026-01-05 00:08:21 -05:00
Eugene Yokota 0a15069e83 Show warnings when scalaVersion is missing
**Problem**
There's a disconnect between what is perceived to be the current
Scala version, and what sbt uses internally, and thus what it
chooses to be the default scalaVersion.

**Solution**
This displays a warning if scalaVersion setting is missing.
2026-01-04 15:23:05 -05:00
Eugene Yokota 6cb786d010 [2.x] Show warnings when scalaVersion is missing
**Problem**
There's a disconnect between what is perceived to be the current
Scala version, and what sbt uses internally, and thus what it
chooses to be the default scalaVersion.

**Solution**
This displays a warning if scalaVersion setting is missing.
2025-12-27 23:49:43 -05:00
Eugene Yokota 55aa1b52ff Disable task-cancel test 2025-12-27 02:37:32 -05:00
Eugene Yokota e6492b771e [2.x] fix: Replace Scala version with u when crossPaths is false
**Problem**
sbt 2.x uses crossTarget by default, but it contains Scala version
even when crossPaths is false.

**Solution**
This replaces it with the letter "u" for unspecified.
2025-12-18 00:00:11 -05:00
Eugene Yokota 4d6ddd50a6 [2.x] projectMatrix crossVerson support
**Problem**
crossVersion is missing from projectMatrix in sbt 2.x.

**Solution**
Port it from sbt-projectmatrix.
2025-12-16 01:33:43 -05:00
Eugene Yokota 9888aae7fa [2.x] Switch to using shaded-gson
Fixes https://github.com/sbt/sbt/issues/8334
2025-12-15 03:17:33 -05:00
Anatolii Kmetiuk eec0b4a6a0 Fix scripted dependency-management/update-sbt-classifiers test 2025-12-11 12:16:12 +09:00
Anatolii Kmetiuk b7cb338171 Add regression test for #8405 2025-12-11 11:44:27 +09:00
Anatolii Kmetiuk 1a3c6b5007 Fix #8340: Add regression test 2025-12-10 11:34:25 +09:00
xuwei-k 70960744e7 Scala 2.12.21 2025-12-09 17:28:03 +09:00
Anatolii Kmetiuk 4bcf866193 Add regression test for #8345 2025-12-08 14:35:31 +09:00
xuwei-k 2b9211e5b4 use -Werror instead of -Xfatal-warnings 2025-12-05 16:22:07 +09: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 b43b73c319
Merge branch 'develop' into wip/remove-old-remote 2025-11-25 02:34:16 -05: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 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 6c56a769fd Enable sbt-native-packager test 2025-11-18 00:34:47 -05: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
xuwei-k 152fe61ced fix runMain task. support JEP-512 2025-10-04 06:42:16 +09:00
xuwei-k 2a7e70ab6a fix run/daemon-exit test 2025-10-03 14:49:28 +09:00
xuwei-k 3b662f3968 fix fallback-dependencies-inter-project test 2025-10-03 09:39:16 +09:00
Eugene Yokota 8f2160ba43 Adjust tests 2025-09-29 00:31:24 -04:00
Eugene Yokota ef6c65b481 Update to Zinc 2.0.0-M9 2025-09-28 23:09:07 -04:00
Eugene Yokota d826f1f903 Merge branch '1.11.x' into wip/merge-1.11.x 2025-09-28 23:08:36 -04:00
Eugene Yokota 2e7d3fdf93 Support JDK 25 JEP-512/JEP-445 Main run
**Problem**
sbt currently does not support JDK 25 Main class. JDK 25 supports:
1. non-public main method
2. doesn't need Array[String] arg
3. doesn't have to be a static method

**Solution**
This updates Zinc, which supports new Main class detection.

In addition, this implements in-process run emulation support.
2025-09-28 01:51:24 -04:00
xuwei-k a62ee86b2b enable some scripted tests 2025-09-24 07:41:33 +09:00
xuwei-k 028dc35308 enable some scripted tests 2025-09-23 20:09:47 +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
Seth Tisue 3dfa840495
Merge pull request #8265 from zainab-ali/weaver-group-id
Migrate weaver group id to `org.typelevel`
2025-09-18 07:40:39 -07:00
xuwei-k 64357d7e2a Scala 3.7.3 2025-09-09 12:31:28 +09:00
Eugene Yokota 8a9f24b395 fix: Fixes forked test error handling on JDK 17
**Problem**
Forked tests apparently incorrectly returns success if an exception is thrown
on JDK 17 and up, due to exception failing to persist.

**Solution**
This adds custom codec for Throwable to workaround this issue.
2025-09-07 04:44:05 -04:00
zainab-ali d784515327 Migrate weaver group id to org.typelevel. 2025-09-05 12:14:20 +01:00
Eugene Yokota e0013078b5 fix: Fixes removeN operator --=
**Problem**
removeN operator doesn't work with settings because the param isn't inlined.

**Solution**
Fix it.
2025-09-03 11:35:27 -04:00
Eugene Yokota a8ce3a8cf6 test: Port remove test 2025-09-03 04:27:09 -04:00
Eugene Yokota 683a559b37 Remove log4j 2025-08-30 20:29:44 -04:00
Eugene Yokota dedaba23d0 Zinc 2.0.0-M7 2025-08-30 18:04:35 -04:00
Eugene Yokota b965277edc fix: Fixes set command
**Problem**
Once set command fails, the error state carries over to the next.

**Solution**
Create a fresh driver with a fresh reporter.
2025-08-28 23:47:07 -04:00
Eugene Yokota a883e400eb fix: Fixes exportJars handling for test
**Problem**
Test doesn't seem to work for exportJars set to false.

**Solution**
This bumps Zinc to handle directory hashing.
2025-08-27 23:28:37 -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 21a9996b09 fix: Java-only tests
**Problem**
managedScalaInstance := false fails Java-only tests because
the test runner is based on a Scala Runner and sbt 2.x
currently derives the ScalaInstance only from update.

**Solution**
For the purpose of Java-only testing, create a dummy Scala Instance.
2025-08-25 22:12:56 -04:00
Eugene Yokota 0c9408d312 fix: Fix sbt 1.x cross building
**Problem**
Under -Xlint, sbt 1.x complains that nowarn isn't doing anything.

**Solution**
Bring back Wconf for sbt 1.x cross building.
2025-08-21 07:19:12 +02:00
Eugene Yokota 43382095ef Use scala.transient to denote the empty cache level 2025-08-16 01:27:14 -04:00
eugene yokota 9b035c9979
Merge pull request #8209 from eed3si9n/wip/bump-sjson-new
[2.x] Bump to sjson-new 0.14.0-M4
2025-08-15 22:57:06 -04:00