Eugene Yokota
eb7d43c363
Refactor RefThenConfig to be an opaque type
2024-11-26 04:55:08 -05:00
Eugene Yokota
320a8c7204
Avoid inline for slash apparently
2024-11-26 01:43:12 -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
19ed461933
Remove conversion from Reference to RichReference
2024-11-24 23:11:55 -05:00
Eugene Yokota
4e3fbcced9
Refactor ScopeAxis to use enum
2024-11-24 23:10:18 -05: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
xuwei-k
5dd0ab0e60
use extension instead of implicit
2024-11-17 10:24:33 +09:00
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