diff --git a/build.sbt b/build.sbt index 9d29bfcb6d6a..9425c4eed1e9 100644 --- a/build.sbt +++ b/build.sbt @@ -36,6 +36,7 @@ val `dist-linux-aarch64` = Build.`dist-linux-aarch64` val `community-build` = Build.`community-build` val `sbt-community-build` = Build.`sbt-community-build` val `scala3-presentation-compiler` = Build.`scala3-presentation-compiler` +val `scala3-presentation-compiler-testcases` = Build.`scala3-presentation-compiler-testcases` val sjsSandbox = Build.sjsSandbox val sjsJUnitTests = Build.sjsJUnitTests diff --git a/presentation-compiler/test/dotty/tools/pc/base/BasePCSuite.scala b/presentation-compiler/test/dotty/tools/pc/base/BasePCSuite.scala index 1158e433e732..a26c31ef084d 100644 --- a/presentation-compiler/test/dotty/tools/pc/base/BasePCSuite.scala +++ b/presentation-compiler/test/dotty/tools/pc/base/BasePCSuite.scala @@ -25,9 +25,9 @@ import org.junit.runner.RunWith import scala.meta.pc.CompletionItemPriority object TestResources: - val scalaLibrary = BuildInfo.ideTestsDependencyClasspath.map(_.toPath).toSeq + val classpath = BuildInfo.ideTestsDependencyClasspath.map(_.toPath).toSeq val classpathSearch = - ClasspathSearch.fromClasspath(scalaLibrary, ExcludedPackagesHandler.default) + ClasspathSearch.fromClasspath(classpath, ExcludedPackagesHandler.default) @RunWith(classOf[ReusableClassRunner]) abstract class BasePCSuite extends PcAssertions: @@ -38,11 +38,11 @@ abstract class BasePCSuite extends PcAssertions: val executorService: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor() val testingWorkspaceSearch = TestingWorkspaceSearch( - TestResources.scalaLibrary.map(_.toString) + TestResources.classpath.map(_.toString) ) lazy val presentationCompiler: PresentationCompiler = - val myclasspath: Seq[Path] = TestResources.scalaLibrary + val myclasspath: Seq[Path] = TestResources.classpath val scalacOpts = scalacOptions(myclasspath) val search = new MockSymbolSearch( testingWorkspaceSearch, diff --git a/project/Build.scala b/project/Build.scala index b2aca3705d83..f36171aabbcd 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1425,7 +1425,7 @@ object Build { lazy val `scala3-presentation-compiler` = project.in(file("presentation-compiler")) .withCommonSettings(Bootstrapped) - .dependsOn(`scala3-compiler-bootstrapped`, `scala3-library-bootstrapped`) + .dependsOn(`scala3-compiler-bootstrapped`, `scala3-library-bootstrapped`, `scala3-presentation-compiler-testcases`) .settings(presentationCompilerSettings) .settings(scala3PresentationCompilerBuildInfo) .settings( @@ -1436,6 +1436,7 @@ object Build { def scala3PresentationCompilerBuildInfo = Seq( ideTestsDependencyClasspath := { + val testCasesLib = (`scala3-presentation-compiler-testcases` / Compile / classDirectory).value val dottyLib = (`scala3-library-bootstrapped` / Compile / classDirectory).value val scalaLib = (`scala3-library-bootstrapped` / Compile / dependencyClasspath) @@ -1443,7 +1444,7 @@ object Build { .map(_.data) .filter(_.getName.matches("scala-library.*\\.jar")) .toList - dottyLib :: scalaLib + testCasesLib :: dottyLib :: scalaLib // Nil }, Compile / buildInfoPackage := "dotty.tools.pc.buildinfo", @@ -1503,6 +1504,10 @@ object Build { ) } + lazy val `scala3-presentation-compiler-testcases` = project.in(file("presentation-compiler-testcases")) + .dependsOn(`scala3-compiler-bootstrapped`) + .settings(commonBootstrappedSettings) + lazy val `scala3-language-server` = project.in(file("language-server")). dependsOn(dottyCompiler(Bootstrapped)). settings(commonBootstrappedSettings).