@@ -1066,21 +1066,30 @@ object Build {
1066
1066
libraryDependencies += (" org.scala-sbt" %% " zinc-apiinfo" % " 1.8.0" % Test ).cross(CrossVersion .for3Use2_13)
1067
1067
)
1068
1068
1069
- lazy val `scala3-presentation-compiler` = project.in(file(" presentation-compiler" )).
1070
- dependsOn(dottyCompiler(Bootstrapped )).
1071
- settings(commonBootstrappedSettings).
1072
- settings(
1073
- bspEnabled := true ,
1069
+ lazy val `scala3-presentation-compiler` = project.in(file(" presentation-compiler" ))
1070
+ .asScala3PresentationCompiler(NonBootstrapped )
1071
+ lazy val `scala3-presentation-compiler-bootstrapped` = project.in(file(" presentation-compiler" ))
1072
+ .asScala3PresentationCompiler(Bootstrapped )
1073
+
1074
+ def scala3PresentationCompiler (implicit mode : Mode ): Project = mode match {
1075
+ case NonBootstrapped => `scala3-presentation-compiler`
1076
+ case Bootstrapped => `scala3-presentation-compiler-bootstrapped`
1077
+ }
1078
+
1079
+ lazy val presentationCompilerSettings = {
1080
+ val mtagsVersion = " 0.11.13-SNAPSHOT"
1081
+
1082
+ Seq (
1074
1083
moduleName := " scala3-presentation-compiler" ,
1075
1084
libraryDependencies ++= Seq (
1076
1085
" org.lz4" % " lz4-java" % " 1.8.0" ,
1077
1086
" io.get-coursier" % " interface" % " 1.0.13" ,
1078
- " org.scalameta" % " mtags-interfaces" % " 0.11.13-SNAPSHOT "
1087
+ " org.scalameta" % " mtags-interfaces" % mtagsVersion,
1079
1088
),
1080
1089
ivyConfigurations += SourceDeps .hide,
1081
1090
transitiveClassifiers := Seq (" sources" ),
1082
1091
resolvers += Resolver .defaultLocal,
1083
- libraryDependencies += (" org.scalameta" %% " mtags-shared" % " 0.11.13-SNAPSHOT " % " sourcedeps" )
1092
+ libraryDependencies += (" org.scalameta" %% " mtags-shared" % mtagsVersion % " sourcedeps" )
1084
1093
.cross(CrossVersion .for3Use2_13),
1085
1094
(Compile / sourceGenerators) += Def .task {
1086
1095
val s = streams.value
@@ -1112,13 +1121,15 @@ object Build {
1112
1121
} (Set (mtagsSharedSourceJar)).toSeq
1113
1122
}.taskValue,
1114
1123
ideTestsDependencyClasspath := {
1115
- Seq (( `stdlib-bootstrapped` / Compile / classDirectory ).value.toPath.normalize.toFile)
1124
+ ( `stdlib-bootstrapped` / Compile / products ).value
1116
1125
},
1117
- Compile / buildInfoKeys := Seq [BuildInfoKey ](scalaVersion, ideTestsDependencyClasspath),
1118
1126
Compile / buildInfoPackage := " dotty.tools.pc.util" ,
1119
- BuildInfoPlugin .buildInfoScopedSettings(Compile ),
1127
+ Compile / buildInfoKeys := Seq (scalaVersion),
1128
+ Test / buildInfoKeys := Seq (scalaVersion, ideTestsDependencyClasspath)
1129
+ ) ++ BuildInfoPlugin .buildInfoScopedSettings(Compile ) ++
1130
+ BuildInfoPlugin .buildInfoScopedSettings(Test ) ++
1120
1131
BuildInfoPlugin .buildInfoDefaultSettings
1121
- )
1132
+ }
1122
1133
1123
1134
lazy val `scala3-language-server` = project.in(file(" language-server" )).
1124
1135
dependsOn(dottyCompiler(Bootstrapped )).
@@ -1842,8 +1853,8 @@ object Build {
1842
1853
1843
1854
// FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests
1844
1855
def asDottyRoot (implicit mode : Mode ): Project = project.withCommonSettings.
1845
- aggregate(`scala3-interfaces`, dottyLibrary, dottyCompiler, tastyCore, `scala3-sbt-bridge`).
1846
- bootstrappedAggregate(`scala3-language-server`, `scala3-presentation-compiler`, `scala3- staging`,
1856
+ aggregate(`scala3-interfaces`, dottyLibrary, dottyCompiler, tastyCore, `scala3-sbt-bridge`, scala3PresentationCompiler ).
1857
+ bootstrappedAggregate(`scala3-language-server`, `scala3-staging`,
1847
1858
`scala3-tasty-inspector`, `scala3-library-bootstrappedJS`, scaladoc).
1848
1859
dependsOn(tastyCore).
1849
1860
dependsOn(dottyCompiler).
@@ -1918,6 +1929,10 @@ object Build {
1918
1929
settings(commonBenchmarkSettings).
1919
1930
enablePlugins(JmhPlugin )
1920
1931
1932
+ def asScala3PresentationCompiler (implicit mode : Mode ): Project = project.withCommonSettings.
1933
+ dependsOn(dottyCompiler).
1934
+ settings(presentationCompilerSettings)
1935
+
1921
1936
def asDist (implicit mode : Mode ): Project = project.
1922
1937
enablePlugins(PackPlugin ).
1923
1938
withCommonSettings.
0 commit comments