Commit Graph

3732 Commits

Author SHA1 Message Date
xuwei-k 3d6286edc2 remove unnecessary vararg splice 2025-01-01 15:47:55 +09:00
friendseeker c834f500b9
Add comment 2024-12-30 19:30:15 -08:00
Friendseeker 1a8fa65af3 Avoid upstream compilation when calling previousCompile 2024-12-30 17:55:42 -08:00
eugene yokota 439e24fb84
Merge pull request #7979 from eed3si9n/wip/retry 2024-12-30 08:47:04 -05:00
adpi2 011c7083ad
Merge pull request #7913 from Friendseeker/sbt-7510
[1.x] Implement `jvmBuildTarget` for `workspace/buildTargets`
2024-12-30 09:06:53 +01:00
xuwei-k f255c38892 use toIntOption instead of scala.util.Try 2024-12-30 13:13:53 +09:00
Eugene Yokota 799bd65ba5 fix: Retry create directory
**Problem**
Files.createDirectories can fail.

**Solution**
Use IO version, which retries.
2024-12-29 03:18:18 -05:00
Eugene Yokota 515cae27a8 Cache terminal capability
**Problem**
JSON-RPC is currently full of terminal capability query
since JLine seems to be asking them for each line.

**Solution**
This caches the query.
2024-12-28 04:09:01 -05:00
Friendseeker 13373415b3 Fix CI 2024-12-26 18:43:04 -08:00
friendseeker e23419efed Clean Zinc Cache for 'Compile / clean', 'Test / clean' 2024-12-26 15:37:33 -08:00
Friendseeker ad0ab07e99 Return jvmBuildTarget for workspace/buildTargets 2024-12-26 12:24:14 -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 8e13a43f48 Zinc 2.0.0-M3 2024-12-18 00:26:30 -05:00
Eugene Yokota 12db63951b Address reviews 2024-12-16 22:22:33 -05:00
Eugene Yokota 3d86f30837 Merge branch '1.10.x' into wip/merge-1.10.x 2024-12-16 03:20:10 -05:00
Eugene Yokota 0906b2d7ac fix: Use JDK path, not JRE path
**Problem**
There are a few places where javaHome or java path is set,
using java.home system property. The problem is that it points to JRE,
not JDK, so it would break on Java compilation etc.

**Solution**
If the path ends with jre, go up one directory.
2024-12-15 02:47:35 -05:00
Eugene Yokota c3e4bc53c4 Giter8 0.17.0
**Problem/Solution**
Bump to Giter8 0.17.0.
2024-12-14 01:42:48 -05:00
Matthew de Detrich eea840be2c Replace tuple with proper record type for licenses 2024-12-05 00:56:39 -05:00
Eugene Yokota 02c7cf309d Avoid the use of URL
**Problem**
`java.net.URL` calls out to the network to perform `equals`,
so we should remove that from anywhere that can be involved in caching etc.

**Solution**
This changes java.net.URL to java.net.URI in Keys.
2024-12-04 22:12:54 -05:00
Eugene Yokota ac4ba55e9e fix: Fix root project detection
**Problem**
Whether a subproject is root or not is currently detected by
comparing getCanonicalFile against the build base directory.
Problem is that often the root project uses "." as the directory,
and getting the canonical file works ok for the current build,
but it breaks when loading `ProjectRef`.
There might be other bugs related to the root project detection.

**Solution**
This factors out `isRootPath` function that's aware of the build base.

This PR adds the repro test prepared by xuwei-k.
2024-12-02 03:15:35 -05:00
Eugene Yokota 56e83977e9 fix: Remove -Wconf:cat=unused-nowarn:s
**Problem**
Currently the following warning shows up while compiling metabuild:

[warn] Failed to parse `-Wconf` configuration: cat=unused-nowarn:s
[warn] unknown category: unused-nowarn

-Wconf:cat=unused-nowarn in general was added as a Scala 2.12 of
falsely warning about pure expression not doing anything in the macro.

**Solution**
We should be able to remove the -Wconf flag in sbt 2.x.
2024-12-01 18:09:38 -05:00
Eugene Yokota 111eb123fa Call store.clearCache() 2024-11-30 00:51:20 -05:00
Eugene Yokota efe2a83c73 Zinc 1.10.5 2024-11-30 00:05:26 -05:00
eugene yokota f03ff1f32b
Merge pull request #7916 from Friendseeker/ctrl-c-background-task 2024-11-27 20:23:28 -05:00
friendseeker b49fe9dc97
Add boolean flag isAutoCancel
Address PR feedback from Eugene
2024-11-27 01:30:01 -08:00
friendseeker e613cb70ea
Avoid generation of negative frequency 2024-11-27 00:52:57 -08:00
Friendseeker 9494033bd6 Shutdown background jobs when pressing ctrl+c 2024-11-26 23:40:23 -08:00
friendseeker eefc89605e Improve message format for loading settings 2024-11-26 16:46:48 -08:00
Eugene Yokota eb7d43c363 Refactor RefThenConfig to be an opaque type 2024-11-26 04:55:08 -05:00
Eugene Yokota 70d7ddb258 Refactor slash syntax to mostly use methods
**Problem**
Slash syntax is currently implemented via a series of implicit
converters (Conversion), which is not nice, partly because
the behavior is difficult to follow.

**Solution**
This removes all the implicit converters and moves the slashes
into:
1. / methods under Reference for subproject scoping.
2. / methods under ScopeAxis with Reference type constraint
   for the initial Zero scoping.
3. Return RefThenConfig structure for intermediate config scoping.
4. / method under `Scoped`, which is base trait for the keys
   to implement task scoping e.g. `compile / scalacOptions`.
5. Extension methods for ConfigKey.
6. Extension methods for AttributeKey.
2024-11-25 04:54:40 -05:00
Eugene Yokota 4e3fbcced9 Refactor ScopeAxis to use enum 2024-11-24 23:10:18 -05:00
Eugene Yokota 56377274b7 fix: Fix Scala 3.x - 2.12 sandwich for matrix
Problem
Currently Scala 3.x - 2.13 sandwich doesn't seem to work for projectMatrix.
This is due to isScala2Scala3Sandwich checking for "3." while projectMatrix
uses scalaBinaryVersion, which is 3.

Solution
This consolidates the implementation of isScala2Scala3Sandwich with the one
in Defaults module, and check for both "3" and "3."
2024-11-23 04:05:28 -05:00
eugene yokota f25fde18a4
Merge pull request #7906 from Friendseeker/sbt-6905
[1.x] Synchronize `dependencyTree` console output
2024-11-22 16:28:40 -05:00
eugene yokota 0ec6424a51
Merge pull request #7905 from Friendseeker/sbt-7828
[1.x] Synchronize `java.awt.Desktop.browse()`
2024-11-22 00:30:59 -05:00
Friendseeker 27cec84333 Synchronize dependencyTree console output 2024-11-21 17:36:22 -08:00
Friendseeker de4c3da451 Add synchronized for desktop.browse() 2024-11-21 17:02:15 -08:00
Friendseeker c8940bfba0 Respect dependencyBrowseGraphTarget, dependencyBrowseTreeTarget 2024-11-21 16:24:49 -08:00
xuwei-k d8705bbac0 use given instead of implicit object 2024-11-18 17:09:03 +09:00
xuwei-k f11d9d76f0 remove more implicit. use given and using 2024-11-18 14:39:00 +09:00
xuwei-k d193c990d1 remove implicit params. change to using 2024-11-18 06:49:22 +09:00
xuwei-k c5b7038f3a use `given` instead of `implicit val` 2024-11-17 17:35:23 +09:00
friendseeker 1ec08180f7
Remove enableConsistentCompileAnalysis & enableBinaryCompileAnalysis 2024-11-16 21:27:29 -08:00
friendseeker b4e9469816
Add double quote around thread name 2024-11-16 13:16:40 -08:00
Eugene Yokota 29c77f6f5f Merge branch 'develop' into wip/scalainstance 2024-11-14 22:02:10 -05:00
adpi2 4c66e5a907
Merge branch 'develop' into 2.x-fuse-info 2024-11-13 17:08:37 +01:00
Adrien Piquerez 0ccf3325c8 Optimize indexing of aggregate keys
To build the index of all aggregate keys, we were computing the reverse
aggregation of each key, before indexing them.
And so each aggregate key was indexed many times, once for each
aggregated project. It was parallelized to reduce the latency.
In this PR, we compute the reverse aggregation of all the keys at once,
removing all duplication. We cannot parallelize this process anymore
but we don't need to, because it is a lot faster. It reduces the total
CPU time by 12%. The impact for the user depends on its number of cores.
2024-11-13 12:25:31 +01:00
Adrien Piquerez f4f185a1c1 Settings as a Map[ScopedKey[x], x]
Settings0 used to be a Map[Scope, AttributeMap], and is now a
Map[ScopedKey[x], x].
This is better because we don't need to decompose all ScopedKey[x]
into a Scope and an AttributeKey[x], for recomposing it back later,
which duplicates all ScopedKey[x]. It reduces the number of long-living
ScopedKey[x] by 8%, and the total number of instances by 1.4%.

Also it improves the performance of Settings0, which was responsible of
2.95% of the total CPU time, and is now responsible of 0.41%.
2024-11-13 12:25:31 +01:00
Adrien Piquerez 327d05e28f Remove unused Structure.taskToKey 2024-11-13 11:22:53 +01:00
Adrien Piquerez d54647a46c Use referential equality on Task 2024-11-13 10:55:29 +01:00
Eugene Yokota cfbc5c078a Merge branch 'develop' into wip/scalainstance 2024-11-13 00:31:53 -05:00
Adrien Piquerez e5cedbe56b Fuse Info in Task to reduce instances 2024-11-12 17:05:20 +01:00
Adrien Piquerez 6c226a2afd Reduce settings created by Defaults 2024-11-12 11:51:42 +01:00
Adrien Piquerez 8406fc86a8 Reduce settings created by ProjectMatrix 2024-11-12 11:51:42 +01:00
Adrien Piquerez 07ac8625e5 Reduce settings created by dependency-tree plugins 2024-11-12 11:51:31 +01:00
Eugene Yokota 258a831b03 Use ScalaInstance from update
**Problem**
doc task currently doesn't work.

**Solution**
For now turn off the optimized ScalaInstance
2024-11-12 03:44:52 -05:00
eugene yokota 583939fc3c
Merge pull request #7874 from xuwei-k/ClassLoaderWarmup-scala-2-universe
[2.x] update ClassLoaderWarmup.scala
2024-11-06 03:47:09 -05:00
xuwei-k 6e4c2ea275 update ClassLoaderWarmup.scala 2024-11-06 14:17:13 +09:00
Adrien Piquerez 2f726cddf0 Add comments 2024-11-05 11:36:18 +01:00
Friendseeker 8ce6c1b47e Pass `useConsistent` to `staticCachedStore` 2024-11-04 13:21:08 -08:00
Adrien Piquerez 8b5eaa2cd5 Cache delegates during Load 2024-11-04 10:43:42 +01: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 fae2bcc01b
Add documentation & deduplicate implementation 2024-10-29 21:40:51 -07:00
Friendseeker 92d4cfa690 Replace nnbsp with regular space 2024-10-29 17:43:33 -07:00
Friendseeker 828dc04808 Migrate all usages of `System.console == null` 2024-10-28 18:25:16 -07:00
eugene yokota 64f0acf05f
Merge pull request #7838 from Friendseeker/sbt-7017
[1.x] Pass reload action for `watchOnTermination` callback
2024-10-28 02:23:38 -04:00
friendseeker 6d4d2161b2
Set correct action for onTermination callback 2024-10-27 22:43:44 -07:00
eugene yokota 4e15180596
Merge pull request #7830 from Friendseeker/remove-early-output-version
[1.x] Use generic early output file name
2024-10-28 01:12:58 -04:00
Eugene Yokota 56941dac04 refactor: Update Scala 3 syntax 2024-10-27 23:55:30 -04:00
Eugene Yokota 14f7d29afc Contraband 0.7.0 2024-10-27 16:21:18 -04:00
friendseeker 7d674f6c93
Throw when template not found 2024-10-26 22:10:48 -07:00
Friendseeker 4beb78b260
Adopt PR feedbacks 2024-10-26 16:24:45 -07:00
xuwei-k 6922915949 use extension instead of implicit class 2024-10-26 09:05:27 +09:00
friendseeker 5e7fe0b158
Use more generic early output file name 2024-10-24 22:00:51 -07:00
eugene yokota 36fb500f8c
Merge pull request #7811 from Friendseeker/use-jline-jni
[1.x] Use `jline-terminal-jni` to replace deprecated Jansi & JNA Provider
2024-10-23 10:14:39 -04:00
philippus 1ba63a1c07
Deprecate useJCenter key 2024-10-23 07:56:00 +02:00
xuwei-k 7ecae27b3d use extension in OptionSyntax 2024-10-23 13:29:30 +09:00
xuwei-k 34832a1c3e delete sbt.internal.CompatParColls 2024-10-23 08:47:38 +09:00
xuwei-k ec70bae39a use extension instead of implicit class 2024-10-23 07:05:38 +09:00
Friendseeker 0e85726858 Use JNI to replace deprecated Jansi & JNA 2024-10-22 13:05:20 -07:00
xuwei-k 00d01ce215 Update scalafmt 2024-10-22 19:58:21 +09:00
friendseeker 9d5cddd171
Let Consistent Analysis to be opt-in by default 2024-10-21 22:00:25 -07:00
Friendseeker a959acd230 Fix more compile errors 2024-10-21 21:38:59 -07:00
Friendseeker b1c4c09a7f Fix bunch more compiler errors 2024-10-21 21:38:59 -07:00
Friendseeker 375e4f1d2e Fix bunch of unused imports 2024-10-21 21:38:59 -07:00
eugene yokota b8bef9d0b9
Merge pull request #7803 from Friendseeker/template-port-2
[2.x] update to latest versions in TemplateCommandUtil
2024-10-21 21:42:29 -04:00
eugene yokota 32464d382c
Merge pull request #7797 from Friendseeker/bump-scala-2
[2.x] Bump Scala 2.12 to 2.12.20
2024-10-21 21:41:28 -04:00
eugene yokota c39d74d062
Merge pull request #7801 from xuwei-k/delete-useJCenter
[2.x] delete `useJCenter` settingKey
2024-10-21 21:36:15 -04:00
kenji yoshida fe523c50bc update to latest versions in TemplateCommandUtil 2024-10-21 17:10:33 -07:00
xuwei-k 026f78d056 delete useJCenter settingKey 2024-10-22 09:00:05 +09:00
xuwei-k a99398eb84 update sbtResolvers default value 2024-10-22 07:25:22 +09:00
Friendseeker dd16c9b0db Bump Scala 2 to 2.19.20 2024-10-21 15:11:52 -07:00
SlowBrainDude b1b5caa1ca Fix stale BSP diagnostics
The BSP server didn't reset old diagnostic messages sent to BSP clients under
certain circumstances. This commit mitigates this edge case and ensures that
diagnostics for files that previously had compilation problems are properly
reset when fresh diagnostics messages are sent.

The culprit was a mismatch of map keys: Files with problems were sometimes recorded
under an absolute path, but later attempted to be retrieved by virtual path.
2024-10-21 12:18:41 -07:00
James Roper 4b75c97f69 Include ALL sources, and resources in source jar
This follows on from #7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
2024-10-19 23:09:51 -07:00
Eugene Yokota b7a687356f deps: Zinc 1.10.3 2024-10-19 12:15:16 -04:00
xuwei-k 6bf5b8b30f Update contraband sources 2024-10-18 20:34:44 +09:00
xuwei-k 6372c2056a fix old `in` syntax 2024-10-15 14:54:52 +09:00
Adrien Piquerez c82f13c2db Fix csrCacheDirectory and add test 2024-10-14 15:35:14 +02:00
adpi2 6d6cbce465
Merge pull request #7739 from adpi2/2.x-lm-coursier
[2.x] Merge librarymanagement and sbt-coursier
2024-10-11 16:14:17 +02:00
Seth Tisue f06b7622be Scala 2.12.20 (was .19) 2024-10-10 12:53:31 -07:00
Eugene Yokota 65bc3d9722 fix: Resurrect or for tasks
**Problem**
1. `or` is missing
2. `?` should have English method name

**Solution**
1. This resurrects `or`
2. Name `??` as `option`, since `get` is taken
2024-10-10 02:39:52 -04:00
Adrien Piquerez 11002de212 Fix compilation in lm-core, lm-ivy 2024-10-09 13:34:32 +02:00
eugene yokota 713471bcc1
Merge pull request #7734 from Friendseeker/remove-deprecated-thread-id-2
[2.x] Remove deprecated `Thread.getId`
2024-10-06 23:41:27 -04:00
friendseeker 23b769efe6
Remove compile error in GCUtil
runFinalization is going to be removed
2024-10-06 19:09:39 -07:00
friendseeker cfb0c1953b
Remove deprecated Thread.getId call 2024-10-06 19:05:16 -07:00
eugene yokota c5b11a41a9
Merge pull request #7733 from Friendseeker/remove-deprecated-thread-id
[1.x] Remove deprecated `Thread.getId`
2024-10-06 21:48:16 -04:00
friendseeker 0b34b6b406
Remove deprecated Thread.getId call 2024-10-06 18:18:46 -07:00
friendseeker 48ac49d4ca Remove compile error in GCUtil
runFinalization is going to be removed
2024-10-06 18:14:09 -07:00
kenji yoshida b36cf81584
update to latest versions in TemplateCommandUtil 2024-10-06 19:36:12 +09:00
eugene yokota bb32c385fb
[2.x] fix: Append -root to synthetic root (#7716)
**Problem**
I notice that the synthetic root project ends up conflicting with
the projectMatrix on Scala 3, when the name of the matrix
matches the directory name, which is fairly common.

**Solution**
Append `-root` to the root project when there are multiple subprojects found.
2024-10-03 20:19:58 +02: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 eb5c3cfccf
[2.x] refactor: Remove useCoursier setting (drop Ivy) (#7712)
**Problem**
It's been a while since Coursier has been the default library management engine,
and we don't need to support two.

**Solution**
This removes `useCoursier` setting.
2024-10-02 14:33:54 -04:00
eugene yokota 59099cb3af Merge branch 'develop' into wip/query 2024-10-02 01:44:19 -04:00
eugene yokota 3c645bbeeb
Merge pull request #7688 from eed3si9n/wip/non-blocking-run
[2.x] feat: Non-blocking run
2024-10-01 16:47:26 -04:00
Eugene Yokota 8aa740574b Move suspendChannel to EvaluateTask 2024-10-01 03:15:28 -04:00
eugene yokota 683b09afa8
Update main/src/main/scala/sbt/internal/DefaultBackgroundJobService.scala
Co-authored-by: adpi2 <adrien.piquerez@gmail.com>
2024-10-01 00:46:52 -04:00
adpi2 a4ef38c5da
Merge pull request #7708 from adpi2/2.x-fix-7706
[2.x] Fix loading of `ScalaJSPlugin` in `ProjectMatrix`
2024-09-30 15:06:34 +02:00
adpi2 254ff06b6b
Merge branch 'develop' into 2.x-fix-7706 2024-09-30 14:06:23 +02:00
Adrien Piquerez be04ad552d Use projectMatrix caller to resolve plugins 2024-09-30 14:01:46 +02:00
Eugene Yokota 5684a842c3 refactor: Remove sbt 0.13 `in` methods
**Problem**
See https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#Migrating+to+slash+syntax

We should remove `scalacOptions in (Compile, console)` notation. This was deprecated in https://eed3si9n.com/sbt-1.5.0.

**Solution**
This renames `in` to `rescope` for internal usage, and ports the usages to slash.
2024-09-28 19:19:58 -04:00
Eugene Yokota 4e72eaecdf Remove scopedKeyAggregatedSep 2024-09-28 19:11:27 -04:00
Eugene Yokota 89517c642c Merge branch 'develop' into wip/query 2024-09-28 18:55:15 -04:00
Eugene Yokota a6b4cfef12 refactor: Remove old sbt 0.13 shell syntax 2024-09-28 13:51:14 -04:00
adpi2 aa280837c0
Merge branch 'develop' into wip/cross-building 2024-09-26 14:15:05 +02:00
adpi2 1a4cdf4862
Merge pull request #7697 from adpi2/2.x-source-compat
[2.x] Improve backward source compat
2024-09-26 09:28:26 +02:00
Eugene Yokota e61ae80088 feat: queriable slash syntax (sbt query)
**Problem**
We want a more flexible way of aggregating subprojects.

**Solution**
This implements a subproject filtering as a replacement of
the subproject axis in the act command.
2024-09-26 01:20:44 -04:00
Adrien Piquerez eda3a87e76 Resolve conflict between BuildSyntax.dependsOn and Scoped.dependsOn 2024-09-25 16:43:45 +02:00
Adrien Piquerez edd11a283e Make Classpaths.analyzed public 2024-09-25 15:32:04 +02:00
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 1f71332edc runBlock 2024-09-21 01:26:57 -04:00
Eugene Yokota c37b7a1555 feat: Non-blocking run
**Problem**
`run` currently blocks all other commands, such as BSP commands.

**Solution**
`run` no longer blocks the command execution loop.
Instead it pauses the prompt on the current command channel.
2024-09-20 04:00:03 -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 ddeb5dba2c 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-15 15:16:10 -04:00
Eugene Yokota 31dd85b7ba fix: Allow scripted to go through
**Problem**
Currently scripted does version checking to block sbt 2.x plugins
to be cross published from sbt 1.x.

**Solution**
Remove the sbt version matching.
2024-09-15 12:28:40 -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
SlowBrainDude f6663a0d6c Fix stale BSP diagnostics
The BSP server didn't reset old diagnostic messages sent to BSP clients under
certain circumstances. This commit mitigates this edge case and ensures that
diagnostics for files that previously had compilation problems are properly
reset when fresh diagnostics messages are sent.

The culprit was a mismatch of map keys: Files with problems were sometimes recorded
under an absolute path, but later attempted to be retrieved by virtual path.
2024-09-02 15:27:26 +02: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
James Roper a7481e49d0 Include ALL sources, and resources in source jar
This follows on from #7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
2024-08-26 13:07:17 +10: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
eugene yokota 0e67131beb
Update main/src/main/scala/sbt/Defaults.scala
Co-authored-by: adpi2 <adrien.piquerez@gmail.com>
2024-04-11 10:45:51 -04:00
Eugene Yokota 33d50e2f47 Success log change fix 2024-04-11 13:55:29 +02:00
Eugene Yokota 86cf7c3a0c Remote caching support
This implements Bazel-compat remote caching support via a plugin.
2024-04-11 13:55:29 +02:00
Philippus Baalman f89505bb03
Remove superfluous space 2024-04-11 07:21:26 +02:00
Adrien Piquerez 8865565004 Fix classloader-cache/resources 2024-04-10 15:32:50 +02:00
Adrien Piquerez eda67a05fc Use fileConverter in cacheStore
Otherwise the store cannot sync files that are not in the out folder.
2024-04-09 16:09:44 +02:00
Adrien Piquerez 9e6612a3f8 Fix hashing of incrementalCompile 2024-04-09 15:33:22 +02:00
Adrien Piquerez ab1aa6d001 Fix todos in actions/compile-clean 2024-04-09 15:33:22 +02:00
Adrien Piquerez e1cf43c6bd Add jar file to compileOutputs 2024-04-09 15:33:22 +02:00
Adrien Piquerez 85fcb014f0 Fix data race to remote cache on classpath analyses
The attributed classpath should point to the existing analysis file in the target folder to avoid data racing to the remote cache.
2024-04-08 16:34:18 +02:00
Adrien Piquerez 1c03463e19 Fix test-quick 2024-04-08 10:05:52 +02:00
Adrien Piquerez b0f3cb0a8e Fix actions/completions
When loading a scripted test, sbt creates a jar file and loads it.
The path of the jar file is the same for all the batched tests.
We must prevent the JDK from caching this jar file to force a reload after each test.
Otherwise sbt tries to load the auto-plugins of a previous test and fails.
2024-04-08 10:05:52 +02: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
Adrien Piquerez 129b38f55b Fix tests/serial 2024-04-02 17:49:12 +02:00
Adrien Piquerez d9b024cf91 fix project1/ignore-hidden-build-files 2024-04-02 17:49:12 +02:00
Adrien Piquerez 4a946a68cd Fix project1/extra 2024-04-02 17:49:12 +02:00
Adrien Piquerez 222410009b fix no-scala-tool 2024-04-02 17:49:12 +02:00