Commit Graph

12468 Commits

Author SHA1 Message Date
Anatolii Kmetiuk 1ce945b6b7 Harden Windows VCS URI fragments against command injection
- Use Process(argv) for git/hg/svn without cmd /c on Windows
- Add VcsUriFragment.validate for fragments in clone/checkout/update
- Add tests
2026-03-23 17:31:37 -04:00
eugene yokota 2378719087
Merge pull request #8918 from eed3si9n/wip/revert-coursier
Revert "[1.x] deps: Update lm-coursier-shaded 2.1.12 (#8902)"
2026-03-17 23:46:57 -04:00
Eugene Yokota 18c8619535 Add scripted test for sbt-site 2026-03-17 22:58:13 -04:00
Eugene Yokota 80925a5c59 Revert "[1.x] deps: Update lm-coursier-shaded 2.1.12 (#8902)"
This reverts commit 132e0c6bb5.
2026-03-17 22:51:41 -04:00
Eugene Yokota de617bff87 sbt 1.12.6 2026-03-15 22:39:04 -04:00
eugene yokota f5da35c092
Update semanticdbVersion in SemanticdbPlugin.scala (#8907)
Co-authored-by: kenji yoshida <6b656e6a69@gmail.com>
2026-03-15 04:55:00 -04:00
Michał Pawlik 132e0c6bb5
[1.x] deps: Update lm-coursier-shaded 2.1.12 (#8902)
Update lm-coursier-shaded 2.1.12
2026-03-14 06:06:13 -04:00
eugene yokota 9a43bae475
[1.x] log4j 2.25.3 (#8872) 2026-03-04 01:36:53 -05:00
Eugene Yokota 52d54e495f sbt 1.12.5 2026-03-01 18:00:15 -05:00
eugene yokota 345e0e0739
[1.x] sbtn 1.12.5 (#8859) 2026-03-01 16:53:48 -05:00
eugene yokota ec0d181abe
[1.x] fix: Runner should fail on JDK < 17 for sbt 2.x (#8825) (#8854)
**Problem**
Running sbt 2.x with JDK 8 produces a confusing "server was not
detected" error because the JDK version check only required JDK 8+
and only ran in the non-native-client path.

**Solution**
Move java_version detection before the native client decision and add
checkJava17ForSbt2 that requires JDK 17+ when sbt major version >= 2.

Fixes #8813

Co-authored-by: Dream <42954461+eureka928@users.noreply.github.com>
2026-03-01 05:30:13 -05:00
eugene yokota c88b641c36
[1.x] fix: Refer to universal sbtn in detectNativeClient (#8810) (#8851)
** Problem **
sbtn-x86_64-apple-darwin doesn't exist anymore

** Solution **
point to universal binary instead

Co-authored-by: fireXtract <fireXtract@users.noreply.github.com>
2026-03-01 05:28:23 -05:00
eugene yokota 0e11aebddc
[1.x] Comments in dot files (#8841) (#8848)
**Problem**
Hash comments doesn't work in dot files.

**Solution**
This reapplies the comment removal sed,
with improved inline comment handling.
2026-03-01 05:27:17 -05:00
eugene yokota 808f601cbc
[1.x] fix: Fixes double quotes handling in fork mode (#8765) (#8845)
When using the arguments file (`@argsfile`) mechanism for forked runs,
double quotes inside arguments were not escaped, causing the JVM's
argument file parser to strip them. For example, passing `{"a":1}` as
an argument would result in `{a:1}`.

Escape `"` as `\"` in `createArgumentsFile`, matching the existing
backslash escaping, so the JVM correctly round-trips quoted arguments.

Fixes sbt/sbt#7129

Co-authored-by: BrianHotopp <brihoto@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:05:43 -05:00
Eugene Yokota f49145f4f6 sbt 1.12.4 2026-02-23 03:46:28 -05:00
eugene yokota 97b69bba79
[1.x] Respect `scalaOrganization` in compiler bridge resolution (#8732) (#8799)
**Problem**
`scalaOrganization` was ignored during compiler bridge resolution because `ZincLmUtil.getDefaultBridgeModule` hard-coded `ScalaArtifacts.Organization` (`org.scala-lang`).

**Solution**
Add a `scalaOrganization` parameter to `ZincLmUtil` methods, and passing `scalaOrganization` value to those methods.

Generated-by: Claude Opus 4.6

Co-authored-by: Rikito Taniguchi <rikiriki1238@gmail.com>
2026-02-23 03:12:46 -05:00
eugene yokota a131470288
Revert "[1.x] fix: Handle JVM parameters with spaces in dot files (#8730) (#8738)" (#8798)
This reverts commit 44187ea00b.
2026-02-23 02:41:50 -05:00
Eugene Yokota dc754e6a2e sbt 1.12.3 2026-02-14 19:00:32 -05:00
eugene yokota 4467369757
[1.x] fix: handle --version in sbt 2.x project dirs (sbt#8717) (#8735) (#8739)
**Problem**
`sbt --version` in sbt 2.x project directories was delegated to the native client, which could try to start/connect to a server instead of printing version info.

**Solution**
Skip native-client delegation when `--version` is requested, and add runner-script tests for sbt 1.x and 2.x project variants.

Co-authored-by: Pluto <128720033+it-education-md@users.noreply.github.com>
2026-02-14 05:01:04 -05:00
eugene yokota 44187ea00b
[1.x] fix: Handle JVM parameters with spaces in dot files (#8730) (#8738)
**Problem**

The sbt launcher script used naive word splitting when parsing `.sbtopts` and `.jvmopts`, so arguments with spaces were split incorrectly. For example, `-J--add-modules jdk.incubator.concurrent` in `.sbtopts` and `-Dtest.key="value with spaces"` in `.jvmopts` were not passed to the JVM as intended.

Co-authored-by: PandaMan <joewartson757@gmail.com>
2026-02-14 05:00:45 -05:00
eugene yokota c8b2b03f8a
[1.x] Print warning about scala-reflect not found (#8736)
**Problem**
scala-reflect not found issue is confusing.

**Solution**
Print out a specialized warning message.
2026-02-14 04:04:40 -05:00
eugene yokota 029c45bb81
[1.x] fix: handle --script-version sbt 2.x project dirs (#8715) (#8737)
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.

Co-authored-by: PandaMan <joewartson757@gmail.com>
2026-02-14 03:50:50 -05:00
eugene yokota e82acdfe56
[1.x] require coreutils for RPM (#8712) (#8713)
**Problem**
Apparently sbt can fail when it doesn't have rm,
which can happen "when building relocatable RPM's and building an OS image in a chroot."

**Solution**
It was suggested that we require coreutils.
2026-02-07 19:20:46 -05:00
eugene yokota 810f45901e
Merge pull request #8707 from eed3si9n/bport/scala-version-unification
[1.x] fix: Restore Scala 2 artifact version unification
2026-02-07 02:35:55 -05:00
eugene yokota 8feb6463d2
Merge pull request #8706 from eed3si9n/bport/restore-cli-ops
[1.x] fix: restore CLI precedence over .sbtopts
2026-02-07 02:35:31 -05:00
Pluto 59f4bd743e [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-07 01:58:36 -05:00
circlecrystalin 02cd20e928 [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-02-07 01:58:05 -05:00
calm 6b41a3d093 [2.x] fix: Restore Scala 2 artifact version unification (#8689) (#8700)
Commit 92b0564dc (fix for #8632) changed `csrSameVersions` so that Scala 2.13+ only aligned `scala-library` and `scala3-library`. This removed `scala-compiler` and `scala-reflect` from version
unification, so transitive dependencies pulling in an older `scala-compiler` (e.g. 2.13.15 via `refined_2.13`) were no longer evicted to match `scalaVersion` (e.g. 2.13.18).
2026-02-07 01:49:27 -05:00
Eugene Yokota 1a50aa32f2 sbt 1.12.2 2026-02-04 00:23:22 -05:00
eugene yokota 92a4af4f97
[1.x] Bump to sbtn 1.12.1 (#8684) 2026-02-03 21:39:44 -05:00
eugene yokota d29e096a37
[1.x] fix: Handle paths with parentheses in sbt.bat on Windows (#8656) (#8682)
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-02-03 00:30:29 -05:00
eugene yokota 2380082bcc
[1.x] Use JProcess for interactive forking (#8678)
**Problem/Solution**
For forking that require both input and output,
use a Java process instead of the Scala process.
2026-02-02 11:03:50 -05:00
Eugene Yokota 6e974bb283 sbt 1.12.1 2026-01-26 06:01:43 -05:00
eugene yokota 579e31752e
[1.x] fix: Fix scala-reflect not found problem (#8632) (#8633)
**Problem**
We enforce same-version policy for scala-reflect in Scala 2.13.
However due to sandwich dependency, the graph can bump
scala-library to 3.8.1, which is missing scala-reflect counterpart.

**Solution**
Drop the same-version policy.
2026-01-26 05:32:20 -05:00
eugene yokota 08ab372fa6
Merge pull request #8593 from calm329/fix/8357-transitive-update-invalidation-1.x
[1.x] fix: Invalidate update cache across commands when dependencies change
2026-01-20 18:00:48 -05:00
calm329 f5f7015d93 fix: Update cache-update test for new UpdateInputs type 2026-01-20 14:35:47 -08:00
calm329 16cfc66152 fix: Invalidate update cache across commands when dependencies change 2026-01-20 14:18:05 -08:00
azdrojowa123 16cbaef475
[1.x] Fix missing `project` directory (#8583)
* create `project` directory if extra sbt files are added to the meta-build #8570
2026-01-20 10:03:51 -05:00
eugene yokota d54989915b
Merge pull request #8571 from eed3si9n/bport/8566
[1.x] Backport runner script changes
2026-01-17 18:01:30 -05:00
E.G b4e3845867 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 17:46:55 -05:00
MkDev11 c50f5b7fd1 [2.x] fix: Fix sbt new argument parsing on Windows (#8509)
Only recombine split -- arguments after new/init command.

Fixes #7507
2026-01-17 17:46:33 -05:00
MkDev11 e756c6dc88 [2.x] fix: Skip native client for sbt new/init commands (#8512)
Fixes #7497
2026-01-17 17:46:09 -05:00
SID 1fd24af87e
[1.x] bport: Fix sbtopts files priority in sbt launch script (#8520)
- Change from prepend to append for machine/dist sbtopts
- Change project .sbtopts from prepend to append so it appears last
- Project-level .sbtopts now correctly overrides machine-wide configs
- Add integration tests to verify sbtopts priority order
- Extend testOutput to support dist and machine sbtopts testing
- Copy staging directory to temp location to avoid modifying staging dir
2026-01-13 14:43:22 -05:00
eugene yokota b352eb1ff6
Merge pull request #8493 from eed3si9n/bport/launcher-package
[1.x] bport: Upgrade launcher-package to sbt 1.10.7
2026-01-11 22:56:33 -05:00
eugene yokota 622add0e61 [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 22:30:50 -05:00
Eugene Yokota 5bdb08ea23 ci: Use slash syntax in build.sbt 2026-01-11 21:43:49 -05:00
MkDev11 08469d8b8c [2.x] fix: Upgrade launcher-package to sbt 1.10.7 and replace dispatch-http (#8465)
Fixes #7826

Changes:
- Upgrade sbt version from 0.13.18 to 1.10.7 in launcher-package/project/build.properties
- Remove dead dispatch-http 0.8.10 dependency from plugins.sbt
- Update sbt-native-packager from 1.7.6 to 1.10.4 (com.github.sbt)
- Update sbt-pgp from 2.1.2 to 2.3.1
- Replace all dispatch.classic._ HTTP calls with Java URL.openStream()

The dispatch-http library is dead and doesn't support sbt 1.x. This change
uses standard Java networking APIs for HTTP downloads, eliminating the
dependency on outdated libraries.

All HTTP download operations now use:
- java.net.URL.openConnection()
- InputStream with buffered reading
- Proper resource cleanup with try-finally blocks

- Removes the sbt-export-repo plugin dependency
- Defines exportRepo and exportRepoDirectory settings locally
- Removes ExportRepoPlugin from dist project
- Fixes exportRepo task to not reference itself

* fix: Update PackageSignerPlugin.scala for sbt 1.x compatibility
- Use withExtension instead of copy(extension = ...) for Artifact
- Update Classpaths.publishConfig to use sbt 1.x signature with all required parameters
- Use new slash syntax for scoped keys (pgpSigner / skip instead of skip in pgpSigner)

* fix: Use computed status instead of status key in PackageSignerPlugin

* fix: Use withRevision instead of copy for ModuleID in build.sbt

- Add scala.sys.process._ import for shell command execution (! method)
- Fix resolvers setting to use new slash syntax and proper Option handling
- Fix publish/publishLocal to use {} instead of () to avoid deprecation warning
- Fix Classpaths.publishTask to use variant without delivery key (deprecated since 1.1.1)
- Add scala.sys.process._ import for shell command execution
- Fix publish/publishLocal to use {} instead of ()
- Remove problematic resolvers setting that caused task/setting dependency issues
- Use IvyActions.publish directly instead of deprecated Classpaths.publishTask
- Fix ModuleID.copy to use withRevision
- Fix Artifact.copy to use withExtension
- Use computed status value instead of status key

Build now compiles successfully with sbt 1.10.7.
2026-01-11 21:39:44 -05:00
Eugene Yokota fcb4e0e43c sbt 1.12.0 2026-01-04 21:18:03 -05:00
eugene yokota 6f50a1efca
Merge pull request #8434 from eed3si9n/wip/bump
[1.x] Zinc 1.12.0
2026-01-04 21:04:04 -05:00
Eugene Yokota 0e546f0b35 [1.x] Zinc 1.12.0 2026-01-04 20:50:33 -05:00