Commit Graph

17595 Commits

Author SHA1 Message Date
eugene yokota 877ea0435c
Merge pull request #8473 from sbt/eed3si9n-patch-1
Fix typo in link to CONTRIBUTING.md
2026-01-11 03:57:26 -05:00
eugene yokota 39a5c804ed
Fix typo in link to CONTRIBUTING.md 2026-01-11 03:57:14 -05:00
eugene yokota 4c88d27397
Merge pull request #8472 from eed3si9n/wip/contributing-docs
[2.x] docs: Contributor's Guide
2026-01-11 03:54:57 -05:00
eugene yokota d7fde4d376
Merge pull request #8456 from tellorian/fix/8429-actioncache-symlink-optimization
[2.x] Fix #8429: Add symlink optimization to ActionCache.get
2026-01-11 03:40:54 -05:00
Eugene Yokota 51638d342c docs: Contributor's Guide
**Problem**
We probably need some guidance on contributions.

**Solution**
Here's a contributor guide.
2026-01-11 03:24:30 -05:00
eugene yokota 81d3527913
Merge pull request #8468 from xuwei-k/tailrec-annotation
[2.x] Add `@tailrec` annotation
2026-01-11 03:19:19 -05:00
eugene yokota 271caaab37
Merge pull request #8471 from xuwei-k/BuildServerProtocol-nowarn
[2.x] Fix warnings in BuildServerProtocol.scala
2026-01-11 03:19:03 -05:00
eugene yokota 2b819e24d1
Merge pull request #8470 from xuwei-k/String-toString
[2.x] refactor: Remove redundant `String#toString`
2026-01-11 03:17:57 -05:00
eugene yokota 4ff1d77e26
Merge pull request #8469 from xuwei-k/redundant-asInstanceOf
[2.x] Remove redundant `asInstanceOf`
2026-01-11 03:16:56 -05:00
xuwei-k 5667a46749 Fix warnings in BuildServerProtocol.scala 2026-01-11 16:50:36 +09:00
xuwei-k 3b4b7effc2 Remove redundant String#toString 2026-01-11 16:46:05 +09:00
xuwei-k 3015bab1d7 Remove redundant asInstanceOf 2026-01-11 16:43:17 +09:00
xuwei-k c0fe4dfb10 Add tailrec annotation 2026-01-11 16:33:45 +09:00
eugene yokota 4bee8747e9
Merge pull request #8463 from MkDev11/fix/dependency-overrides-ivy-7951
[2.x] Fix #7951: Apply dependencyOverrides to delivered Ivy XML
2026-01-10 21:09:09 -05:00
tellorian d63191bb16
Merge branch 'develop' into fix/8429-actioncache-symlink-optimization 2026-01-11 09:39:49 +09:00
mkdev11 7389f1e059 Merge develop and resolve conflicts 2026-01-11 01:45:38 +02:00
mkdev11 e63a4b8f8c Refactor applyDependencyOverrides into testable function 2026-01-11 01:40:51 +02:00
eugene yokota 9ba3966ad2
Merge pull request #8460 from MkDev11/fix/gc-monitor-warning-8002
[2.x] fix: Improve GCMonitor warning message clarity
2026-01-10 16:24:01 -05:00
MkDev11 9475f278b5
Merge branch 'develop' into fix/dependency-overrides-ivy-7951 2026-01-10 12:51:54 -08:00
mkdev11 a9ffa59baf Fix #7951: Apply dependencyOverrides to delivered Ivy XML
Post-process the delivered Ivy XML file to apply dependency overrides.
This is necessary because Ivy's deliver() method doesn't automatically
apply DependencyDescriptorMediators when writing the XML.

The fix:
- Adds applyOverridesToDeliveredIvy() method in IvyActions
- Reads the delivered Ivy XML and transforms dependency elements
- Updates rev attributes for dependencies that have overrides
- Ensures consistency between Maven POM and Ivy XML publishing

Added unit tests to verify:
- Overrides are correctly applied to matching dependencies
- All other attributes are preserved
- Non-matching dependencies remain unchanged
2026-01-10 22:44:57 +02:00
MkDev11 37ee88d0fb
Merge branch 'develop' into fix/gc-monitor-warning-8002 2026-01-10 12:23:39 -08:00
mkdev11 9be376973d fix: Use 'CPU seconds' to clarify GC time can exceed wall clock
Address review feedback from eed3si9n to make it clearer that GC time
is cumulative CPU time across parallel collectors, which is why it can
exceed wall clock time.

Fixes #8002
2026-01-10 22:23:05 +02:00
eugene yokota 4609b62d87
Merge pull request #8459 from eed3si9n/wip/consoleproject
[2.x] Make some consoleProject progress
2026-01-10 14:08:57 -05:00
mkdev11 1b2bc53bcf fix: Improve GCMonitor warning message clarity
Add 'seconds' unit to GC time and clarify that the percentage
represents cumulative GC pause time across all collectors.

Fixes #8002
2026-01-10 15:03:57 +02:00
Eugene Yokota a921a86440 [2.x] consoleProject
**Problem**
consoleProject doesn't work. REPL doesn't even start.

**Solution**
I made some progress into consoleProject.
At least Scala 3.7 repl session will now start.
The problem is that compiler bridge has not implemented binding,
so we can't forward the sbt build information into the repl.
2026-01-10 02:15:59 -05:00
john0030710 3abddf461a Fix side-effect file syncing when using symlink optimization
- Ensure output files are synced even when reading from symlink
- Call findActionResult to get ActionResult for side-effect files
- Maintains performance benefit while ensuring correctness
- Addresses @eed3si9n's concern about tasks generating files on the side
2026-01-10 00:25:59 +01:00
john0030710 08fe019dc0 Use proper exception handling with Exception.nonFatalCatch.opt
- Replace try-catch with Exception.nonFatalCatch.opt for cleaner code
- Follows Scala best practices for non-fatal exception handling
- More functional and idiomatic approach
- Avoids catching fatal exceptions like VirtualMachineError
2026-01-10 00:23:05 +01:00
john0030710 6a63565b0e Improve symlink optimization using FileConverter
- Use config.fileConverter.toPath() instead of string manipulation
- Avoid hardcoded '/' prefix removal
- More robust and maintainable approach
- Fix IO.read() to include UTF-8 charset parameter
2026-01-10 00:20:32 +01:00
eugene yokota ba43e99b93
Merge pull request #8457 from gayanMatch/fix/3746-scripted-fail-no-match
[2.x] Fix #3746: Scripted should fail when no tests match the pattern
2026-01-09 17:57:51 -05:00
gayanMatch 65af6c59d6 Fix #3746: Scripted should fail when no tests match the pattern 2026-01-09 13:57:58 -06:00
MkDev11 061145e67b
[2.x] Add testForkedParallelism setting for forked test thread count (#8453)
**Problems**

When running forked tests, sbt uses `Runtime.getRuntime().availableProcessors()` to determine the thread pool size, ignoring `concurrentRestrictions`. This is inconsistent with non-forked parallel tests.

**Expectations**

Users should be able to control the number of parallel test threads in forked mode, similar to how `concurrentRestrictions` works for non-forked tests.

**Notes**

Added a new setting `testForkedParallelism` that allows explicit control:

```scala
testForkedParallelism := Some(2)  // Use 2 threads
testForkedParallelism := None     // Use availableProcessors() (default)
```
2026-01-09 12:43:50 -05:00
john0030710 d998161a6e Fix #8429: Add symlink optimization to ActionCache.get
- Check for symlinked value files before reading AC JSON
- When symlink exists and is valid, read directly from it
- Fallback to original AC file reading if symlink read fails
- Improves performance by avoiding unnecessary AC file reads
- All existing tests pass
2026-01-09 15:11:09 +01:00
eugene yokota 7320b7176a
Merge pull request #8443 from xuwei-k/deprecated-scala-App 2026-01-09 08:15:11 -05: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 66aebdb96b
Merge pull request #8454 from calm329/fix/parse-key-spec-flaky-8326 2026-01-09 01:27:18 -05:00
calm329 79b54a28ce Fix ParseKeySpec flaky test when task name matches project name (#8326) 2026-01-08 20:55:14 -08: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 997ad9619a
Merge pull request #8446 from Angel98518/fix-sbt-version-flag
[2.x] Fix --sbt-version to expand to -Dsbt.version
2026-01-08 18:16:14 -05:00
eugene yokota 9570cc9b05
Merge pull request #8450 from sbt/eed3si9n-patch-1
[2.x] Update README with DEVELOPING document reference
2026-01-08 15:32:17 -05:00
eugene yokota 8388fae512
Update README with DEVELOPING document reference
Added a link to the DEVELOPING document for contribution guidelines.
2026-01-08 15:22:21 -05:00
Angel98518 938b5f97f0 Trigger CLA check 2026-01-08 20:59:27 +01:00
eugene yokota 200293a0f5
Merge pull request #8449 from sbt/eed3si9n-patch-1
[2.x] docs: Replace sbt-contrib link with Discussions link
2026-01-08 14:58:23 -05:00
eugene yokota acf4e7df6b
Replace sbt-contrib link with Discussions link
Updated contribution guidelines to reflect new discussion process.
2026-01-08 14:57:55 -05:00
Angel98518 a0f5c83e79 Fix --sbt-version to expand to -Dsbt.version
Fixes #6645

The --sbt-version flag was incorrectly trying to download an sbt launcher
with the specified version, which doesn't exist for many sbt versions.

Changes:
- Modified --sbt-version handling to directly add -Dsbt.version property
- Removed sbt_version variable assignment that caused launcher mismatch
- acquire_sbt_jar now uses default launcher version instead

Now --sbt-version X.Y.Z correctly expands to -Dsbt.version=X.Y.Z without
affecting the sbt launcher version used to run the build.
2026-01-08 20:51:27 +01:00
eugene yokota df90cb967c
Merge pull request #8447 from Francluob/fix/8344-batch-mode-load-failed-prompt
[2.x] fix: Skips interactive prompt in batch mode when project loading
2026-01-08 14:17:20 -05:00
Francluob 4976ec7dc7 Fix #8344: Skip interactive prompt in batch mode when project loading fails
When project loading fails in batch mode, sbt was showing an interactive
prompt asking the user to choose between retry, quit, last, or ignore.
However, in batch mode there is no interactive terminal, causing the
process to hang waiting for input that will never come.

This fix checks if we're in batch mode (Prompt.Batch) and automatically
exits with failure (equivalent to 'q' quit option) without prompting the
user. This prevents infinite retry loops on persistent errors and allows
batch mode scripts to fail fast, which is appropriate for CI/CD environments.

The interactive behavior remains unchanged for non-batch mode.
2026-01-08 19:29:35 +01:00
aka James4u a4ad73ddf6
fix: prevent server boot when --no-server is used (#8444)
* fix: prevent server boot when --no-server is used
* refactor: move serverAutoStart to sysprops
* refact: scalafmt
2026-01-07 15:11:04 -05:00
eugene yokota 948f12cf54
Merge pull request #8440 from MkDev11/fix/windows-debug-options-8100
[2.x] Fix debug options breaking launcher on Windows
2026-01-06 15:48:07 -05:00