Commit Graph

29 Commits

Author SHA1 Message Date
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
xuwei-k c5b7038f3a use `given` instead of `implicit val` 2024-11-17 17:35:23 +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
Adrien Piquerez 327d05e28f Remove unused Structure.taskToKey 2024-11-13 11:22:53 +01:00
Adrien Piquerez e5cedbe56b Fuse Info in Task to reduce instances 2024-11-12 17:05:20 +01:00
Eugene Yokota 56941dac04 refactor: Update Scala 3 syntax 2024-10-27 23:55:30 -04:00
Adrien Piquerez d0003bbb0f Fix Eval on Windows 2024-10-11 14:32:32 +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 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 c81d269ed2 Merge branch '1.10.x' into wip/merge-1.10.x 2024-05-07 04:39:25 -04:00
Adrien Piquerez 654d35d1ba Fix triggeredBy and runBefore 2024-04-02 17:47:48 +02:00
Adrien Piquerez e62984846b Re-implement BuildServerEvalReporter 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 5d0a0b7356 Uncomment EmbeddedXmlSpec 2024-03-05 10:09:22 +01:00
Adrien Piquerez 5425e066a0 Fix SbtRefactorings 2024-02-13 14:01:26 +01:00
Adrien Piquerez 739dedb017 Remove usage of Manifest in Structure.scala 2024-02-12 15:22:09 +01:00
Adrien Piquerez 013194c217 Rename to SbtParserErrorSpec 2024-02-08 13:29:15 +01:00
Adrien Piquerez 245d13575a Refactor xml test in ErrorSpec 2024-02-08 13:28:19 +01:00
Adrien Piquerez 135ab16b5c Remove outdated test in ErrorSpec 2024-02-08 13:21:04 +01:00
Adrien Piquerez 5990775a43 Fix test in ErrorSpec 2024-02-08 13:12: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
Adrien Piquerez 7ea0506736 Introduce TaskId to reduce abstraction around Execute 2023-11-28 14:26:52 +01:00
Eugene Yokota f8f8db9e58 Update to Scala 3.3.1 2023-11-25 15:50:50 -05:00
Eugene Yokota 8c2e4f936e Fix lazy val support
Problem
-------
By Typer phase it seems like lazy val is expanded out to
`def x(): Int` and synthetic `val x$lzy1`,
which results in NoSuchMethod `x$lzy1`.

Solution
--------
Assume the naming convention and grab the part before `$`.
2023-01-15 23:48:13 -05:00
Eugene Yokota 4f85c11e01 Some minor tweaks to get things moving 2023-01-15 23:48:13 -05:00
Eugene Yokota cba7a0efc3 Refactor to build mainProj 2023-01-15 23:48:11 -05:00
Eugene Yokota 81a05430bd Split buildfile parsing to a subproject 2023-01-15 23:45:30 -05:00