Skip to content

Commit 975a78f

Browse files
authored
Add Dotty to the CI (#246)
* Add Dotty to the CI * Add Dotty to the CI * fix yaml formatting * fix yaml formatting * Add sbt-dotty and add Silencer the dotty way * Dotty 0.26 * Dotty 0.26.0 * kind-projector only in non-Dotty * scalafix only in non-Dotty * scalafix only in non-Dotty (sbt fix) * semanticdbEnabled := !isDotty.value * scalacOptions for Dotty * rework scalacOptions * Dotty platform specific * BuildHelper from ZIO * proper silencer version * consolidate Scala version specific dirs * Add unmanagedSourceDirectories * compositionLaw: Equal.DeriveEqual * compositionLaw: Equal.DeriveEqual, more * Modify[-S1, +S2, +A](run: S1 => (S2, A)) extends ZPure[S1, S2, Any, Nothing, A] * compositionLaw: Equal.DeriveEqual explicit * ZPure: Modify.run0 * Dotty can't kind-projector style +* nor -* * Enough cases for @switch * case that: NonEmptySet[_] => ... * explicit implicits in tests * val dummy = * Don't use @switch on a branch with a default case As per scala/scala3#9776 (comment) * Reduce Equal.DeriveEqual * Simplify TraversableSpec * NewtypeSpec scala2Only * Add links to uncovered issues * Use Scala 2.12 by default
1 parent f2fb8c3 commit 975a78f

File tree

14 files changed

+420
-151
lines changed

14 files changed

+420
-151
lines changed

.circleci/config.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ scala_212: &scala_212
99
scala_213: &scala_213
1010
SCALA_VERSION: 2.13.3
1111

12-
# scala_dotty: &scala_dotty
13-
# SCALA_VERSION: 0.20.0-RC1
12+
scala_dotty: &scala_dotty
13+
SCALA_VERSION: 0.26.0
1414

1515
jdk_8: &jdk_8
1616
JDK_VERSION: 8
@@ -203,13 +203,6 @@ jobs:
203203
- <<: *scala_212
204204
- <<: *jdk_8
205205

206-
# compile_dotty:
207-
# <<: *compile
208-
# <<: *machine_ubuntu
209-
# environment:
210-
# - <<: *scala_dotty
211-
# - <<: *jdk_8
212-
213206
mdoc:
214207
<<: *mdoc
215208
<<: *machine_ubuntu
@@ -238,12 +231,12 @@ jobs:
238231
- <<: *scala_213
239232
- <<: *jdk_8
240233

241-
# test_dotty_jdk8_jvm:
242-
# <<: *test
243-
# <<: *machine_ubuntu
244-
# environment:
245-
# - <<: *scala_dotty
246-
# - <<: *jdk_8
234+
test_dotty_jdk8_jvm:
235+
<<: *test
236+
<<: *machine_ubuntu
237+
environment:
238+
- <<: *scala_dotty
239+
- <<: *jdk_8
247240

248241
test_212_jdk11_jvm:
249242
<<: *test
@@ -259,12 +252,12 @@ jobs:
259252
- <<: *scala_213
260253
- <<: *jdk_11
261254

262-
# test_dotty_jdk11_jvm:
263-
# <<: *test
264-
# <<: *machine_ubuntu
265-
# environment:
266-
# - <<: *scala_dotty
267-
# - <<: *jdk_11
255+
test_dotty_jdk11_jvm:
256+
<<: *test
257+
<<: *machine_ubuntu
258+
environment:
259+
- <<: *scala_dotty
260+
- <<: *jdk_11
268261

269262
release:
270263
<<: *release
@@ -317,6 +310,16 @@ workflows:
317310
- lint
318311
filters:
319312
<<: *filter_tags
313+
- test_dotty_jdk8_jvm:
314+
requires:
315+
- lint
316+
filters:
317+
<<: *filter_tags
318+
- test_dotty_jdk11_jvm:
319+
requires:
320+
- lint
321+
filters:
322+
<<: *filter_tags
320323
- release:
321324
context: Sonatype2
322325
requires:
@@ -325,6 +328,8 @@ workflows:
325328
- test_212_jdk11_jvm
326329
- test_213_jdk8_jvm
327330
- test_213_jdk11_jvm
331+
- test_dotty_jdk8_jvm
332+
- test_dotty_jdk11_jvm
328333
- mdoc
329334
filters:
330335
<<: *filter_tags

build.sbt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
3636

3737
lazy val root =
3838
(project in file("."))
39-
.settings(
40-
stdSettings("zio-prelude")
41-
)
39+
.settings(stdSettings("zio-prelude"))
40+
.settings(dottySettings)
4241
.settings(buildInfoSettings("zio.prelude"))
4342
.settings(scalacOptions in (Compile, console) ~= { _.filterNot(Set("-Xfatal-warnings")) })
4443
.enablePlugins(BuildInfoPlugin)
@@ -51,8 +50,11 @@ lazy val benchmarks = project
5150
scalacOptions -= "-Yno-imports",
5251
scalacOptions -= "-Xfatal-warnings",
5352
libraryDependencies ++= Seq(
54-
"dev.zio" %% "zio" % zioVersion,
55-
"org.typelevel" %% "cats-core" % "2.2.0"
53+
"dev.zio" %% "zio" % zioVersion,
54+
("org.typelevel" %% "cats-core" % "2.2.0") match {
55+
case cats if isDotty.value => cats.withDottyCompat(scalaVersion.value)
56+
case cats => cats
57+
}
5658
)
5759
)
5860
.dependsOn(root)

0 commit comments

Comments
 (0)