Releases: typelevel/cats-effect
v1.1.0
General 1.1.0
release.
This follows the 1.1.0-M1 milestone.
Changes (since M1)
Added features:
- #334: Add
ContextShift#evalOnK
- #365: Add
IorT
instances - #392: Introduce
mapK
operations to concurrent primitives - #393: Add dual effect concurrent data constructors
- #419:
Resource.allocated
Fixes:
- #374, #427: Properly propogate
Writer
andState
effects inbracketCase
- #403: Fix resource leak in
Semaphore#withPermit
andacquireN
- #421: Fix
Resource
attempt on suspend - #424, #402: Ensure that
MVar.take
,MVar.put
,Semaphore.release
andDeferred.complete
do not block, also improving fairness for theConcurrent
versions
Chores:
- #362: Tutorial for Cats-Effect
- #366: Add some test cases for
LinkedMap
- #397: Add missing test methods for
Semaphore
- #399: Fix sentence flow in
IOApp
docs - #406: Update reference to
evalOn
'sfa
parameter - #408: Update
sbt-travisci
to 1.1.3 - #409: Update
sbt-pgp
to1.1.2
- #410: Update
sbt-mima-plugin
to0.3.0
- #411: Update
sbt-git
to1.0.0
- #414: Update
sbt-jmh
to0.3.4
- #417: Typeclasses cheat sheet
- #426: Update
kind-projector
to0.9.9
- #428: Update
sbt-scalajs
,scalajs-compiler
,scalajs-library
... to0.6.26
- #429, #425: Upgrade to Scala
2.12.7
and2.13.0-M5
- #432: Add proper Scala.js source maps, pointing to GitHub repo
- #433: Update SBT to
1.2.7
- #435: Update Cats to version
1.5.0
Changes in M1
Added features:
- #387: Add
ContextShift.apply
to summon implicitContextShift
- #389: Add
Timer.apply
to summon implicitTimer
- #400: Add
Clock.apply
to summon implicitClock
Docs:
- #356: Change to Scala's Code of Conduct
- #358: Concurrency basics pictures
- #385: Update readme to reference partial unification
- #381: Add concurrency basics to menu
- #396: Add
Finch
as adopter
Bug fixes and chores:
- #361: Add more semaphore tests
- #353: Reset MiMa baseline
- #377: Remove unused
IOConnection
inIOBracket
release frames - #379 : Upgrade to cats-1.4.0 (supersedes #352)
- #376: Force
fiber#cancel
to await completion ofbracket
, fix idempotence ofrelease
- #355: Increase test coverage of
Ref
- #398: Update oraclejdk10 to openjdk11 in test matrix
Getting Involved
You can always help with:-
- Feedback by joining us on Gitter
- Re-tweet the release announcement
- Give us a star on GitHub 🙂
Special Thanks
This release was made possible by: @alexandru, @ahjohannessen, @Avasil, @catostrophe, @charles-rumley, @ChristopherDavenport, @CucumisSativus, @djneades, @fthomas, @ghisvail, @joan38, @kubukoz, @lrodero, @LukaJCB, @mpilquist, @mszczygiel, @Odomontois, @RaasAhsan, @rossabaker, @scala-steward, @SystemFw, @vkostyukov, @Zelenya and several other reviewers and commenters.
Thanks to all those involved!
v1.1.0-M1
This is a milestone release to test new bugfixes and features. It is fully binary compatible with 1.0.0.
List of Changes
Added features:
- #387: Add
ContextShift.apply
to summon implicitContextShift
- #389: Add
Timer.apply
to summon implicitTimer
- #400: Add
Clock.apply
to summon implicitClock
Docs:
- #356: Change to Scala's Code of Conduct
- #358: Concurrency basics pictures
- #385: Update readme to reference partial unification
- #381: Add concurrency basics to menu
- #396: Add
Finch
as adopter
Bug fixes and chores:
- #361: Add more semaphore tests
- #353: Reset MiMa baseline
- #377: Remove unused
IOConnection
inIOBracket
release frames - #379 : Upgrade to cats-1.4.0 (supersedes #352)
- #376: Force
fiber#cancel
to await completion ofbracket
, fix idempotence ofrelease
- #355: Increase test coverage of
Ref
- #398: Update oraclejdk10 to openjdk11 in test matrix
Getting Involved
You can always help with:-
- Feedback by joining us on Gitter
- Re-tweet the [release announcement]
- Give us a star on GitHub 🙂
Special Thanks
This release was made possible by: @alexandru, @ahjohannessen, @Avasil, @charles-rumley, @ChristopherDavenport, @CucumisSativus, @joan38, @kubukoz, @LukaJCB, @mszczygiel, @RaasAhsan, @rossabaker, @SystemFw, @vkostyukov, @Zelenya and several other reviewers and commenters.
Thanks to all those involved!
v1.0.0
This is the eagerly anticipated 1.0.0 release of Cats-Effect!
Binary compatibility will be maintained through the 1.x series, with new features introduced in minor releases. This release is not binary or source compatible with the previous 0.10 release.
List of Changes
Major behavioral / breaking changes:
- #317: New
Sync
laws related to stack safety ofbracket
- #323: Remove
Ref#lazySet
andRef#compareAndSet
Added features:
- #333: Add
IO.delay
- #328: Add
Async.memoize
andConcurrent.memoize
- #343: Try to set
process.exitCode
inIOApp
under Scala.js - #344: Add
IOApp.WithContext
to JVM to configure the thread pools - #346: Create unique thread names for the global scheduler
Docs:
- #318: Typo fixes
- #322: Instructions on building the microsite
- #329: Fix
raceWith
references inConcurrent
doc - #325: Fix
ExecutionContext
s example in Concurrency Basics doc - #338: Update concurrency and cancellation documentation
- #340: Note that
MVar#take
empties the variable - #342: Add pictures for the concurrency primitives
- #350: Fix
Fiber#cancel
scaladoc
Bug fixes and chores:
- #331: Execute a handful of tests that previously weren't
- #335: Ensure that canceling
join
does not cancel theFiber
- #349: Fix spurious test failure in
ConcurrentLaws
- #352: Upgrade to cats-1.3.1
Previous Release Candidates
For 1.0.0
we went through multiple release candidates, so for a full list of changes since 0.10
, see these release notes:
Getting Involved
You can always help with:
- Feedback by joining us on Gitter
- Re-tweet the [release announcement]
- Give us a star on GitHub 🙂
Special Thanks
This release was made possible by: @alexandru, @Avasil, @d1skort, @erlangxk, @kubukoz, @mpilquist, @RaasAhsan, @rossabaker, @Stefanqn, @SystemFw, @Zelenya, and several other reviewers and commenters.
Thanks to all those involved!
v1.0.0-RC3
This is the third release candidate before 1.0. The only planned changes before the final release are documentation and an upgrade to cats-1.3.0 when it is released.
List of Changes
New data types:
Major behavioral / breaking changes:
- #278: New encoding of
Resource
- #282: Change laws for
Bracket
andConcurrent
to support auto-cancelable and streaming types - #290: Changes to concurrency and cancellation:
Concurrent#cancelable
is no longer a primitive.- Replace
IO[Unit]
withF[Unit]
as the cancellation token, aliased toCancelToken[F]
IO#unsafeRunCancelable
now returns aCancelToken[IO]
to support backpressure
- #298: Introduce
SyncIO
, which becomes return type inEffect#runAsync
andConcurrentEffect#runCancelable
- #296:
Sync
extendscats.Defer
- #289, #307: Separation of concerns in
Timer
:Timer#shift
moved to newContextShift
Timer#clockMonotonic
andTimer#clockRealtime
moved ontoTimer#clock
Timer.deriveIO
is removed.- Added derived
Timer
instances for various monad transformers overF[_]
.
- #309: Remove
Effect#runSyncStep
- #311: Make
IO
auto-cancelable after async boundaries and removeIO#onCancelRaiseError
Added features:
- #266: Update
implicitNotFound
error message inTimer
- #269: Add
Resource.fromAutoCloseable
- #249: Add
Applicative[Fiber[F, ?]]
instance givenConcurrent[F]
- #305: Backpressure on
IO
cancellation tokens to support sequenced finalizers - #289: Improved support for blocking APIs with
ContextShift#evalOn
Docs:
- #263: Replace
Task
's mentions withIO
fromMVar
docs - #264, #283: Cleanup to documentation for
Ref
- #292, #300: Typo fixes
- #300: Document stack safety as another use case for
IO.shift
- #303: Remove redundant
Parallel[IO, IO]
instance fromDeferred
docs - #302: Document
SyncIO
- #304: List related projects
- #287: New guide to concurrency basics
Bug fixes and chores:
- #274: Test against Oracle JDK 10
- #273: Build with sbt-1.1.6
- #275: Build with scala-2.12.6, scalatest-3.0.5
- #293: Remove deprecated procedure syntax
- #294: Build for scala-2.13.0-M4 and with cats-1.2.0
Getting Involved
You can always help with:
- Feedback by joining us on Gitter
- Re-tweet the [release announcement]
- Give us a star on GitHub 🙂
Special Thanks
This release was made possible by: @Avasil, @bthuillier, @adamw, @sullis, @aoiroaoino, @alexandru, @kubokoz, @vaslabs, @LukaJCB, @xuwei-k, @mpilquist, @dscleaver, @ericlurla, @gvolpe, @pchlupacek, @rossabaker, @ChristopherDavenport and several other reviewers and commenters.
Thanks to all those involved!
v1.0.0-RC2
This is the second and final release candidate before 1.0 — it's not a planned release candidate, but due to a flurry of activity and awesome PRs from FS2, Monix and Http4s contributors, we can't release a 1.0 with so much being added, a total of 35 PRs, which aren't light at all, a record for this project.
List of Changes
New data types:
Resource
(doc) — #188Ref
(doc) andDeferred
(doc) — #204, #211, #218 and #220Semaphore
(doc) — #205MVar
(doc) — #217, #222, #223, #224IOApp
(doc) — #213, #252
Major behavioral / breaking changes:
- #232: Require
Timer
andshift
automatically in concurrent operations - #237, #254: Restate
Concurrent
laws to accept auto-cancelable run-loops - #241: Move
uncancelable
toBracket
, changeBracket
laws to makeacquire
andrelease
uncancelable - #195, #215 and #261: Add
Effect#runSyncStep
, fixing #104 - #248, #258: Introduce
Async.asyncF
- #221: add
toIO
operation toEffect
Added Features:
- #191: Add
IO#redeemWith
, in combination with the future typelevel/cats/pull/2237 - #214: Add
IO#timeout
andConcurrent.timeout
- #236:
Bracket
instance for Kleisli - #234:
bracket
should work on top of JavaScript viaunsafeRunSync
- #235: remove
NonFatal
, switch to the standard one - #250: Optimize async trampoline, add
ContextSwitch
- #255, #257: use the standard
Throwable#addSuppressed
inbracket
when bothuse
andrelease
throw - #253: Add a la carte syntax package, syntax for Bracket and timeouts
Docs:
- #201: Docs for
parTraverse
andparSequence
- #203: Docs for
Resource
,Deferred
,Ref
andSemaphore
- #238: Docs for
Resource
Bug fixes and chores:
- #225:
IOTimer
does not use the parameter specified - #260: Exclude non-terminating laws from default set
- #259: Decrease default
stackSafeIterationsCount
in laws
Getting Involved
You can always help with:
- Feedback by joining us on Gitter
- Re-tweet the release announcement
- Give us a star on GitHub 🙂
Special Thanks
This release was made possible by: @rossabaker, @mpilquist, @SystemFw, @oleg-py, @johnynek, @durban, @ptravers, @stephennancekivell, @gvolpe, @ajaychandran and @alexandru .
(apologies if I forgot anybody)
Thanks to all those involved!
v1.0.0-RC
This is the first and hopefully only release candidate for 1.0.0.
This upgrade breaks binary compatibility with the previous 0.10
, so use with care — libraries that depend on Cats Effect must be upgraded first. This version also drops Scala 2.10 support.
The highlight of this release is the Bracket
type class, along with its IO
implementation, IO#bracket
and IO#bracketCase
.
Details of usage with IO
have been added in the documentation, see the new section:
Safe Resource Acquisition and Release
Features:
- #113, #186: Adds
Bracket
type class, along withIO
changes, for exposingbracket
andbracketCase
, operations meant for safe release of resources - #182:
IO.runAsync
should report errors in its handler (back-ported in0.10.1
) - #168: adds
Async#never
- #183: adds new config parameter meant for
AsyncTests
to disable laws that are testing for non-termination
Breaking changes:
Chores:
Cancelable IO (v0.10)
v0.10 represents a big milestone for the upcoming 1.0.0
(see milestones), bringing you the new and improved IO
data type, along with new type classes in support of cancelation.
But first, we now have a documentation website:
typelevel.org/cats-effect/
Checkout the document for IO
:
typelevel.org/cats-effect/datatypes/io.html
And also the published ScalaDocs:
typelevel.org/cats-effect/api/
Note: this release is binary compatible with 0.9, but not source compatible, as it has some small API cleanups, deprecated via private[package]
— see below for details 😉
Features for cancelation:
- #121: the cancelable
IO
- #132 and #133: added the
Timer
data type, to be able to do delayed execution and time measurements in a pure way, while also curing IO's heavy dependency onExecutionContext
- #134: adds the new
Concurrent
andConcurrentEffect
type classes, to complement the existing type classes with cancelation capabilities - #137, #142 and #145: adds
race
andracePair
inIO
and in theConcurrent
type class, for describing race conditions - #135, #143, #147, #149, #151, #153, #155, #156, #157: starts a documentation Microsite for Cats-effect, w00t!
Improvements for the provided instances:
- #144: re-adds
cats.data.Kleisli
instances, useful for example for Frameless, coupled with #2185 incats-core
in order to preserve coherence - #146: optimizes our internal
AndThen
implementation, currently used for makingIndexedStateT
stack safe for left-associated binds — this will soon be gone from cats-effect though, due to PR #2187 being merged incats-core
Other:
- #130: changed copyright headers in source files to mention a year range, plus it makes it clear that copyright is held by contributors
API breakage
This version is binary compatible with version 0.9, so you can upgrade cats-effect
without worries for your other dependencies. However it contains some minor API cleanups that might make your compiler to emit errors.
Async#shift
is now deprecated:
trait Async[F[_]] extends Sync[F] with LiftIO[F] {
// ...
@deprecated("Moved to Async$.shift, will be removed in 1.0", "0.10")
private[effect] def shift(ec: ExecutionContext): F[Unit] =
Async.shift(ec)(this)
Async#shift
was moved to the Async
companion object. So code like this:
def execute[F[_]](thunk: => A)(implicit F: Async[F], ec: ExecutionContext): F[A] =
F.shift *> F.delay(thunk)
Needs to be changed to ...
def execute[F[_]](thunk: => A)(implicit F: Async[F], ec: ExecutionContext): F[A] =
Async.shift[F](ec) *> F.delay(thunk)
The reason for the hard deprecation is that there's no potential for optimization and so it doesn't belong on the Async
type class, the derived implementation being the best you can do, in terms of the provided ExecutionContext
. It also forces apps to prepare for the upcoming 1.0.0
sooner.
IO.fromFuture
no longer requires an ExecutionContext
In case you used IO.fromFuture
, it was using an ExecutionContext
, but now with 0.10
it will stop doing that ...
import scala.concurrent.ExecutionContext.Implicits.global
IO.fromFuture(IO(Future(1 + 1)))
What happens with the upgrade to 0.10 is that the provided context in this sample will stop being used. So the compiler or the IDE might end up emitting an "unused import" warning.
But if you provided the ExecutionContext
explicitly, then this is going to be a compilation error:
// This triggers an error in 0.10
IO.fromFuture(IO(Future(1 + 1)))(global)
Note that the old symbols in both cases are still there, but made private[package]
— so binary compatibility is preserved.
v0.10.1
v0.9
This is the last release before PR #121 gets merged.
The highlight of the release is the provided cats.Parallel type-class instance for IO
. This makes it now possible to process IO
values in parallel, out of the box:
Simple sample:
import cats.implicits._
val name: IO[String] = getName(id)
val age: IO[Int] = getAge(id)
// Assuming `name` and `age` are asynchronous IOs, they'll
// get processed in parallel ...
(name, age).parMapN { (name, age) => Person(name, age) }
Changes:
- PR #115 (issue #83):
cats.Parallel[IO, IO.Par]
implementation - PR #110 (issue #94): add
SemigroupK
instance forIO
- PR #111 (issue #108): re-throw exception in IO.async after callback was called once
- PR #114: switch traits to abstract classes for better bincompat
- PR #119 (issue #118): change check in SyncLaws to allow streaming types
- PR #125: fixes omission in
AsyncTests