Commit Graph

2446 Commits

Author SHA1 Message Date
Eugene Yokota 01d5f9c050 feat: plugin cross building as Scala cross building
**Problem**
Since Scala cross building works better than the plugin cross building `^^`,
it was common for plugin authors to encode plugin cross building as Scala cross building
given that we usually have zero or one sbt release in one Scala version.

**Solution**
This brings in the setting into SbtPlugin so plugin authors can cross build
using sbt 2.x.
2024-09-22 17:25:08 -04:00
Eugene Yokota 354dd25988 fix: Fix common settings loading when root is synthetic
**Problem**
The new common settings feature doesn't work when the root isn't created by the user.

**Solution**
This fixes common settings by calling `expandCommonSettingsPerBase(...)` on
the synthetic root's base first.
2024-09-22 16:51:10 -04:00
eugene yokota 864da879c6
Merge pull request #7691 from eed3si9n/wip/root_skip_publish
[2.x] fix: skip publish on synthetic aggregate root
2024-09-22 15:48:39 -04:00
eugene yokota 39e5a1f7eb
Merge branch 'develop' into wip/root_skip_publish 2024-09-22 01:00:03 -04:00
eugene yokota 4ff0477e1e
Merge branch 'develop' into wip/matrix_followup 2024-09-22 00:59:36 -04:00
Eugene Yokota 6491e50449 fix: skip publish on synthetic aggregate root
**Problem**
There's been previous attempt like 1878 to skip publishing of the root,
but it seems like the behavior has regressed at some point in time.

**Solution**
This skips publishing on synthetic aggregate root project.
2024-09-22 00:53:10 -04:00
Eugene Yokota fb4b433db3 Make Scala 3 the default axis, instead of 2.13 2024-09-21 22:40:19 -04:00
Eugene Yokota 2a3ea0837b feat: Rename testQuick to test
**Problem**
We have incremental testing, but it's not used by default.

**Solution**
This renames testQuick to test, and test to testFull.
2024-09-18 22:57:47 -04:00
Adrien Piquerez f08f272d23 [2.x] Fix scripted cache tests 2024-09-18 10:28:11 +02:00
eugene yokota 733b526ac5
Merge pull request #7681 from adpi2/sbt-projectmatrix
[2.x] Merge sbt-projectmatrix
2024-09-17 18:28:35 -04:00
eugene yokota 97823b18b0
[2.x] fix: Invalidate testQuick on test argument changes (#7680)
**Problem**
testQuick currently does not invalidate on argument changes.

**Solution**
This includes test argument digests.

---------

Co-authored-by: adpi2 <adrien.piquerez@gmail.com>
2024-09-17 17:48:53 -04:00
adpi2 6a2c4e56ea
Merge branch 'develop' into sbt-projectmatrix 2024-09-17 17:03:20 +02:00
Adrien Piquerez b59856bcba Merge sbt-projectmatrix 2024-09-17 17:02:30 +02:00
Adrien Piquerez 7c01636efa Move sources from sbt-projectmatrix 2024-09-17 17:00:04 +02:00
eugene yokota cb9a455915
Merge pull request #7676 from eed3si9n/wip/invalidate-on-resource
[2.x] fix: Invalidate testQuick on resource file changes
2024-09-17 10:26:15 -04:00
Eugene Yokota 803e575b8a feat: Use _sbt2_3 suffix
**Problem**
The extra attribute is a vestige from the days when sbt plugins were published on Ivy repos.

**Solution**
This uses normal suffix system.
2024-09-16 00:51:00 -04:00
Eugene Yokota c13c25fdff fix: Invalidate testQuick on resource file changes
**Problem**
testQuick currently does not invalidate on resource file changes.

**Solution**
This includes resource digests into the input.
2024-09-15 18:13:56 -04:00
Eugene Yokota 4af0024238 refactor: Move scripted-sbt-redux back to scripted-sbt
**Problem**
During sbt 1.x we created scripted-sbt-redux for package name change.

**Solution**
We can move the module back to scripted-sbt, which simplifies things.
2024-09-15 01:58:23 -04:00
Eugene Yokota c8de828830 refactor: Remove unused tasks
**Problem/Solution**
Unused setting ends up showing warnings on startup.
This removes the unused settings from sbt 1.x remote cache.
2024-09-14 23:33:13 -04:00
Eugene Yokota a58950e65e Comment out cleanEvalClasses
**Problem**
reload currently causes NoClassDefFoundError.

**Solution**
Comment out cleanEvalClasses.
2024-09-13 02:03:42 -04:00
eugene yokota a0597e9935
Merge branch 'develop' into wip/testquick 2024-09-12 08:15:04 -04:00
Eugene Yokota e9c04108bd Add extraTestDigests key 2024-09-12 02:23:25 -04:00
Adrien Piquerez 5c200d6258 Optimize ScopeFilter 2024-09-10 11:39:40 +02:00
Eugene Yokota 947ae1e8eb Implement remote test caching 2024-09-08 15:50:26 -04:00
Eugene Yokota f12cbcb450 Include classesDirectory into the digest 2024-09-08 12:56:49 -04:00
Eugene Yokota 0021c3a0bd Refactor to definedTestDigests task 2024-09-08 12:54:36 -04:00
Eugene Yokota 721f202ae5 Hermetic incremental test
**Problem**
Current implementation of testQuick depends on the concept of timestamp,
which probably won't work well with the new consistent analysis store or
the idea of remote caching.

**Solution**
This is a step towards cached testing by making the incrementality hermetic
(no longer depends on the timestamp). Instead this calculates the aggregated
SHA-256 of the class files involved in the test.
2024-09-08 12:50:45 -04:00
Adrien Piquerez b1564d4888 Add cachePath to CompileInputs2 to fix dependency-management/test-artifact
We cannot recover compilation after the path of the Zinc cache changed
2024-08-27 16:02:27 +02:00
Adrien Piquerez 47c60bab2e Fix cleaning packed dir
`clean` should delete the packed dir. If it does not,
the next `compileIncremental`, which is a cache hit, will see that
the packed dir is already there and will not unpack it.
2024-08-26 16:29:21 +02:00
Eugene Yokota b7e037adbb Use VirtualFileRef of the classes directory 2024-08-22 01:49:49 -04:00
Eugene Yokota d9e3bb52b3 Remove unnecessary settings 2024-08-18 12:57:29 -04:00
Eugene Yokota e0f0550276 Migrate cachedCompileIncrementalTask to dir caching 2024-08-18 12:57:29 -04:00
Eugene Yokota 3ef3a605c2 Merge branch '1.10.x' into wip/merge-1.10.x 2024-08-18 12:37:24 -04:00
Eugene Yokota 4752e180fd Update lm 2024-06-09 17:56:17 -04:00
Adrien Piquerez 3ec8bd2269 Fix fetching Scala 2.13.12 bridges 2024-06-06 17:41:20 +02:00
Adrien Piquerez 64a8d5ff31 Fix Defaults 2024-06-06 10:36:29 +02:00
Adrien Piquerez 492cd2c091 Fix compilation 2024-06-06 10:36:29 +02: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 9a3c4a6f53 Fix dependency-management/force-update-period 2024-05-21 16:54:14 +02:00
Adrien Piquerez f990bd2d8d [BSP] Fix importing Optional project dependency 2024-05-21 15:56:37 +02: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 bc4d5830e9 Banner for sbt 1.10.0 2024-05-05 22:38:05 -04:00
Eugene Yokota ae1f829f9f Include universal macOS sbtn 2024-05-05 22:34:58 -04:00
Eugene Yokota aac79df4a3 Fix old Dotty plugin compat
**Problem**
https://github.com/scala/scala3/pull/20157 identified that
`sbt-dotty/dotty-knowledge.i17` scripted test fails on sbt 1.10.0-RC2.
The regression happened in https://github.com/sbt/sbt/pull/7480/files#diff-6d9589bfb3f1247d2eace99bab7e928590337680d1aebd087d9da286586fba77L739-L740
where global setting was removed, and moved to project level.

**Solution**
This restores the global setting that is apparently referenced by
now defunct Dotty plugin.
2024-05-05 01:55:32 -04:00
Adrien Piquerez 2e439cab1e [2.x] report cache errors
Report a cache error if the output file of a task is not cacheable
2024-04-24 10:41:56 +02:00
Adrien Piquerez 7c51ba2f64 Revert "Use fileConverter in cacheStore" 2024-04-17 09:30:44 +02:00
Adrien Piquerez 1472ac287f [2.x] Fix dependency-management/force-update-period 2024-04-16 15:23:40 +02:00
eugene yokota 422d9e735f
Fix typo 2024-04-15 10:44:17 -04: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 b19a54a1ef Improve the SIP-51 error message 2024-04-14 21:18:15 -04:00