From 879070e7f9d2310f21734f81b4d42d35030acc05 Mon Sep 17 00:00:00 2001 From: Calvin Lee Fernandes Date: Sat, 11 May 2024 20:37:36 -0400 Subject: [PATCH] Update to ZIO 2.1.1 (#693) * Update Cats Effect and FS2 - Update Cats Effect to 3.5.3 - Update FS2 to 3.9.4 and use updated APIs * Update to ZIO 2.0.22 and latest Scala LTS + maintenance versions and fix all Xsource errors * Update GitHub Action Scala builds * Update to ZIO 2.1.0 * Remove Java 1.8 from the build matrix * Update to latest Scala.JS plugin * Add JDK 21 * Use Graal for JDK 21 * Switch to Temurin * Rely on the ZIO-SBT plugin * Update documentation and remove inaccurate limitations that are not present anymore * check -> lint * Fix docs * Remove old site.yml * Apply kyri-petrou's fix to skip Scala 2.12.x builds for JS * Fix CI build * - Update to ZIO 2.1.1 - Remove custom build steps - Update to Scala 2.13.14 --------- Co-authored-by: cfernandescaesars --- .github/workflows/ci.yml | 302 ++++++++++++++---- .github/workflows/site.yml | 98 ------ .gitignore | 1 + README.md | 81 ++--- build.sbt | 14 +- docs/index.md | 77 ++--- project/BuildHelper.scala | 4 +- project/build.properties | 2 +- project/plugins.sbt | 10 +- .../test/scala/zio/interop/CatsSpecBase.scala | 2 +- 10 files changed, 301 insertions(+), 290 deletions(-) delete mode 100644 .github/workflows/site.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2b54942..54585c85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,80 +1,252 @@ -name: CI +# This file was autogenerated using `zio-sbt-ci` plugin via `sbt ciGenerateGithubWorkflow` +# task and should be included in the git repository. Please do not edit it manually. -on: - pull_request: - push: - branches: ['master', 'zio2-interop-ce3'] +name: CI +env: + JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags +'on': + workflow_dispatch: {} release: types: - - published - + - published + push: {} + pull_request: + branches-ignore: + - gh-pages jobs: + build: + name: Build + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '17' + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Check all code compiles + run: sbt +Test/compile + - name: Check artifacts build process + run: sbt +publishLocal + - name: Check website build process + run: sbt docs/clean; sbt docs/buildWebsite lint: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false + name: Lint + runs-on: ubuntu-latest + continue-on-error: false steps: - - name: Checkout current branch - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 - - name: Cache scala dependencies - uses: coursier/cache-action@v5 - - name: Lint code - run: sbt check - + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '17' + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Check if the site workflow is up to date + run: sbt ciCheckGithubWorkflow + - name: Lint + run: sbt lint test: - runs-on: ubuntu-20.04 + name: Test + runs-on: ubuntu-latest + continue-on-error: false strategy: fail-fast: false matrix: - java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.19', '2.13.13', '3.3.3'] - platform: ['JVM', 'JS'] + java: + - '11' + - '17' + - '21' steps: - - name: Checkout current branch - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 - with: - java-version: ${{ matrix.java }} - - name: Cache scala dependencies - uses: coursier/cache-action@v5 - - name: Run tests - if: matrix.scala != '3.3.3' - run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }} - - name: Run dotty tests - if: matrix.scala == '3.3.3' && matrix.platform == 'JVM' - run: sbt ++${{ matrix.scala }}! testJVM + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: ${{ matrix.java }} + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Test + run: sbt +test + update-readme: + name: Update README + runs-on: ubuntu-latest + continue-on-error: false + if: ${{ github.event_name == 'push' }} + steps: + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '17' + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Generate Readme + run: sbt docs/generateReadme + - name: Commit Changes + run: | + git config --local user.email "zio-assistant[bot]@users.noreply.github.com" + git config --local user.name "ZIO Assistant" + git add README.md + git commit -m "Update README.md" || echo "No changes to commit" + - name: Generate Token + id: generate-token + uses: zio/generate-github-app-token@v1.0.0 + with: + app_id: ${{ secrets.APP_ID }} + app_private_key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v6 + with: + body: |- + Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin. + I will automatically update the README.md file whenever there is new change for README.md, e.g. + - After each release, I will update the version in the installation section. + - After any changes to the "docs/index.md" file, I will update the README.md file accordingly. + branch: zio-sbt-website/update-readme + commit-message: Update README.md + token: ${{ steps.generate-token.outputs.token }} + delete-branch: true + title: Update README.md + - name: Approve PR + if: ${{ steps.cpr.outputs.pull-request-number }} + run: gh pr review "$PR_URL" --approve + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ steps.cpr.outputs.pull-request-url }} + - name: Enable Auto-Merge + if: ${{ steps.cpr.outputs.pull-request-number }} + run: gh pr merge --auto --squash "$PR_URL" || gh pr merge --squash "$PR_URL" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ steps.cpr.outputs.pull-request-url }} ci: - runs-on: ubuntu-20.04 - needs: [lint, test] + name: ci + runs-on: ubuntu-latest + continue-on-error: false + needs: + - lint + - test + - build steps: - - name: Aggregate outcomes - run: echo "build succeeded" - - publish: - runs-on: ubuntu-20.04 - needs: [ci] - if: github.event_name != 'pull_request' + - name: Report Successful CI + run: echo "ci passed" + release: + name: Release + runs-on: ubuntu-latest + continue-on-error: false + needs: + - ci + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '17' + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Release + run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + release-docs: + name: Release Docs + runs-on: ubuntu-latest + continue-on-error: false + needs: + - release + if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }} + steps: + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Install libuv + run: sudo apt-get update && sudo apt-get install -y libuv1-dev + - name: Setup Scala + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '17' + check-latest: true + - name: Cache Dependencies + uses: coursier/cache-action@v6 + - name: Setup NodeJs + uses: actions/setup-node@v4 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org + - name: Publish Docs to NPM Registry + run: sbt docs/publishToNpm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + notify-docs-release: + name: Notify Docs Release + runs-on: ubuntu-latest + continue-on-error: false + needs: + - release-docs + if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }} steps: - - name: Checkout current branch - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 - - name: Cache scala dependencies - uses: coursier/cache-action@v5 - - name: Release artifacts - run: sbt ci-release - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: notify the main repo about the new release of docs package + run: | + PACKAGE_NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}') + PACKAGE_VERSION=$(npm view $PACKAGE_NAME version) + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.PAT_TOKEN }}"\ + https://api.github.com/repos/zio/zio/dispatches \ + -d '{ + "event_type":"update-docs", + "client_payload":{ + "package_name":"'"${PACKAGE_NAME}"'", + "package_version": "'"${PACKAGE_VERSION}"'" + } + }' diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml deleted file mode 100644 index a66aae27..00000000 --- a/.github/workflows/site.yml +++ /dev/null @@ -1,98 +0,0 @@ -# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow` -# task and should be included in the git repository. Please do not edit it manually. - -name: Website -'on': - workflow_dispatch: {} - release: - types: - - published - push: - branches: - - main - pull_request: {} -jobs: - build: - name: Build and Test - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - name: Git Checkout - uses: actions/checkout@v3.3.0 - with: - fetch-depth: '0' - - name: Setup Scala - uses: actions/setup-java@v3.9.0 - with: - distribution: temurin - java-version: 17 - check-latest: true - - name: Check if the README file is up to date - run: sbt docs/checkReadme - - name: Check if the site workflow is up to date - run: sbt docs/checkGithubWorkflow - - name: Check artifacts build process - run: sbt +publishLocal - - name: Check website build process - run: sbt docs/clean; sbt docs/buildWebsite - publish-docs: - name: Publish Docs - runs-on: ubuntu-latest - if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }} - steps: - - name: Git Checkout - uses: actions/checkout@v3.3.0 - with: - fetch-depth: '0' - - name: Setup Scala - uses: actions/setup-java@v3.9.0 - with: - distribution: temurin - java-version: 17 - check-latest: true - - name: Setup NodeJs - uses: actions/setup-node@v3 - with: - node-version: 16.x - registry-url: https://registry.npmjs.org - - name: Publish Docs to NPM Registry - run: sbt docs/publishHashverToNpm - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - generate-readme: - name: Generate README - runs-on: ubuntu-latest - if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event.action == 'published')) }} - steps: - - name: Git Checkout - uses: actions/checkout@v3.3.0 - with: - ref: ${{ github.head_ref }} - fetch-depth: '0' - - name: Setup Scala - uses: actions/setup-java@v3.9.0 - with: - distribution: temurin - java-version: 17 - check-latest: true - - name: Generate Readme - run: sbt docs/generateReadme - - name: Commit Changes - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add README.md - git commit -m "Update README.md" || echo "No changes to commit" - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4.2.3 - with: - body: |- - Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin. - - I will automatically update the README.md file whenever there is new change for README.md, e.g. - - After each release, I will update the version in the installation section. - - After any changes to the "docs/index.md" file, I will update the README.md file accordingly. - branch: zio-sbt-website/update-readme - commit-message: Update README.md - delete-branch: true - title: Update README.md diff --git a/.gitignore b/.gitignore index 5e031a7a..33f5a347 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ test-output/ .idea/ .bsp .vscode +.history/ \ No newline at end of file diff --git a/README.md b/README.md index 3923fa24..da8fd8db 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Installation ```sbt -libraryDependencies += "dev.zio" %% "zio-interop-cats" % "23.0.x" +libraryDependencies += "dev.zio" %% "zio-interop-cats" % "" ``` ## `ZIO` Cats Effect 3 instances @@ -71,36 +71,6 @@ There are many other typeclasses and useful conversions that this library provid * See `zio/stream/interop/cats.scala` for ZStream typeclass implementations * See `zio/stream/interop/FS2StreamSyntax.scala` for FS2 <-> ZStream conversions -## Easier imports (at a cost) - -To use ZIO data structures in cats-effect code we may need to bring the `Runtime[Any]` via the `ZIO.runtime` combinator. This may -not be ideal since everywhere you use these data structures, you will now be required to feed in the `Runtime`. -For example, with ZIO STM TRef: - -```scala -import cats.effect._ -import zio.Runtime -import zio.interop.stm.TRef - -def example(implicit rts: Runtime[Any]): IO[TRef[IO, Int]] = { - zio.interop.stm.TRef.makeCommit(1) -} -``` - -Rather than requiring the runtime implicit, we can add an import (if we don't mind depending on `Runtime.default`): -```scala -import cats.effect._ -import zio.Runtime -import zio.interop.stm.TRef - -import zio.interop.catz.implicits._ - -def example: IO[TRef[IO, Int]] = { - zio.interop.stm.TRef.makeCommit(1) -} -``` - -The major downside to doing this is you will rely on `Runtime.default` which might make testing more difficult in certain scenarios, e.g. with custom execution contexts. ### cats-core @@ -117,30 +87,27 @@ Note that this library only has an `Optional` dependency on cats-effect – if y The following example shows how to use ZIO with Doobie (a library for JDBC access) and FS2 (a streaming library), which both rely on Cats Effect instances (`cats.effect.Async` and `cats.effect.Temporal`): ```scala -import zio._ -import zio.interop.catz._ -import doobie._ -import doobie.implicits._ -import zio.clock.Clock -import scala.concurrent.duration._ - -object DoobieH2Example extends App { - override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = - ZIO.runtime.flatMap { implicit r: Runtime[Clock] => - val xa: Transactor[Task] = - Transactor.fromDriverManager[Task]("org.h2.Driver", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "user", "") - - sql"SELECT 42" - .query[Int] - .stream - .transact(xa) - .delayBy(1.second) - .evalTap(i => ZIO.succeedBlocking(println(s"Data $i")))) - .compile - .drain - .exitCode - } -} +import zio.{durationInt as _, *} +import zio.interop.catz.* +import doobie.* +import doobie.implicits.* +import scala.concurrent.duration.* + +object Example extends ZIOAppDefault: + val run = { + val xa: Transactor[Task] = + Transactor.fromDriverManager[Task]("org.h2.Driver", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "user", "", None) + + sql"SELECT 42" + .query[Int] + .stream + .transact(xa) + .delayBy(1.second) + .evalTap(i => Console.printLine(i)) + .compile + .drain + .exitCode + } ``` ## Documentation @@ -149,11 +116,11 @@ Learn more on the [ZIO Interop Cats homepage](https://zio.dev)! ## Contributing -For the general guidelines, see ZIO [contributor's guide](https://zio.dev/about/contributing). +For the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines). ## Code of Conduct -See the [Code of Conduct](https://zio.dev/about/code-of-conduct) +See the [Code of Conduct](https://zio.dev/code-of-conduct) ## Support diff --git a/build.sbt b/build.sbt index 4904cbb0..7c38b9d4 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,12 @@ import BuildHelper._ import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue import sbtcrossproject.CrossPlugin.autoImport.crossProject -import zio.sbt.WebsiteUtils.DocsVersioning.HashVersioning name := "interop-cats" inThisBuild( List( + name := "interop-cats", organization := "dev.zio", homepage := Some(url("https://zio.dev")), licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), @@ -28,7 +28,7 @@ inThisBuild( ) addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt") -addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") +addCommandAlias("lint", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") addCommandAlias("testJVM", ";zioInteropCatsTestsJVM/test;zioTestInteropCatsJVM/test;coreOnlyTestJVM/test") addCommandAlias("testJS", ";zioInteropCatsTestsJS/test;zioTestInteropCatsJS/test;coreOnlyTestJS/test") @@ -51,10 +51,10 @@ lazy val root = project unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library") ) -val zioVersion = "2.0.22" -val catsVersion = "2.9.0" +val zioVersion = "2.1.1" +val catsVersion = "2.10.0" val catsEffectVersion = "3.5.4" -val catsMtlVersion = "1.3.0" +val catsMtlVersion = "1.4.0" val disciplineScalaTestVersion = "2.2.0" val fs2Version = "3.10.2" val scalaJavaTimeVersion = "2.5.0" @@ -199,8 +199,6 @@ lazy val docs = project projectName := "ZIO Interop Cats", mainModuleName := (zioInteropCatsJVM / moduleName).value, projectStage := ProjectStage.ProductionReady, - ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(), - docsPublishBranch := "main", - docsVersioning := HashVersioning + ScalaUnidoc / unidoc / unidocProjectFilter := inProjects() ) .enablePlugins(WebsitePlugin) diff --git a/docs/index.md b/docs/index.md index a1f5277a..2843f3e0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ sidebar_label: "ZIO 2.x Interop Cats 3.x" ## Installation ```sbt -libraryDependencies += "dev.zio" %% "zio-interop-cats" % "23.0.x" +libraryDependencies += "dev.zio" %% "zio-interop-cats" % "" ``` ## `ZIO` Cats Effect 3 instances @@ -71,36 +71,6 @@ There are many other typeclasses and useful conversions that this library provid * See `zio/stream/interop/cats.scala` for ZStream typeclass implementations * See `zio/stream/interop/FS2StreamSyntax.scala` for FS2 <-> ZStream conversions -## Easier imports (at a cost) - -To use ZIO data structures in cats-effect code we may need to bring the `Runtime[Any]` via the `ZIO.runtime` combinator. This may -not be ideal since everywhere you use these data structures, you will now be required to feed in the `Runtime`. -For example, with ZIO STM TRef: - -```scala -import cats.effect._ -import zio.Runtime -import zio.interop.stm.TRef - -def example(implicit rts: Runtime[Any]): IO[TRef[IO, Int]] = { - zio.interop.stm.TRef.makeCommit(1) -} -``` - -Rather than requiring the runtime implicit, we can add an import (if we don't mind depending on `Runtime.default`): -```scala -import cats.effect._ -import zio.Runtime -import zio.interop.stm.TRef - -import zio.interop.catz.implicits._ - -def example: IO[TRef[IO, Int]] = { - zio.interop.stm.TRef.makeCommit(1) -} -``` - -The major downside to doing this is you will rely on `Runtime.default` which might make testing more difficult in certain scenarios, e.g. with custom execution contexts. ### cats-core @@ -117,28 +87,25 @@ Note that this library only has an `Optional` dependency on cats-effect – if y The following example shows how to use ZIO with Doobie (a library for JDBC access) and FS2 (a streaming library), which both rely on Cats Effect instances (`cats.effect.Async` and `cats.effect.Temporal`): ```scala -import zio._ -import zio.interop.catz._ -import doobie._ -import doobie.implicits._ -import zio.clock.Clock -import scala.concurrent.duration._ - -object DoobieH2Example extends App { - override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = - ZIO.runtime.flatMap { implicit r: Runtime[Clock] => - val xa: Transactor[Task] = - Transactor.fromDriverManager[Task]("org.h2.Driver", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "user", "") - - sql"SELECT 42" - .query[Int] - .stream - .transact(xa) - .delayBy(1.second) - .evalTap(i => ZIO.succeedBlocking(println(s"Data $i")))) - .compile - .drain - .exitCode - } -} +import zio.{durationInt as _, *} +import zio.interop.catz.* +import doobie.* +import doobie.implicits.* +import scala.concurrent.duration.* + +object Example extends ZIOAppDefault: + val run = { + val xa: Transactor[Task] = + Transactor.fromDriverManager[Task]("org.h2.Driver", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "user", "", None) + + sql"SELECT 42" + .query[Int] + .stream + .transact(xa) + .delayBy(1.second) + .evalTap(i => Console.printLine(i)) + .compile + .drain + .exitCode + } ``` diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index e30569c9..a5176c37 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -7,10 +7,10 @@ import sbtbuildinfo._ import BuildInfoKeys._ object BuildHelper { - val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.17.0" % Test) + val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.18.0" % Test) val Scala212 = "2.12.19" - val Scala213 = "2.13.13" + val Scala213 = "2.13.14" val Scala3 = "3.3.3" private val stdOptions = Seq( diff --git a/project/build.properties b/project/build.properties index 04267b14..b485f62c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.9 +sbt.version=1.10.0 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 5338d18f..4294e20a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,9 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.0") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.0") +lazy val zioSbtVersion = "0.4.0-alpha.26" +addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion) +addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion) + +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") @@ -8,4 +12,4 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.6") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.8") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3") diff --git a/zio-interop-cats-tests/shared/src/test/scala/zio/interop/CatsSpecBase.scala b/zio-interop-cats-tests/shared/src/test/scala/zio/interop/CatsSpecBase.scala index 20116ec9..f308f672 100644 --- a/zio-interop-cats-tests/shared/src/test/scala/zio/interop/CatsSpecBase.scala +++ b/zio-interop-cats-tests/shared/src/test/scala/zio/interop/CatsSpecBase.scala @@ -98,7 +98,7 @@ private[zio] trait CatsSpecBase implicit def runtime(implicit ticker: Ticker): Runtime[Any] = { val tickerExecutor = Executor.fromExecutionContext(ticker.ctx) - val fiberId = FiberId.make(Trace.empty)(Unsafe.unsafe) + val fiberId = FiberId.generate(FiberRefs.empty)(Trace.empty)(Unsafe.unsafe) val fiberRefs = FiberRefs.empty .updatedAs(fiberId)(FiberRef.overrideExecutor, Some(tickerExecutor)) .updatedAs(fiberId)(FiberRef.currentBlockingExecutor, tickerExecutor)