-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to cats-effect v3.1.1, preparing for sbt v1.5 #1166
Merged
regiskuckaertz
merged 1 commit into
master
from
upgrade-cats-effect-to-remove-eviction-error-in-sbt-v1.5
Jul 11, 2021
Merged
Upgrade to cats-effect v3.1.1, preparing for sbt v1.5 #1166
regiskuckaertz
merged 1 commit into
master
from
upgrade-cats-effect-to-remove-eviction-error-in-sbt-v1.5
Jul 11, 2021
Conversation
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
The new, stricter eviction logic in sbt v1.5 (see sbt/sbt#6221) spotted that the version of `cats-effect` used by Scanamo were suspected to be binary incompatible: ``` [error] (zio / update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible: [error] [error] * org.typelevel:cats-effect_2.12:3.1.1 (early-semver) is selected over 2.5.1 [error] +- org.scanamo:scanamo-zio_2.12:1.0.0-M15+101-13c581a6-SNAPSHOT (depends on 3.1.1) [error] +- co.fs2:fs2-core_2.12:3.0.3 (depends on 3.1.1) [error] +- org.typelevel:cats-effect_2.12:2.5.1 (depends on 2.5.1) [error] [error] [error] this can be overridden using libraryDependencySchemes or evictionErrorLevel ``` Upgrading to use cats-effect v3.1.1 for consistency meant: * Using `async_` rather than `async` (which has an updated method signature that supports cancellation) - see https://typelevel.org/cats-effect/docs/migration-guide#async * Using `cats.effect.unsafe.implicits.global` in tests, where no `IORuntime` was available - an alternative way to do this would be using https://github.com/typelevel/cats-effect-testing/#scalatest See also https://typelevel.org/cats-effect/docs/migration-guide#io
Merged
regiskuckaertz
approved these changes
Jul 11, 2021
regiskuckaertz
deleted the
upgrade-cats-effect-to-remove-eviction-error-in-sbt-v1.5
branch
July 11, 2021 17:01
rtyley
added a commit
that referenced
this pull request
Aug 14, 2021
This change updates to the latest version of `fs2-core`, which is now compatible with `cats-effect` v3.1.1 (introduced in #1166). Unfortunately there's not yet a version of `monix` that supports `cats-effect` v3.1.1, so we're dropping support for Monix for now - the actual implementation code within Scanamo for the Monix support is only 4 lines, so can probably be easily copied into an end-user project if it's needed! Sbt is capable of warning us about version conflicts in dependencies, but gave no warning of the `cats-effect` version conflict, I think because the `fs2-core` & `monix` dependencies were marked as already `Provided`. My guess as to why the `Provided` marker was used is that the `scanamo-cats-effect` artifact gave support for both `fs2-core` & `monix`, but in general a consuming project is likely to only be using one of those - by declaring the two dependencies as `Provided`, neither will be implicitly pulled in as a transitive dependency of `scanamo-cats-effect` when used in the end-user project- giving the end-user-project freedom to just explicitly declare a dependency on the one they want to use. As we've dropped Monix support, and there's now only `fs2-core` support, I've changed the `fs2-core` dependency to be explicit, which will give us the benefit of sbt version-conflict warnings in future. See #1184
regiskuckaertz
pushed a commit
that referenced
this pull request
Aug 15, 2021
…1187) This change updates to the latest version of `fs2-core`, which is now compatible with `cats-effect` v3.1.1 (introduced in #1166). Unfortunately there's not yet a version of `monix` that supports `cats-effect` v3.1.1, so we're dropping support for Monix for now - the actual implementation code within Scanamo for the Monix support is only 4 lines, so can probably be easily copied into an end-user project if it's needed! Sbt is capable of warning us about version conflicts in dependencies, but gave no warning of the `cats-effect` version conflict, I think because the `fs2-core` & `monix` dependencies were marked as already `Provided`. My guess as to why the `Provided` marker was used is that the `scanamo-cats-effect` artifact gave support for both `fs2-core` & `monix`, but in general a consuming project is likely to only be using one of those - by declaring the two dependencies as `Provided`, neither will be implicitly pulled in as a transitive dependency of `scanamo-cats-effect` when used in the end-user project- giving the end-user-project freedom to just explicitly declare a dependency on the one they want to use. As we've dropped Monix support, and there's now only `fs2-core` support, I've changed the `fs2-core` dependency to be explicit, which will give us the benefit of sbt version-conflict warnings in future. See #1184
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new, stricter eviction logic in sbt v1.5 (see sbt/sbt#6221) spotted that the versions of
cats-effect
used by Scanamo were suspected to be binary incompatible:Upgrading to use cats-effect v3.1.1 for consistency meant:
async_
rather thanasync
(which has an updated method signature that supports cancellation) - see https://typelevel.org/cats-effect/docs/migration-guide#asynccats.effect.unsafe.implicits.global
in tests, where noIORuntime
was available - an alternative way to do this would be using https://github.com/typelevel/cats-effect-testing/#scalatest . See also https://typelevel.org/cats-effect/docs/migration-guide#io