From 129b38f55b541f3ca215edd660bc7f5c89284df9 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Wed, 27 Mar 2024 15:05:29 +0100 Subject: [PATCH] Fix tests/serial --- main/src/main/scala/sbt/ProjectExtra.scala | 17 +++++++++-------- sbt-app/src/sbt-test/tests/serial/build.sbt | 12 +++--------- .../src/sbt-test/tests/serial/{pending => test} | 0 3 files changed, 12 insertions(+), 17 deletions(-) rename sbt-app/src/sbt-test/tests/serial/{pending => test} (100%) diff --git a/main/src/main/scala/sbt/ProjectExtra.scala b/main/src/main/scala/sbt/ProjectExtra.scala index b7c956adc..08f845816 100755 --- a/main/src/main/scala/sbt/ProjectExtra.scala +++ b/main/src/main/scala/sbt/ProjectExtra.scala @@ -56,6 +56,7 @@ import sjsonnew.JsonFormat import scala.annotation.targetName import scala.concurrent.{ Await, TimeoutException } import scala.concurrent.duration.* +import ClasspathDep.* /* sealed trait Project extends ProjectDefinition[ProjectReference] with CompositeProject { @@ -637,13 +638,12 @@ trait ProjectExtra extends Scoped.Syntax: given classpathDependency[A](using Conversion[A, ProjectReference] ): Conversion[A, ClasspathDep[ProjectReference]] = - (a: A) => ClasspathDep.ClasspathDependency(a, None) + (a: A) => ClasspathDependency(a, None) extension (p: ProjectReference) - def %(conf: Configuration): ClasspathDep.ClasspathDependency = %(conf.name) + def %(conf: Configuration): ClasspathDependency = %(conf.name) @targetName("percentString") - def %(conf: String): ClasspathDep.ClasspathDependency = - ClasspathDep.ClasspathDependency(p, Some(conf)) + def %(conf: String): ClasspathDependency = ClasspathDependency(p, Some(conf)) extension [A1](in: Def.Initialize[Task[A1]]) def updateState(f: (State, A1) => State): Def.Initialize[Task[A1]] = @@ -712,12 +712,13 @@ trait ProjectExtra extends Scoped.Syntax: p: T )(implicit ev: T => ProjectReference): Constructor = new Constructor(p) - - implicit def classpathDependency[T]( - p: T - )(implicit ev: T => ProjectReference): ClasspathDependency = ClasspathDependency(p, None) */ + implicit def classpathDependency[T](p: T)(implicit + ev: T => ProjectReference + ): ClasspathDependency = + ClasspathDependency(ev(p), None) + // Duplicated with Structure // These used to be in Project so that they didn't need to get imported (due to Initialize being nested in Project). diff --git a/sbt-app/src/sbt-test/tests/serial/build.sbt b/sbt-app/src/sbt-test/tests/serial/build.sbt index 11e892129..5f999ecb6 100644 --- a/sbt-app/src/sbt-test/tests/serial/build.sbt +++ b/sbt-app/src/sbt-test/tests/serial/build.sbt @@ -10,20 +10,14 @@ val commonSettings = Seq( lazy val root = (project in file(".")) .aggregate(sub1, sub2) - .settings( - commonSettings - ) + .settings(commonSettings) lazy val rootRef = LocalProject("root") lazy val sub1 = project .dependsOn(rootRef) - .settings( - commonSettings - ) + .settings(commonSettings) lazy val sub2 = project .dependsOn(rootRef) - .settings( - commonSettings - ) + .settings(commonSettings) diff --git a/sbt-app/src/sbt-test/tests/serial/pending b/sbt-app/src/sbt-test/tests/serial/test similarity index 100% rename from sbt-app/src/sbt-test/tests/serial/pending rename to sbt-app/src/sbt-test/tests/serial/test