Skip to content

Commit 502df89

Browse files
committed
community-build: always force sbt-scalajs version
This didn't work previously because scalatest dependend on an obselete version of sbt-scalajs but this isn't a problem now that we've upgrade scalatest.
1 parent 51c0739 commit 502df89

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ lazy val sbtPluginFilePath: String =
1515
new File(sys.props("user.home") + "/.sbt/1.0/plugins").mkdirs()
1616
communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString()
1717

18-
lazy val sbtScalaJSPluginFilePath: String =
19-
communitybuildDir.resolve("sbt-scalajs-sbt").toAbsolutePath().toString()
20-
2118
def log(msg: String) = println(Console.GREEN + msg + Console.RESET)
2219

2320
/** Executes shell command, returns false in case of error. */
@@ -68,7 +65,6 @@ final case class SbtCommunityProject(
6865
project: String,
6966
sbtTestCommand: String,
7067
extraSbtArgs: List[String] = Nil,
71-
forceUpgradeSbtScalajsPlugin: Boolean = false,
7268
dependencies: List[CommunityProject] = Nil,
7369
sbtPublishCommand: String = null) extends CommunityProject:
7470
override val binaryName: String = "sbt"
@@ -101,14 +97,11 @@ final case class SbtCommunityProject(
10197
val sbtProps = Option(System.getProperty("sbt.ivy.home")) match
10298
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
10399
case _ => Nil
104-
val scalaJSPluginArgs =
105-
if (forceUpgradeSbtScalajsPlugin) List(s"--addPluginSbtFile=$sbtScalaJSPluginFilePath")
106-
else Nil
107100
extraSbtArgs ++ sbtProps ++ List(
108101
"-sbt-version", "1.4.4",
109102
"-Dsbt.supershell=false",
110103
s"--addPluginSbtFile=$sbtPluginFilePath"
111-
) ++ scalaJSPluginArgs
104+
)
112105

113106
object projects:
114107
lazy val utest = MillCommunityProject(
@@ -330,8 +323,7 @@ object projects:
330323

331324
lazy val catsEffect2 = SbtCommunityProject(
332325
project = "cats-effect-2",
333-
sbtTestCommand = "test",
334-
forceUpgradeSbtScalajsPlugin = true
326+
sbtTestCommand = "test"
335327
)
336328

337329
lazy val catsEffect3 = SbtCommunityProject(

project/Build.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,11 +1309,9 @@ object Build {
13091309
// (publishLocal in `scala3-staging`).value
13101310
val pluginText =
13111311
s"""updateOptions in Global ~= (_.withLatestSnapshots(false))
1312-
|addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "$sbtDottyVersion")""".stripMargin
1312+
|addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "$sbtDottyVersion")
1313+
|addSbtPlugin("org.scala-js" % "sbt-scalajs" % "$scalaJSVersion")""".stripMargin
13131314
IO.write(baseDirectory.value / "sbt-dotty-sbt", pluginText)
1314-
val scalaJSPluginText =
1315-
s"""addSbtPlugin("org.scala-js" % "sbt-scalajs" % "$scalaJSVersion")\n"""
1316-
IO.write(baseDirectory.value / "sbt-scalajs-sbt", scalaJSPluginText)
13171315
IO.write(baseDirectory.value / "scala3-bootstrapped.version", dottyVersion)
13181316
},
13191317
testOptions in Test += Tests.Argument(

0 commit comments

Comments
 (0)