Commit Graph

278 Commits

Author SHA1 Message Date
adpi2 4c66e5a907
Merge branch 'develop' into 2.x-fuse-info 2024-11-13 17:08:37 +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
eugene yokota 661f1fa216
Merge pull request #7880 from adpi2/2.x-settings
[2.x] Reduce creation of `Setting` and `Initialize`
2024-11-12 22:41:42 -05:00
Adrien Piquerez e5cedbe56b Fuse Info in Task to reduce instances 2024-11-12 17:05:20 +01:00
Adrien Piquerez c838094672 Optimize Previous 2024-11-12 10:56:31 +01:00
eugene yokota f7160ba8d8
Merge pull request #7875 from eed3si9n/wip/slash-tests 2024-11-07 12:33:16 -05:00
Eugene Yokota a34bb4756c Resurrect property-based testing for slash syntax 2024-11-06 03:43:39 -05:00
Adrien Piquerez 2f726cddf0 Add comments 2024-11-05 11:36:18 +01:00
Adrien Piquerez 9382fc99b7 Use caching in Project.transform 2024-11-04 10:43:42 +01:00
Adrien Piquerez 5bbe871882 Cleaning Scope 2024-11-04 10:43:42 +01:00
Adrien Piquerez 2015c5d41a Add ThisBuildScope 2024-11-04 10:43:42 +01:00
Adrien Piquerez a28428f96c Pre-compute hashCode 2024-11-04 10:43:42 +01:00
Adrien Piquerez 4a429b2fe2 Add uniqueness cache on Scope 2024-11-04 10:43:28 +01:00
Eugene Yokota 56941dac04 refactor: Update Scala 3 syntax 2024-10-27 23:55:30 -04:00
Friendseeker f87ffc8042 Fix CI compile errors 2024-10-21 21:38:59 -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
João Ferreira fe045bfa12 remove unused comment 2024-10-09 11:04:47 +01:00
João Ferreira 3eb2d66b0f reenable some tests 2024-10-09 09:57:08 +01: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
Adrien Piquerez 31710c0879 Reduce allocation of Action.Mapped
For a tuple (t1, t2, ..., tn) of tasks we instantiate a unique Mapped instead of many
Mapped(t1, Mapped(t2, Mapped(...))
2024-10-02 15:54:20 +02:00
Adrien Piquerez e3449fff02 Reduce instances of Init.Apply 2024-10-02 11:05:37 +02: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
Adrien Piquerez be04ad552d Use projectMatrix caller to resolve plugins 2024-09-30 14:01:46 +02:00
Adrien Piquerez 56416901cf Add back `dependsOn` on inputTask 2024-09-30 14:00:08 +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
Adrien Piquerez eda3a87e76 Resolve conflict between BuildSyntax.dependsOn and Scoped.dependsOn 2024-09-25 16:43:45 +02:00
Adrien Piquerez 860f462f2f Add dependsOn on Initialize[Task[A]] 2024-09-25 15:32:04 +02:00
Adrien Piquerez f08f272d23 [2.x] Fix scripted cache tests 2024-09-18 10:28:11 +02:00
Adrien Piquerez b59856bcba Merge sbt-projectmatrix 2024-09-17 17:02:30 +02:00
xuwei-k 7279f659e0 Update .scalafmt.conf. re-format 2024-09-07 16:37:49 +09:00
Eugene Yokota eb9a507419 Refactor Def.declareOutputDirectory to return vf 2024-08-18 12:57:29 -04:00
Eugene Yokota 987ab5f214 Add Def.declareOutputDirectory function 2024-08-18 12:57:29 -04:00
Eugene Yokota c81d269ed2 Merge branch '1.10.x' into wip/merge-1.10.x 2024-05-07 04:39:25 -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
Eugene Yokota 86cf7c3a0c Remote caching support
This implements Bazel-compat remote caching support via a plugin.
2024-04-11 13:55:29 +02:00
Adrien Piquerez ab1aa6d001 Fix todos in actions/compile-clean 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 654d35d1ba Fix triggeredBy and runBefore 2024-04-02 17:47:48 +02:00
Adrien Piquerez 0005705eb6 Fix += on sourceGenerators 2024-03-27 14:41:24 +01:00
Adrien Piquerez b5afcf8a0c Fix server completion tests 2024-03-19 17:06:09 +01:00
Adrien Piquerez 12e9267e1e Remove more unused 2024-03-05 15:25:25 +01:00
Adrien Piquerez c15a4031a9 Fix or mute warnings 2024-03-05 10:39:00 +01:00
Adrien Piquerez 144b86e32e fix tag of InputTask 2024-02-12 15:28:57 +01:00
Adrien Piquerez 739dedb017 Remove usage of Manifest in Structure.scala 2024-02-12 15:22:09 +01:00
adpi2 64be877549
Merge pull request #7491 from adpi2/misc-cleanup
[2.x] Miscellaneous cleanup
2024-02-08 17:42:35 +01:00
Eugene Yokota 63ba90d198 Migrate postfix ops
**Problem**
There are a few places in the code that's using postfix ops.

**Solution**
This rewrites the expressions to use normal dot notaiton.
2024-02-07 11:40:45 -05:00
eugene yokota ecca26175e
[sbt 2.x] remote cache (#7464)
For the details about this PR, please see the blog post https://eed3si9n.com/sbt-remote-cache/.

* Add cache basics
* Refactor Attributed to use StringAttributeMap, which is Map[StringAttributeKey, String]
* Implement disk cache
* Rename Package to Pkg
* Virtualize packageBin
* Use HashedVirtualFileRef for packageBin
* Virtualize compile task
2024-02-07 10:34:06 -05:00
Adrien Piquerez ea4b38d1b1 Shorten fake task macro impl 2024-02-07 12:13:35 +01:00
Adrien Piquerez 7ac3cd321d Remove the unused ~> 2024-02-07 11:12:43 +01:00