Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for DottyJS #712

Merged
merged 1 commit into from
Nov 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
java: [email protected]
scala: 0.27.0-RC1
platform: js
- workers: 1
os: ubuntu-latest
java: [email protected]
scala: 3.0.0-M1
platform: js
- workers: 1
os: ubuntu-latest
java: [email protected]
Expand Down
17 changes: 14 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ThisBuild / githubWorkflowBuildMatrixAdditions += "platform" -> List("jvm")
ThisBuild / githubWorkflowBuildMatrixAdditions += "workers" -> List("1", "4")

ThisBuild / githubWorkflowBuildMatrixInclusions ++=
crossScalaVersions.value.filterNot(Set(Scala211, DottyNew)) map { scala =>
crossScalaVersions.value.filterNot(Set(Scala211)) map { scala =>
MatrixInclude(
Map("os" -> PrimaryOS, "java" -> Java8, "scala" -> scala),
Map("platform" -> "js", "workers" -> "1"))
Expand Down Expand Up @@ -183,6 +183,14 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
Compile / console / scalacOptions ~= {_.filterNot("-Ywarn-unused-import" == _)},
Test / console / scalacOptions := (Compile / console / scalacOptions).value,

Compile / doc / sources := {
val old = (Compile / doc / sources).value
if (isDotty.value)
Seq()
else
old
},

// don't use fatal warnings in tests
Test / scalacOptions ~= (_ filterNot (_ == "-Xfatal-warnings")),

Expand Down Expand Up @@ -237,7 +245,11 @@ lazy val js = project.in(file("js"))
.settings(
Global / scalaJSStage := FastOptStage,
libraryDependencies +=
("org.scala-js" %% "scalajs-test-interface" % scalaJSVersion).withDottyCompat(scalaVersion.value)
("org.scala-js" %% "scalajs-test-interface" % scalaJSVersion).withDottyCompat(scalaVersion.value),

scalacOptions ++= {
if (scalaVersion.value == "3.0.0-M1") Seq("-Yskip:explicitJSClasses") else Nil
},
)
.enablePlugins(ScalaJSPlugin)

Expand All @@ -248,7 +260,6 @@ lazy val jvm = project.in(file("jvm"))
if (isDotty.value) Seq()
else (Compile / doc/ sources).value
},
crossScalaVersions += "0.27.0-RC1",
Test / fork := {
// Serialization issue in 2.13 and later
scalaMajorVersion.value == 13 || isDotty.value // ==> true
Expand Down