-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1453 from typelevel/topic/s3-m2
Prepare upgrade to Scala 3 M2
- Loading branch information
Showing
4 changed files
with
30 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
scala: [0.27.0-RC1, 3.0.0-M1, 2.12.12, 2.13.3] | ||
scala: [3.0.0-M1, 3.0.0-M2, 2.12.12, 2.13.3] | ||
java: | ||
- [email protected] | ||
- [email protected] | ||
|
@@ -36,14 +36,10 @@ jobs: | |
java: [email protected] | ||
- ci: ciJS | ||
java: [email protected] | ||
- ci: ciJS | ||
scala: 0.27.0-RC1 | ||
- ci: ciJS | ||
scala: 3.0.0-M1 | ||
- os: windows-latest | ||
scala: 0.27.0-RC1 | ||
- os: windows-latest | ||
scala: 3.0.0-M1 | ||
- os: windows-latest | ||
scala: 3.0.0-M2 | ||
- os: windows-latest | ||
scala: 2.12.12 | ||
- os: windows-latest | ||
|
@@ -54,14 +50,10 @@ jobs: | |
java: [email protected] | ||
- ci: ciFirefox | ||
java: [email protected] | ||
- ci: ciFirefox | ||
scala: 0.27.0-RC1 | ||
- ci: ciFirefox | ||
scala: 3.0.0-M1 | ||
- os: windows-latest | ||
scala: 0.27.0-RC1 | ||
- os: windows-latest | ||
scala: 3.0.0-M1 | ||
- os: windows-latest | ||
scala: 3.0.0-M2 | ||
- os: windows-latest | ||
scala: 2.12.12 | ||
- os: windows-latest | ||
|
@@ -85,44 +77,17 @@ jobs: | |
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Cache ivy2 | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.ivy2/cache | ||
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Cache coursier (generic) | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.coursier/cache/v1 | ||
key: ${{ runner.os }}-generic-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Cache coursier (linux) | ||
if: contains(runner.os, 'linux') | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/coursier/v1 | ||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Cache coursier (macOS) | ||
if: contains(runner.os, 'macos') | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Cache coursier (windows) | ||
if: contains(runner.os, 'windows') | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/AppData/Local/Coursier/Cache/v1 | ||
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v1 | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.sbt | ||
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
path: | | ||
~/.sbt | ||
~/.ivy2/cache | ||
~/.coursier/cache/v1 | ||
~/.cache/coursier/v1 | ||
~/AppData/Local/Coursier/Cache/v1 | ||
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Setup NodeJS v14 LTS | ||
if: matrix.ci == 'ciJS' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ val Windows = "windows-latest" | |
val ScalaJSJava = "[email protected]" | ||
val Scala213 = "2.13.3" | ||
|
||
ThisBuild / crossScalaVersions := Seq("0.27.0-RC1", "3.0.0-M1", "2.12.12", Scala213) | ||
ThisBuild / crossScalaVersions := Seq("3.0.0-M1", "3.0.0-M2", "2.12.12", Scala213) | ||
|
||
ThisBuild / githubWorkflowTargetBranches := Seq("series/3.x") | ||
|
||
|
@@ -90,11 +90,7 @@ ThisBuild / githubWorkflowBuildMatrixExclusions ++= { | |
MatrixExclude(Map("ci" -> ci, "java" -> java)) | ||
} | ||
|
||
val scalaFilters = crossScalaVersions.value.filterNot(_.startsWith("2.")) map { scala => | ||
MatrixExclude(Map("ci" -> ci, "scala" -> scala)) | ||
} | ||
|
||
javaFilters ++ scalaFilters ++ windowsScalaFilters :+ MatrixExclude(Map("os" -> Windows, "ci" -> ci)) | ||
javaFilters ++ windowsScalaFilters :+ MatrixExclude(Map("os" -> Windows, "ci" -> ci)) | ||
} | ||
} | ||
|
||
|
@@ -123,10 +119,10 @@ ThisBuild / scmInfo := Some( | |
url("https://github.com/typelevel/cats-effect"), | ||
"[email protected]:typelevel/cats-effect.git")) | ||
|
||
val CatsVersion = "2.3.0-M2" | ||
val CatsVersion = "2.3.0" | ||
val Specs2Version = "4.10.5" | ||
val ScalaCheckVersion = "1.15.1" | ||
val DisciplineVersion = "1.1.1" | ||
val DisciplineVersion = "1.1.2" | ||
|
||
replaceCommandAlias("ci", "; project /; headerCheck; scalafmtCheck; clean; testIfRelevant; coreJVM/mimaReportBinaryIssues; set Global / useFirefoxEnv := true; coreJS/test; set Global / useFirefoxEnv := false") | ||
addCommandAlias("ciAll", "; project /; +headerCheck; +scalafmtCheck; +clean; +testIfRelevant; +coreJVM/mimaReportBinaryIssues; set Global / useFirefoxEnv := true; +coreJS/test; set Global / useFirefoxEnv := false") | ||
|
@@ -139,20 +135,17 @@ addCommandAlias("ciFirefox", "; set Global / useFirefoxEnv := true; project root | |
|
||
addCommandAlias("prePR", "; root/clean; +root/scalafmtAll; +root/headerCreate") | ||
|
||
val dottyJsSettings = Seq(crossScalaVersions := (ThisBuild / crossScalaVersions).value.filter(_.startsWith("2."))) | ||
|
||
lazy val root = project.in(file(".")) | ||
.aggregate(rootJVM, rootJS) | ||
.settings(noPublishSettings) | ||
.enablePlugins(NoPublishPlugin) | ||
|
||
lazy val rootJVM = project | ||
.aggregate(kernel.jvm, testkit.jvm, laws.jvm, core.jvm, std.jvm, example.jvm, benchmarks) | ||
.settings(noPublishSettings) | ||
.enablePlugins(NoPublishPlugin) | ||
|
||
lazy val rootJS = project | ||
.aggregate(kernel.js, testkit.js, laws.js, core.js, std.js, example.js) | ||
.settings(noPublishSettings) | ||
.settings(dottyJsSettings) | ||
.enablePlugins(NoPublishPlugin) | ||
|
||
/** | ||
* The core abstractions and syntax. This is the most general definition of Cats Effect, | ||
|
@@ -164,7 +157,6 @@ lazy val kernel = crossProject(JSPlatform, JVMPlatform).in(file("kernel")) | |
libraryDependencies += "org.specs2" %%% "specs2-core" % Specs2Version % Test) | ||
.settings(dottyLibrarySettings) | ||
.settings(libraryDependencies += "org.typelevel" %%% "cats-core" % CatsVersion) | ||
.jsSettings(dottyJsSettings) | ||
|
||
/** | ||
* Reference implementations (including a pure ConcurrentBracket), generic ScalaCheck | ||
|
@@ -178,8 +170,7 @@ lazy val testkit = crossProject(JSPlatform, JVMPlatform).in(file("testkit")) | |
libraryDependencies ++= Seq( | ||
"org.typelevel" %%% "cats-free" % CatsVersion, | ||
"org.scalacheck" %%% "scalacheck" % ScalaCheckVersion, | ||
"org.typelevel" %%% "coop" % "1.0.0-M1")) | ||
.jsSettings(dottyJsSettings) | ||
"org.typelevel" %%% "coop" % "1.0.0-M2")) | ||
|
||
/** | ||
* The laws which constrain the abstractions. This is split from kernel to avoid | ||
|
@@ -194,7 +185,6 @@ lazy val laws = crossProject(JSPlatform, JVMPlatform).in(file("laws")) | |
libraryDependencies ++= Seq( | ||
"org.typelevel" %%% "cats-laws" % CatsVersion, | ||
"org.typelevel" %%% "discipline-specs2" % DisciplineVersion % Test)) | ||
.jsSettings(dottyJsSettings) | ||
|
||
/** | ||
* Concrete, production-grade implementations of the abstractions. Or, more | ||
|
@@ -213,7 +203,6 @@ lazy val core = crossProject(JSPlatform, JVMPlatform).in(file("core")) | |
.jvmSettings( | ||
Test / fork := true, | ||
Test / javaOptions += s"-Dsbt.classpath=${(Test / fullClasspath).value.map(_.data.getAbsolutePath).mkString(File.pathSeparator)}") | ||
.jsSettings(dottyJsSettings) | ||
|
||
/** | ||
* Implementations lof standard functionality (e.g. Semaphore, Console, Queue) | ||
|
@@ -228,33 +217,33 @@ lazy val std = crossProject(JSPlatform, JVMPlatform).in(file("std")) | |
|
||
libraryDependencies += { | ||
if (isDotty.value) | ||
("org.specs2" %%% "specs2-scalacheck" % Specs2Version % Test).withDottyCompat(scalaVersion.value).exclude("org.scalacheck", "scalacheck_2.13") | ||
("org.specs2" %%% "specs2-scalacheck" % Specs2Version % Test) | ||
.withDottyCompat(scalaVersion.value) | ||
.exclude("org.scalacheck", "scalacheck_2.13") | ||
.exclude("org.scalacheck", "scalacheck_sjs1_2.13") | ||
else | ||
"org.specs2" %%% "specs2-scalacheck" % Specs2Version % Test | ||
}, | ||
|
||
libraryDependencies += "org.scalacheck" %%% "scalacheck" % ScalaCheckVersion % Test) | ||
.jsSettings(dottyJsSettings) | ||
|
||
/** | ||
* A trivial pair of trivial example apps primarily used to show that IOApp | ||
* works as a practical runtime on both target platforms. | ||
*/ | ||
lazy val example = crossProject(JSPlatform, JVMPlatform).in(file("example")) | ||
.dependsOn(core) | ||
.enablePlugins(NoPublishPlugin) | ||
.settings(name := "cats-effect-example") | ||
.jsSettings(scalaJSUseMainModuleInitializer := true) | ||
.settings(noPublishSettings) | ||
.jsSettings(dottyJsSettings) | ||
|
||
/** | ||
* JMH benchmarks for IO and other things. | ||
*/ | ||
lazy val benchmarks = project.in(file("benchmarks")) | ||
.dependsOn(core.jvm) | ||
.settings(name := "cats-effect-benchmarks") | ||
.settings(noPublishSettings) | ||
.enablePlugins(JmhPlugin) | ||
.enablePlugins(NoPublishPlugin, JmhPlugin) | ||
|
||
lazy val docs = project.in(file("site-docs")) | ||
.dependsOn(core.jvm) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters