Commit Graph

115 Commits

Author SHA1 Message Date
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 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
Eugene Yokota 2036ce6836 fix: Default sbtPluginPublishLegacyMavenStyle to false
**Problem**
Central Portal no longer supports the legacy sbt plugin layout.

**Solution**
Make the default more friendly by setting sbtPluginPublishLegacyMavenStyle to false.
2025-06-01 22:43:43 -04:00
OlegYch baa9a919ba Reproduce testQuick + object deps bug [merge-skip]
testQuick after code change doesn't rerun the test.
This was adopted from https://github.com/OlegYch/sbt-testQuick-bug
2025-03-31 21:47:02 -04:00
Eugene Yokota 4d583fa19e Split test-quick test into two [merge-skip] 2025-03-31 21:43:04 -04:00
Lukas Rytz e46843bfd9 Add setting to allow demoting the SIP-51 build failure
Add a `allowUnsafeScalaLibUpgrade` setting (default is `false`) to
demote the SIP-51 build failure to a warning.

If the scalaVersion is 2.13.12 but some dependency pulls in
scala-library 2.13.13, the compiler will stay at 2.13.12, but
the dependency classpath will contain scala-library 2.13.13.

This usually works, the compiler can run fine with a newer
scala-library on its dependency classpath.
Macro expansion may fail, if the macro uses some library
class / method that doesn't exist in the old version.
The macro itself is loaded from the dependency classpath
into the class loader running the compiler, where the older
Scala library is on the runtime classpath.
Using the Scala REPL in sbt may also fail in a similar fashion.
2025-01-20 10:00:13 +01:00
Friendseeker 838eee97cd Fix CI 2024-12-26 15:05:00 -08:00
Eugene Yokota de04f1f847 Update lm-coursier to 2.1.7
**Problem**
BOM support current has perf issues.

**Solution**
This bumps Coursier to 2.1.22.

This also adds a new setting `csrMavenDependencyOverride`,
which will default to false.
2024-12-22 19:59:49 -05:00
Eugene Yokota 72c061a2a2 fix: Fixes glob in scripted
**Problem**
Absolute path handling regressed.

**Solution**
Create an absolute glob for expression starting with /.
2024-12-22 01:32:16 -05:00
Friendseeker 30c7be8d0d Prepare for sbt 1.10.7 2024-12-19 12:26:37 -08:00
Eugene Yokota d21b2d250a feat: Support glob expressions in scripted
**Problem**
It's currently not easy to write a scripted test that works on
both sbt 1.x and 2.x when you want to write exists test under target.

**Solution**
Since we can only use the file system (and not evaluate Scala version etc)
1. this implements glob expression support in `exists`, `absent`, and `delete`.
2. this also introduces `||` operator that would mean a or b.
2024-12-08 23:38:00 -05:00
Eugene Yokota 57d134829b Mark ignoreScalaLibrary pending 2024-11-29 21:37:27 -05:00
Friendseeker 14d6dc5301
Prepare for sbt 1.10.6 2024-11-04 23:02:45 -08:00
Eugene Yokota f8280f14c8 Fix ++ with a command argument
**Problem**
sbt 1.10.0 added support for ++ command with external reference,
but broke ++ takes an aggregate command with slash.

**Solution**
This fixes the parser
2024-11-03 14:42:10 -05:00
Friendseeker 28a9f9c920 Prepare for sbt 1.10.5 2024-10-28 11:51:02 -07:00
friendseeker 824395f6be
Fix CI 2024-10-24 22:25:44 -07:00
Friendseeker f6d7f33261 Bump sbt to 1.10.3 2024-10-21 17:06:31 -07:00
Eugene Yokota 778cd09d08 Mark circular deps error as pending 2024-10-19 13:15:14 -04:00
Friendseeker a116a477c9 Fix dependency-management/stdlib-unfreeze 2024-10-16 11:54:56 -07:00
friendseeker c3d6bfeaa4 Fix project/scala3-cross-target 2024-10-16 10:57:22 -07:00
friendseeker 56f2a9a031 Fix compiler-project/semantic-errors
Java 21 emits Info about annotation processing, hence we need to filter out Infos so val first is the first non-info problem
2024-10-16 10:57:22 -07:00
friendseeker a739760426 Bump CI to JDK 21 2024-10-16 10:57:22 -07:00
Seth Tisue f06b7622be Scala 2.12.20 (was .19) 2024-10-10 12:53:31 -07:00
Eugene Yokota 7dafcd2df2 Update Scala 3 doc test
Current test depends on JCenter.
2024-08-08 00:02:49 -04:00
adpi2 586e0a752c
Merge pull request #7568 from adpi2/fix-bsp-internal-dep-configs
[1.10.x] Fix declaring `Optional` inter-project dependency in BSP
2024-05-23 08:50:43 +02:00
Adrien Piquerez 71f996df6e Fix scripted project/internal-dependency-configuration 2024-05-22 10:25:45 +02:00
Adrien Piquerez 9a3c4a6f53 Fix dependency-management/force-update-period 2024-05-21 16:54:14 +02:00
Eugene Yokota b1a43f9adc Consistent Analysis
See also https://github.com/sbt/zinc/pull/1326

This adds a new setting `enableConsistentCompileAnalysis`,
which enables the new "Consistent" Analysis format,
which is faster and more repeatable than the status quo.
This is initialized to `true` by default.
It can be opted out either by the setting or using
`-Dsbt.analysis2024=false`.
2024-04-14 23:17:04 -04:00
eugene yokota ec02bf3dc2
Merge pull request #7480 from lrytz/lib-unfreeze-m
Add support for SIP-51 (unfreezing the Scala library)
2024-04-08 01:10:05 -04:00
Seth Tisue 735214afd0 Scala 2.12.19 (was 2.12.18), scala-xml 2.2.0 (was 2.1.0) 2024-03-16 11:39:55 +01:00
Lukas Rytz 4a1ba0c970 tests for standard library unfreezing 2024-02-27 10:56:30 +01:00
Lukas Rytz d8d2b02e7e Use the ordinary compiler classpath for scala-library
No longer pass `-bootclasspath /path/to/scala-library.jar` to the Scala
compiler, put the library on the ordinary classpath.
2024-02-26 13:49:04 +01:00
Eugene Yokota f6e195cf73 Disable run/non-local-main 2023-11-28 00:35:44 -05:00
Eugene Yokota 520b52656f Mark source-dependencies/false-error passing 2023-11-27 23:26:04 -05:00
Eugene Yokota 7a60c3e4dc Disable run/fork-loader test 2023-11-27 23:24:48 -05:00
xuwei-k 33ea2e06e0 update test scala versions 2023-10-19 13:39:12 +09:00
Eugene Yokota 2956f168db Make loading order alphabetical for plugins
**Problem**
Plugins are topologically sorted, but plugins with equal weigh could
modify the same key via `~=` etc, resulting in different builds
depending on the artifact.

**Solution**
This attempts to fix that by first sorting the selected plugins
by the class name before sorting it topologically.
2023-10-15 22:09:23 -04:00
adpi2 da41144f37
Merge pull request #7350 from dragos/commands-progress
Add a new CommandProgress API.
2023-10-12 09:24:14 +02:00
xuwei-k 8d44bbb8a5 avoid deprecated `java.net.URL` constructor
- https://bugs.openjdk.org/browse/JDK-8295949
- 4338f527aa
2023-10-08 17:49:20 +09:00
adpi2 d53ccda9c4
Merge branch '1.10.x' into commands-progress 2023-10-04 09:49:05 +02:00
Michel Davit c5fd4f2e6d Support cross-build for external project ref 2023-10-03 16:12:54 +02:00
Eugene Yokota b1e9308ebe Use binary compiler bridge
Problem
-------
Starting Scala 2.13.12, Scala 2 has in-sourced the compiler bridge
implementtion, which hopefully will be kept up to date more than the
ones in Zinc.

Solution
--------
This switches to using the pre-compiled compiler bridge for >=2.13.12.
2023-09-11 23:15:15 -04:00
Iulian Dragos 8c9600249e
Add scripted test 2023-08-17 15:56:04 +02:00
Eugene Yokota de20328029 Let ++ fall back to a bincompat Scala version
Fixes https://github.com/sbt/sbt/issues/7327

**Problem**
In builds with mixed Scala patch versions (like scalameta),
it's possible for a core subproject to be set to the lastest 2.12.x,
but the compiler plugin component is cross published to 2.12.0 etc.
`++ 2.12.0` in this case does not work since sbt 1.7.x onwards requires
the queried Scala version to be listed in `crossScalaVersions`.

**Solution**
This implements sbt 1.6.x-like fallback mechanism,
but instead of using the queried version (e.g. 2.12.0) it will set
the Scala version to one of listed versions that is binary compatible.
2023-07-09 18:31:55 -04:00
xuwei-k c7ec22cff8 avoid deprecated `java.net.URL` constructor
- https://bugs.openjdk.org/browse/JDK-8295949
- 4338f527aa
2023-06-25 08:23:09 +09:00
xuwei-k 74be55d0f6 update scala versions in scripted test 2023-06-24 10:18:14 +09:00
Julien Richard-Foy 72bfb3f45a Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00
Ondra Pelech 9ec7c4f027 Dependency graph with colors (based on the organization) (#7052) 2023-06-17 02:29:48 +02:00