mirror of https://github.com/sbt/sbt.git
Fix aggregation
This commit is contained in:
parent
a20d5205af
commit
fc31bc3d15
|
|
@ -251,12 +251,12 @@ object Aggregation {
|
|||
proj: Option[Reference],
|
||||
extra: BuildUtil[Proj],
|
||||
reverse: Boolean
|
||||
): Seq[ProjectRef] = {
|
||||
): Seq[ProjectRef] =
|
||||
val resRef = proj.map(p => extra.projectRefFor(extra.resolveRef(p)))
|
||||
resRef.toList.flatMap(ref =>
|
||||
if (reverse) extra.aggregates.reverse(ref) else extra.aggregates.forward(ref)
|
||||
)
|
||||
}
|
||||
resRef.toList.flatMap { ref =>
|
||||
if reverse then extra.aggregates.reverse(ref)
|
||||
else extra.aggregates.forward(ref)
|
||||
}
|
||||
|
||||
def aggregate[T, Proj](
|
||||
key: ScopedKey[T],
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ object BuildUtil {
|
|||
val depPairs =
|
||||
for {
|
||||
(uri, unit) <-
|
||||
units.toIterable // don't lose this toIterable, doing so breaks actions/cross-multiproject & actions/update-state-fail
|
||||
units.toSeq // don't lose this toSeq, doing so breaks actions/cross-multiproject & actions/update-state-fail
|
||||
project <- unit.projects
|
||||
ref = ProjectRef(uri, project.id)
|
||||
agg <- project.aggregate
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package foo
|
||||
|
||||
object B
|
||||
|
||||
|
|
@ -6,6 +6,11 @@ $ exists core/target/scala-3.0.2
|
|||
-$ exists subproj/target/scala-3.1.2
|
||||
|
||||
> clean
|
||||
-$ exists core/target/scala-3.0.2
|
||||
-$ exists core/target/scala-3.1.2
|
||||
-$ exists subproj/target/scala-3.0.2
|
||||
-$ exists subproj/target/scala-3.1.2
|
||||
|
||||
> ++3.1.2 compile
|
||||
|
||||
-$ exists core/target/scala-3.0.2
|
||||
|
|
|
|||
Loading…
Reference in New Issue