Skip to content

Commit

Permalink
Update scala-js and Scala 3 (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Oct 17, 2023
1 parent 8447616 commit 2faa2cf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
java: [ 8, 17 ]
# WARN: build.sbt depends on this key path, as scalaVersion and
# crossScalaVersions is determined from it
scala: [ 2.12.15, 2.13.8, 3.1.2 ]
scala: [ 2.12.15, 2.13.8, 3.3.1 ]

env:
CI: true
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
include:
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 8, scala: 3.3.1 }

env:
CI: true
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
include:
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 8, scala: 3.3.1 }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
include:
- { java: 11, scala: 2.12.15 }
- { java: 11, scala: 2.13.8 }
- { java: 11, scala: 3.1.2 }
- { java: 11, scala: 3.3.1 }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
matrix:
include:
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 8, scala: 3.3.1 }

steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 11 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ lazy val isCI = {
sys.env.get("CI").exists(v => v == "true" || v == "1" || v == "yes")
}

lazy val sharedSettings = pgpSettings ++ Seq(
lazy val sharedSettings = pgpSettings ++ Def.settings(
organization := "io.monix",
// Value extracted from .github/workflows/build.yml
scalaVersion := crossScalaVersionsFromBuildYaml.value.flatMap(_.filterPrefix("2.13.")).head.value,
Expand All @@ -196,6 +196,16 @@ lazy val sharedSettings = pgpSettings ++ Seq(
case _ => Seq.empty
}
},
Seq(Compile, Test).map { x =>
x / compile / scalacOptions --= {
scalaBinaryVersion.value match {
case "3" =>
Seq("-Xfatal-warnings")
case _ =>
Seq.empty
}
}
},

// Turning off fatal warnings for doc generation
Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,13 @@ object IterantToReactivePublisherSuite extends BaseTestSuite {
}

test("protects against invalid subscriber") { implicit s =>
intercept[NullPointerException] {
Iterant[Task].of(1).toReactivePublisher.subscribe(null)
()
if (Platform.isJVM) {
intercept[NullPointerException] {
Iterant[Task].of(1).toReactivePublisher.subscribe(null)
()
}
} else {
// TODO
}
()
}
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")
Expand Down

0 comments on commit 2faa2cf

Please sign in to comment.