Skip to content
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

Fix #1184 (cats-effect version conflict) by dropping Monix for now #1187

Merged

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented 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 (another approach to this problem would be to split the scanamo-cats-effect artifact into two separate modules). 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 also #1184

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 regiskuckaertz merged commit b2ac388 into master Aug 15, 2021
@regiskuckaertz regiskuckaertz deleted the fix-cats-effect-version-conflict-by-dropping-monix branch August 15, 2021 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI for the Scanamo repo not running since 15th June 2021 (travis-ci.org decommisioned)
2 participants