Commit Graph

28 Commits

Author SHA1 Message Date
PandaMan de2c27abeb
[2.x] fix: handle --script-version sbt 2.x project dirs (#8715)
When in an sbt 2.x project directory, the script used to delegate to sbtn
before checking --script-version, so 'sbt --script-version' ran sbtn and
failed. Now we print the script version and exit before the native client
branch.
2026-02-07 22:16:21 -05:00
Pluto 12deebba2b
[2.x] fix: restore CLI precedence over .sbtopts
According to the issue, `.sbtopts` entries are appended after
CLI args in sbt 1.12.x, so `.sbtopts` JVM memory settings (e.g., `-Xmx2g`) override CLI `--mem`,
causing invalid JVM settings.
2026-02-05 18:04:55 -05:00
eugene yokota 40ef381fa2
[2.x] ExtendedRunnerTest (#8674)
Problem/Solution
Looks like this needs to be reformatted.
2026-02-01 22:25:10 -05:00
PandaMan 461e12d497
[2.x] fix: Handle paths with parentheses in sbt.bat on Windows (#8656)
Windows CMD interprets parentheses as special syntax for command grouping.
When the project directory path contains parentheses (e.g., in username),
the batch script fails with ') was unexpected at this time.' error.

This fix stores the current directory in a variable using delayed expansion
(!CURRENT_DIR!) instead of using %CD% directly, which properly handles
paths containing parentheses and other special characters.

Fixes #8644
2026-01-29 16:51:06 -05:00
Dairus 7a9775c87d
Add integration test for bspConfig & embedded launcher jar (fixes #7794) (#8597)
This adds a scripted integration test to verify that the `bspConfig` task correctly generates a valid BSP connection file (`.bsp/sbt.json`) when the embedded launcher JAR is present in the classpath.
2026-01-24 15:05:51 -05:00
circlecrystalin 55e75faee2
[2.x] fix: Fix flaky client tests (#8580) 2026-01-22 05:35:13 -05:00
calm 37c6eb2cd9
[2.x] test: Add test for sbt --client startup time (#8599)
* Add test for sbt --client startup time
* Skip startup time test on macOS due to slow hostname resolution
2026-01-21 20:00:00 -05:00
circlecrystalin 2f348a09b9
[2.x] fix: Fixes the handling of special characters in dot files (#8558)
- Replace 'eval echo $line' with 'printf "%s\n" "$line"' in loadConfigFile()
- Prevents shell expansion of special characters like |, *, &, etc.
- Fixes issue where properties with pipes, wildcards, and ampersands
  caused 'command not found' or 'unexpected' errors
- Add test to verify special characters are handled correctly on all platforms
2026-01-19 14:37:08 -05:00
E.G 1efebeaa98
fix: Handle -X JVM options on command line (fixes #5742) (#8566)
Previously, passing JVM options like -Xmx1G directly on the command
line would result in an error:

  sbt -v -Xmx1G
  [error] Expected ';'
  [error] -Xmx1G
  [error]       ^

This was because -X options were being passed to sbt as commands
instead of being recognized as JVM arguments.

Changes:
- Added handling for -X options in sbt.bat to pass them to the JVM
- Updated help text to document this feature
- Added integration tests for the new functionality
2026-01-17 14:29:30 -05:00
SID bb02c3331c
[2.x] fix: Fix sbtopts files priority in sbt launch script (#8514)
* Fix sbtopts files priority in sbt launch script (fixes #7179)

- Change project .sbtopts from prepend to append so it appears last
2026-01-13 13:30:13 -05:00
eugene yokota 4606c90f69
[2.x] ci: Integrate launcher package (#8485)
**Problem/Solution**
This is a follow up to launcher package migrating to sbt 1.x.
This joins the launcher package into the main build.
2026-01-11 20:57:59 -05:00
mkdev11 79ab58f4af Add regression test for debug options in SBT_OPTS (#8100) 2026-01-06 14:21:03 +02:00
Eugene Yokota 9783cd092b Merge branch '1.11.x' into wip/merge-1.11.x 2025-08-25 02:29:12 -04:00
Eugene Yokota 70070fcf06 Comment out version number tests 2025-08-24 02:04:34 -04:00
Eugene Yokota 49e46c2451 Retry on IO error 2025-08-24 02:04:34 -04:00
Eugene Yokota 2de01a8a05 [1.x] --jvm-client
This adds --jvm-client to the runner script.
2025-08-24 00:32:37 -04:00
Eugene Yokota 1795b797bf Merge branch '1.10.x' into wip/merge-1.10.x 2025-05-12 03:30:51 -04:00
Eugene Yokota 89ff2440ef fix: Avoid creating target on sbt -V
**Problem**
sbt -V tries to show both the sbt version and the runner version,
and ends up creating target directory even on a non-sbt directory.

**Solution**
If the current directory doesn't have a build, just display the runner version.
2025-03-16 02:08:33 -04:00
Eugene Yokota cb63de6574 Merge branch '1.10.x' into wip/merge-1.10.x 2025-02-10 02:43:30 -05:00
Eugene Yokota cd58481811 --allow-empty fixes
**Problem**
1. Currently users are automatically opted into -create-sbt,
   somewhat implicitly.
2. When somehow they are not, the check mechanism currently blocks for input.

**Solution**
1. Support a new location for sbtopts file under XSG_CONFIG_HOME/sbt
2. Rename -create-sbt to --allow-empty, and don't opt everyone in
3. Exit 1 instead of blocking for input
2024-12-22 02:21:38 -05:00
xuwei-k cfb9ffea95 remove deprecated `[this]` qualifier
https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html
2024-10-03 21:16:48 +09:00
Eugene Yokota c81d269ed2 Merge branch '1.10.x' into wip/merge-1.10.x 2024-05-07 04:39:25 -04:00
Eugene Yokota a6bdf9dc2e Fix CI
It seems like the latest macOS image no longer supports JDK 8.
2024-05-05 01:02:19 -04:00
Domantas Petrauskas bf8e92be74
Fix VM argument passing by .sbtopts file and JAVA_TOOL_OPTIONS environmental variable (#7393)
Fixes #7387

* Fix VM argument passing by .sbtopts file and JAVA_TOOL_OPTIONS environmental variable, improve launcher script integration test setup
* Fix sbt process not exiting in launcher test for --sbt-version
* Fix JAVA_TOOL_OPTIONS in launcher for linux/mac
2023-10-06 12:31:27 -04:00
Eugene Yokota 81a05430bd Split buildfile parsing to a subproject 2023-01-15 23:45:30 -05:00
Eugene Yokota f11a25a9c9 Add test 2021-11-27 21:19:38 -05:00
Eric Peters 4dcae2cb73 Add --sbt-cache argument and update localCacheDirectory key description 2021-08-21 07:35:09 -07:00
Eugene Yokota eb1c5461de move to launcher-package/ 2021-04-19 10:45:29 -04:00