Releases: typelevel/cats
Cats 2.4.1 (hotfix)
This release fixes a problem in Cats 2.4.0. It is not binary compatible with Cats 2.4.0. We urge everyone to skip 2.4.0 and upgrade directly to 2.4.1.
Cats 2.4.1 is a hotfix release in the 2.x series. It is binary compatible to every previous release in the 2.x series, except for Cats 2.4.0.
The following release notes contain all cumulative changes since Cats 2.3.1.
Additions
- #3220, #3222, #3773 Add Invariant instances for Numeric and Integral by @tmccarthy & @kubukoz
- #3650, #3579 add grouped to NonEmptyCollection by @bbstilson & @larsrh
- #3299, #3293 Generate Show instances for Tuple3 and higher by @barambani
- #3727 .slidingN using tuples by @Slakah
- #3750, #1549 Support scala-native 0.4 by @arashi01
- #3771 add NonEmptyChain.of by @larsrh
- #3318 add syntax for unzip on functors by @yangzai
- #3680 Add more group-like methods to NonEmptyList & Chain by @BalmungSan
- #3748 Delimited continuations via shiftT/resetT for ContT by @TimWSpence
- #3747 Add callCC to ContT by @TimWSpence
- #3765 Add NonEmptyList.take by @saeltz
- #2087, #3753 add Monoid[Comparison] for lexographical ordering by @adelbertc & @larsrh
- #3759 Provide BoundedEnumerable[Byte] instance by @ashleymercer
- #3699 Allow finding a list of maxiumum/minimum items for Foldable/Reducible by @Billzabob & @larsrh
- #3730 Add NonEmptyList.zip by @saeltz
- #3724 Trivial semigroup instances by @RaasAhsan
- #3707, #3710 Add missing Free.liftK and Free.liftId by @phongngtuan
Changes
- #3776, #3777 Removed and replaced inconsistent Parallel derivation for EitherT by @djspiewak
- this change is potentially source-breaking: an existing
implicit
has been made un-implicit
, but anotherimplicit
with a different semantics has been provided (core) - more discussion at typelevel/cats-effect#1645
- this change emits new deprecation warnings
- this change is potentially source-breaking: an existing
- #3734, #3772 Cogen for (Finite)Duration to fix test failures by @larsrh
- this change is only internal in tests
- #2207, #3758 deprecate Free.inject by @larsrh
- this change emits new deprecation warnings
- #3702 specialized EqOps by @YannMoisan
- #3677 Added EmptyK instance for Map by @LMnet
- this change marks a previously non-
implicit
method asimplicit
(alleycats)
- this change marks a previously non-
Documentation
- #3722 Rename productM to mproduct in the glossary by @BenFradet
- #3745 Adjust to GitHub Actions by @sh0hei
- #3744 Improve scaladoc for EitherT.rethrowT by @majk-p
- #3732 scaladoc fixes for PartialOrder by @martijnhoekstra
- #3728 Fix a link in typelevelEcosystem.md by @akiomik
- #3726 update README by @gokyo
Cats 2.4.0 (broken, see notes)
Cats 2.4.0 contains an unintended source-breaking change, please upgrade directly to 2.4.1.
Cats 2.4.0 is a binary-compatible release in the 2.x series. It is the first release with support for Scala Native.
Additions
- #3220, #3222, #3773 Add Invariant instances for Numeric and Integral by @tmccarthy & @kubukoz
- #3650, #3579 add grouped to NonEmptyCollection by @bbstilson & @larsrh
- #3299, #3293 Generate Show instances for Tuple3 and higher by @barambani
- #3727 .slidingN using tuples by @Slakah
- #3750, #1549 Support scala-native 0.4 by @arashi01
- #3771 add NonEmptyChain.of by @larsrh
- #3318 add syntax for unzip on functors by @yangzai
- #3680 Add more group-like methods to NonEmptyList & Chain by @BalmungSan
- #3748 Delimited continuations via shiftT/resetT for ContT by @TimWSpence
- #3747 Add callCC to ContT by @TimWSpence
- #3765 Add NonEmptyList.take by @saeltz
- #2087, #3753 add Monoid[Comparison] for lexographical ordering by @adelbertc & @larsrh
- #3759 Provide BoundedEnumerable[Byte] instance by @ashleymercer
- #3699 Allow finding a list of maxiumum/minimum items for Foldable/Reducible by @Billzabob & @larsrh
- #3730 Add NonEmptyList.zip by @saeltz
- #3724 Trivial semigroup instances by @RaasAhsan
- #3707, #3710 Add missing Free.liftK and Free.liftId by @phongngtuan
Changes
- #3776, #3777 Removed and replaced inconsistent Parallel derivation for EitherT by @djspiewak
- this change is potentially source-breaking: an existing
implicit
has been made un-implicit
, but anotherimplicit
with a different semantics has been provided (core) - more discussion at typelevel/cats-effect#1645
- this change emits new deprecation warnings
- this change is potentially source-breaking: an existing
- #3734, #3772 Cogen for (Finite)Duration to fix test failures by @larsrh
- this change is only internal in tests
- #2207, #3758 deprecate Free.inject by @larsrh
- this change emits new deprecation warnings
- #3702 specialized EqOps by @YannMoisan
- this change accidentally broke source compatibility, please upgrade to 2.4.1
- #3677 Added EmptyK instance for Map by @LMnet
- this change marks a previously non-
implicit
method asimplicit
(alleycats)
- this change marks a previously non-
Documentation
- #3722 Rename productM to mproduct in the glossary by @BenFradet
- #3745 Adjust to GitHub Actions by @sh0hei
- #3744 Improve scaladoc for EitherT.rethrowT by @majk-p
- #3732 scaladoc fixes for PartialOrder by @martijnhoekstra
- #3728 Fix a link in typelevelEcosystem.md by @akiomik
- #3726 update README by @gokyo
Cats 2.3.1
Cats 2.3.1 adds support for Scala 3.0.0-M3 and is published for Scala 2.12, 2.13, and 3.0.0-M2 as well.
Changes From 2.3.0
- #3696 Add
ApplicativeThrow
andMonadThrow
to cats package object (from cats-effect) (@agustafson) - #3698 Add addLeft/addRight for Ior (@keirlawson)
- #3639 Created documentation for monaderror, merged it with applicative error (@dhinojosa)
- #3402 Simplify FunctionK.lift macro (@joroKr21)
- #3708 Use as rather than map and discard (@johnynek)
Cats 2.3.0
Welcome to the first stable release of Cats on Scala 3… milestone 2! We will continue releasing minor versions within the 2.3.x lineage against Scala 3.0.0 until it reaches a final stable release. The decision to push a stable release of Cats in advance of this date was made in order to simplify versioning within the downstream ecosystem.
Changes From 2.2.0
- #3673 – tweak Band impl so it can more easily be combined with Monoid in a single instance (@Dwolla)
- #3609 – A new dedicated cats ecosystem page (@benkio)
- #3630 – FunctionK: methods to narrow input / widen output types (@bplommer)
- #3620, #3624 – Typeclass instances for
immutable.Seq
(@JosephMoniz) - #3603 – Add method
distinct
to TraverseFilter (@takayahilton)
Cats 2.3.0-M2: Getting closer to Scala 3
The Dotty release train is running full steam ahead: this Cats milestone release is cross-built and released for Scala 2.12.x, 2.13.x, Dotty 0.27 and 3.0.0-M1.
There are only minor changes since last since 2.3.0-M1:
- #3661 fix typo in Scaladoc by @fixxer
- #3666, #3667 add
simulacrum-scalafix-annotations
to the classpath, build for 3.0.0-M1 by @djspiewak
Cats 2.3.0-M1
We are proud to announce the first Dotty release of Cats! All modules of Cats are cross-built and released for Scala 2.12.x, 2.13.x, and Dotty 0.27. Other than that, this release contains relatively few new features.
Dotty
The purpose of this milestone is that adventurous users can try out first-class Dotty support before we cut a final 2.3.0 release. Note that for the Dotty builds, binary compatibility between this milestone release and 2.3.0 may break in some situations. Also, if you are using the laws, sbt may complain about conflicting Scala version suffixes. This will be fixed in time for the final release.
Binary compatibility (Scala 2)
As usual, the 2.3.x series is backward binary-compatible with all previous 2.x releases (and with 1.x for the non-laws modules).
Changes & additions
- #3603
distinct
forTraverseFilter
by @takayahilton - #3620, #3624 instances for
immutable.Seq
by @JosephMoniz - #3630 methods to narrow input/widen output types on
FunctionK
by @bplommer - #3636 Dotty support by @LukaJCB and @larsrh
- #3647
traverseTap
by @majk-p - #3648 add a law relating
defer
andfix
inDefer
by @johnynek
Other improvements
- #3373 test for
zipWithIndex
stack safety by @dantb - #3595 migrate from tut to mdoc by @keynmol
- #3608 document
scalafixAll
to migrate test code as well by @bjaglin - #3609 Cats ecosystem website by @benkio
- #3616 documentation on
ApplicativeError
by @dhinojosa - #3616 documentation on
Writer
andWriterT
by @benkio
Cats 2.2.0
The most significant change in the 2.2.0 release is that all Cats type class instances for standard library types are now available in implicit scope, and no longer have to be imported. This has a number of benefits, including faster compile times and fewer things to think about. Please see this pull request, this blog post, the 2.2.0-M1 release notes, and the migration guide below for more detailed information about this change.
This release is verified to be backward binary compatible with all 2.1.x and 2.0.x releases (and with 1.x for the non-laws modules). It is also binary compatible with the last two 2.2.0 release candidates (RC3 and RC4), but has minor binary incompatibilities with the earlier release candidates.
While this release is not guaranteed to be 100% source-compatible with previous release series, most updates should not require changes. You may want to adjust your imports in order to use the new implicit scope type class instances, but this is only an optimization (it may improve your compile times). If you are using Scala Steward these adjustments will be made for you.
This is the first general-availability release that does not include cats-macros artifacts. This module has been empty since Cats 1.x, but if you explicitly depend on it for some reason, you'll have to remove it from your build.
This release is published for Scala 2.12 and 2.13 and for Scala.js 1.x. We dropped support for Scala.js 0.6 in 2.2.0-M3.
There have been 261 pull requests merged since the 2.1.0 release last December, and the list below only includes PRs that have been merged since the last release candidate.
3 API / feature enhancements
- #3566 Scalafix rule to remove instance imports when upgrading to 2.2.0 by @cb372
- #3579 Add
toValidated
to TrySyntax by @gagandeepkalra - #3576 Remove unused private method by @takayahilton
3 documentation improvements
- #3586 Fix typo in FoldableTests (constistency -> consistency) by @tmccarthy
- #3581 Add monix-bio to related projects by @Avasil
- #3580 Add Parallel typeclass diagram to docs. by @izeigerman
5 build improvements
- #3591 Update sbt-scalafix to 0.9.20 by @scala-steward
- #3589 Update discipline-munit to 0.2.4 by @scala-steward
- #3588 Update munit-scalacheck to 0.7.12 by @scala-steward
- #3585 Update sbt-dotty to 0.4.2 by @scala-steward
- #3578 Update discipline-scalatest to 2.0.1 by @scala-steward
For a complete record of changes since 2.1.0, please see the release notes for the pre-releases:
- https://github.com/typelevel/cats/releases/tag/v2.2.0-M1
- https://github.com/typelevel/cats/releases/tag/v2.2.0-M2
- https://github.com/typelevel/cats/releases/tag/v2.2.0-M3
- https://github.com/typelevel/cats/releases/tag/v2.2.0-RC1
- https://github.com/typelevel/cats/releases/tag/v2.2.0-RC2
- https://github.com/typelevel/cats/releases/tag/v2.2.0-RC3
- https://github.com/typelevel/cats/releases/tag/v2.2.0-RC4
Migration
In most cases all that's necessary to switch to using the new implicit scope instances is to replace cats.implicits._
imports with cats.syntax.all._
and delete any cats.instances
imports. You don't have to make this change to use Cats 2.2.x, though, since this release doesn't remove anything. Importing cats.implicits._
will do exactly the same thing on Cats 2.1.x and 2.2.x, since imported instances have higher priority than implicit scope. You just won't see improvements in compile times.
There is one exception to this rule. The cats.implicits
package provides implicit conversions from Cats's own Order
and PartialOrder
type classes to the standard library's Ordering
and PartialOrdering
. This conversion is not available in implicit scope, because it would be a bad idea for Cats to put instances of type classes it doesn't own into scope for types that it doesn't own (and also because it's not possible).
For example the following code compiles on all Cats versions:
import cats.instances.all._
Ordering[List[Int]]
The standard library doesn't provide an Ordering
for List[Int]
in implicit scope, but Cats provides both an Order[List[Int]]
and an implicit conversion from cats.Order
to scala.math.Ordering
, so this code compiles.
In this case you can't simply remove the import, though, since while the Order
instance will be available without it, the Ordering
conversion won't be:
scala> cats.Order[List[Int]]
res0: cats.kernel.Order[List[Int]] = cats.kernel.instances.ListOrder@91da5ff
scala> Ordering[List[Int]]
^
error: No implicit Ordering defined for List[Int].
Instead you can either leave the import as it is, or change it to the more minimal cats.instances.order._
.
Cats 2.2.0-RC4
In previous Cats 2.2.0 pre-releases, all type class instances for Scala standard library types were available in implicit scope, except for the ones for Future
. We made the decision to exclude those instances in part because putting them into implicit scope required duplicating some instances from cats-core in cats-kernel, which hadn't previously included any Future
-related code. This release candidate reverses that decision and makes all type class instances available in implicit scope. It also includes a fix for one method on NonEmptyLazyList
for Scala 2.13.
This release candidate has the same binary compatibility guarantees as 2.2.0-RC3, and is backward binary-compatible with that release.
2 API / feature enhancements
- #3572 Add Future instances to implicit scope by @travisbrown
- #3573 Avoid all evaluation of NonEmptyLazyList#reduceRightTo by @takayahilton
2 documentation improvements
- #3575 Missing a "]" in CONTRIBUTING.md by @benkio
- #3574 Update README.md by @diesalbla
Cats 2.2.0-RC3
This is the third release candidate for Cats 2.2.0. We decided to publish another release candidate because since 2.2.0-RC2 we've received contributions that add new type class instances and new methods, fix some issues related to laziness and stack-safety, and improve performance.
This release is verified to be backward binary compatible with all 2.1.x and 2.0.x releases (and also with 1.x for the non-laws modules), but not with any of the other 2.2.0 milestones or release candidates. It breaks binary compatibility with the previous release candidates only in removing a single unnecessary type class instance, the catsTraverseForEither
method in Traverse
, which was introduced in 2.2.0-M1.
The largest change since 2.2.0-RC2 is @LukaJCB's migration of the Cats tests from ScalaTest to MUnit, which makes it easier for us to track current Dotty releases, but this switch has no effect on any published artifacts.
1 bug fix
- #3565 Fix ReducibleLaws causing stack overflow by calling
Eval.now
early by @bastewart
15 API / feature enhancements
- #3569 Change AndThen to directly check isRightAssociated by @johnynek
- #3567 Avoid all evaluation of LazyList#foldRightDefer by @takayahilton
- #3560 Improve AndThen use of Single by @johnynek
- #3553 add ifElseM by @mtomko
- #3556 Order for writert by @TimWSpence
- #3527 Add toRightAssociated to AndThen by @johnynek
- #3555 Order for IorT by @TimWSpence
- #3554 Order for Ior by @TimWSpence
- #3540 Remove traverseForEither in Traverse companion object by @LukaJCB
- #3549 Enable breakout in Reducible[NonEmptyVector].reduceMapA by @takayahilton
- #3545 Enable breakout in functions nonEmptyTraverse_ and nonEmptySequence_ by @takayahilton
- #3533 Improve invariants and performance in Chain by @johnynek
- #3535 Improve traverseViaChain API by @johnynek
- #3538 Preliminary Munit port by @LukaJCB
- #3528 Optimize toNonEmptyList of Reducible[NonEmptyChain] by @takayahilton
4 documentation improvements
- #3562 Comments on NonEmptyReducible not being a typeclass by @akopich
- #3537 add coulomb-cats to ecosystem list by @erikerlandson
- #3531 adding Hootsuite Inc. to the list of Adopters by @jyoo980
- #3526 Update README.md by @Immozentral
11 build improvements
- #3564 Remove redundant parentheses by @barambani
- #3561 Update munit-scalacheck to 0.7.11 by @scala-steward
- #3558 Update sbt-doctest to 0.9.7 by @scala-steward
- #3557 Update sbt-buildinfo to 0.10.0 by @scala-steward
- #3546 Fix alleycats-tests on Scala.js by @joroKr21
- #3548 Test freeJS with FastOptStage to save some CO2 by @joroKr21
- #3544 Scala 2.12.3 and 2.12.12 by @barambani
- #3543 Update discipline-munit to 0.2.3 by @scala-steward
- #3542 Update sbt-scalafmt to 2.4.2 by @scala-steward
- #3539 Update discipline-core to 1.0.3 by @scala-steward
- #3530 Update discipline-scalatest to 2.0.0 by @scala-steward
Cats 2.2.0-RC2
This is the second release candidate for Cats 2.2.0. We decided to publish another release candidate because of several significant implementation improvements by @johnynek, including in particular #3519 and #3521. This release is verified to be backward binary compatible with 2.2.0-RC1, 2.2.0-M3, and all 2.1.x and 2.0.x releases (and also with 1.x for the non-laws modules), but not with 2.2.0-M1 or 2.2.0-M2.
7 API / feature enhancements
- #3524 A method
StateT.fromState
turningState[A, F[B]]
intoStateT[F,A, B]
is added. by @akopich - #3498 Enable breakout in functions reduceRightToOption and reduceRightTo. by @takayahilton
- #3519 remove casts from Eval, fix stack overflow in Eval by @johnynek
- #3521 make collection traversals stack safe by @johnynek
- #3516 Override some Option Apply/Applicative methods by @johnynek
- #3518 remove some casts in AndThen by @johnynek
- #3515 Add some more implementations to Function0 and Function1 Monads by @johnynek
3 build improvements
- #3525 Update scalafmt-core to 2.6.4 by @scala-steward
- #3520 Update sbt-scalafix to 0.9.19 by @scala-steward
- #3514 Scalafmt-core 2.6.3 by @barambani