Skip to content

Commit 68fec21

Browse files
hamdiallamjenkins
authored and
jenkins
committed
util: crossbuild with the Scala 3.0.2-RC1
Problem: The Scala 3.0.1 compiler includes bugs that are patched in the 3.0.2-RC1 release. An example of this is the broken Java APIs in JDK 11 for our `TimeLikeOps` classes because of scala/scala3#13039. Result / Solution: Using the 3.0.2-RC1 release doesn't break any tests and our projects compile fine. Let's update to this to make use of the bug fixes until the 3.0.2 is officially released. The new Dotty scaladoc requires network access due to a bug scala/scala3#13272. For now let's disable scaladoc for scala 3. JIRA Issues: CSL-11235 Differential Revision: https://phabricator.twitter.biz/D720887
1 parent 07cd74d commit 68fec21

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ New Features
4444
* util-core: Experimentally crossbuilds with Scala 3. ``PHAB_ID=D694775``
4545

4646
* util-core (BREAKING): Remove `AbstractSpool`. Java users should use `Spools` static class or
47-
the Spool companion object to create instances of `Spool`.
48-
47+
the Spool companion object to create instances of `Spool`. ``PHAB_ID=D694775``
4948

5049
Runtime Behavior Changes
5150
~~~~~~~~~~~~~~~~~~~~~~~~

build.sbt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ val defaultScalaSettings = Seq(
8989
)
9090
val defaultScala3EnabledSettings = Seq(
9191
scalaVersion := _scalaVersion,
92-
crossScalaVersions := _crossScalaVersions ++ Seq("3.0.1")
92+
crossScalaVersions := _crossScalaVersions ++ Seq("3.0.2-RC1")
9393
)
9494

9595
// Our dependencies or compiler options may differ for both Scala 2 and 3. We branch here
@@ -132,6 +132,16 @@ val baseSettings = Seq(
132132
case _ => sourceDir / "scala-2.13+"
133133
}
134134
},
135+
// Let's skip compiling docs for Scala 3 due a Dotty Scaladoc bug where generating the docs
136+
// requires network access. See https://github.com/lampepfl/dotty/issues/13272 or CSL-11251.
137+
Compile / doc / sources := {
138+
if (scalaVersion.value.startsWith("3")) Seq.empty
139+
else (Compile / doc / sources).value
140+
},
141+
Compile / packageDoc / publishArtifact := {
142+
if (scalaVersion.value.startsWith("3")) false
143+
else (Compile / packageDoc / publishArtifact).value
144+
},
135145
ScoverageKeys.coverageHighlighting := true,
136146
resolvers +=
137147
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",

0 commit comments

Comments
 (0)