Skip to content

Commit dbb9e25

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 79904c2 commit dbb9e25

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. */
@@ -75,7 +72,6 @@ final case class SbtCommunityProject(
7572
project: String,
7673
sbtTestCommand: String,
7774
extraSbtArgs: List[String] = Nil,
78-
forceUpgradeSbtScalajsPlugin: Boolean = false,
7975
dependencies: List[CommunityProject] = Nil,
8076
sbtPublishCommand: String = null) extends CommunityProject:
8177
override val binaryName: String = "sbt"
@@ -111,14 +107,11 @@ final case class SbtCommunityProject(
111107
val sbtProps = Option(System.getProperty("sbt.ivy.home")) match
112108
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
113109
case _ => Nil
114-
val scalaJSPluginArgs =
115-
if (forceUpgradeSbtScalajsPlugin) List(s"--addPluginSbtFile=$sbtScalaJSPluginFilePath")
116-
else Nil
117110
extraSbtArgs ++ sbtProps ++ List(
118111
"-sbt-version", "1.4.4",
119112
"-Dsbt.supershell=false",
120113
s"--addPluginSbtFile=$sbtPluginFilePath"
121-
) ++ scalaJSPluginArgs
114+
)
122115

123116
object projects:
124117
lazy val utest = MillCommunityProject(
@@ -340,8 +333,7 @@ object projects:
340333

341334
lazy val catsEffect2 = SbtCommunityProject(
342335
project = "cats-effect-2",
343-
sbtTestCommand = "test",
344-
forceUpgradeSbtScalajsPlugin = true
336+
sbtTestCommand = "test"
345337
)
346338

347339
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)