Skip to content

Releases: typelevel/cats-effect

v1.1.0

03 Dec 08:59
v1.1.0
ce68980
Compare
Choose a tag to compare

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 and State effects in bracketCase
  • #403: Fix resource leak in Semaphore#withPermit and acquireN
  • #421: Fix Resource attempt on suspend
  • #424, #402: Ensure that MVar.take, MVar.put, Semaphore.release and Deferred.complete do not block, also improving fairness for the Concurrent 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's fa parameter
  • #408: Update sbt-travisci to 1.1.3
  • #409: Update sbt-pgp to 1.1.2
  • #410: Update sbt-mima-plugin to 0.3.0
  • #411: Update sbt-git to 1.0.0
  • #414: Update sbt-jmh to 0.3.4
  • #417: Typeclasses cheat sheet
  • #426: Update kind-projector to 0.9.9
  • #428: Update sbt-scalajs, scalajs-compiler, scalajs-library... to 0.6.26
  • #429, #425: Upgrade to Scala 2.12.7 and 2.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 implicit ContextShift
  • #389: Add Timer.apply to summon implicit Timer
  • #400: Add Clock.apply to summon implicit Clock

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 in IOBracket release frames
  • #379 : Upgrade to cats-1.4.0 (supersedes #352)
  • #376: Force fiber#cancel to await completion of bracket, fix idempotence of release
  • #355: Increase test coverage of Ref
  • #398: Update oraclejdk10 to openjdk11 in test matrix

Getting Involved

You can always help with:-

  1. Feedback by joining us on Gitter
  2. Re-tweet the release announcement
  3. 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

29 Oct 13:46
v1.1.0-M1
84696fb
Compare
Choose a tag to compare

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 implicit ContextShift
  • #389: Add Timer.apply to summon implicit Timer
  • #400: Add Clock.apply to summon implicit Clock

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 in IOBracket release frames
  • #379 : Upgrade to cats-1.4.0 (supersedes #352)
  • #376: Force fiber#cancel to await completion of bracket, fix idempotence of release
  • #355: Increase test coverage of Ref
  • #398: Update oraclejdk10 to openjdk11 in test matrix

Getting Involved

You can always help with:-

  1. Feedback by joining us on Gitter
  2. Re-tweet the [release announcement]
  3. 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

06 Sep 04:58
v1.0.0
Compare
Choose a tag to compare

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 of bracket
  • #323: Remove Ref#lazySet and Ref#compareAndSet

Added features:

  • #333: Add IO.delay
  • #328: Add Async.memoize and Concurrent.memoize
  • #343: Try to set process.exitCode in IOApp 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 in Concurrent doc
  • #325: Fix ExecutionContexts 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 the Fiber
  • #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:

  1. Feedback by joining us on Gitter
  2. Re-tweet the [release announcement]
  3. 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

20 Aug 18:29
v1.0.0-RC3
Compare
Choose a tag to compare

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 and Concurrent to support auto-cancelable and streaming types
  • #290: Changes to concurrency and cancellation:
    • Concurrent#cancelable is no longer a primitive.
    • Replace IO[Unit] with F[Unit] as the cancellation token, aliased to CancelToken[F]
    • IO#unsafeRunCancelable now returns a CancelToken[IO] to support backpressure
  • #298: Introduce SyncIO, which becomes return type in Effect#runAsync and ConcurrentEffect#runCancelable
  • #296: Sync extends cats.Defer
  • #289, #307: Separation of concerns in Timer:
    • Timer#shift moved to new ContextShift
    • Timer#clockMonotonic and Timer#clockRealtime moved onto Timer#clock
    • Timer.deriveIO is removed.
    • Added derived Timer instances for various monad transformers over F[_].
  • #309: Remove Effect#runSyncStep
  • #311: Make IO auto-cancelable after async boundaries and remove IO#onCancelRaiseError

Added features:

  • #266: Update implicitNotFound error message in Timer
  • #269: Add Resource.fromAutoCloseable
  • #249: Add Applicative[Fiber[F, ?]] instance given Concurrent[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 with IO from MVar 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 from Deferred 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:

  1. Feedback by joining us on Gitter
  2. Re-tweet the [release announcement]
  3. 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

03 Jun 08:35
v1.0.0-RC2
06cf793
Compare
Choose a tag to compare

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:

  1. Resource (doc) — #188
  2. Ref (doc) and Deferred (doc) — #204, #211, #218 and #220
  3. Semaphore (doc) — #205
  4. MVar (doc) — #217, #222, #223, #224
  5. IOApp(doc) — #213, #252

Major behavioral / breaking changes:

  • #232: Require Timer and shift automatically in concurrent operations
  • #237, #254: Restate Concurrent laws to accept auto-cancelable run-loops
  • #241: Move uncancelable to Bracket, change Bracket laws to make acquire and release uncancelable
  • #195, #215 and #261: Add Effect#runSyncStep, fixing #104
  • #248, #258: Introduce Async.asyncF
  • #221: add toIO operation to Effect

Added Features:

  • #191: Add IO#redeemWith, in combination with the future typelevel/cats/pull/2237
  • #214: Add IO#timeout and Concurrent.timeout
  • #236: Bracket instance for Kleisli
  • #234: bracket should work on top of JavaScript via unsafeRunSync
  • #235: remove NonFatal, switch to the standard one
  • #250: Optimize async trampoline, add ContextSwitch
  • #255, #257: use the standard Throwable#addSuppressed in bracket when both use and release throw
  • #253: Add a la carte syntax package, syntax for Bracket and timeouts

Docs:

  • #201: Docs for parTraverse and parSequence
  • #203: Docs for Resource, Deferred, Ref and Semaphore
  • #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:

  1. Feedback by joining us on Gitter
  2. Re-tweet the release announcement
  3. 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

18 Apr 09:32
v1.0.0-RC
a4468ba
Compare
Choose a tag to compare

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 with IO changes, for exposing bracket and bracketCase, operations meant for safe release of resources
  • #182: IO.runAsync should report errors in its handler (back-ported in 0.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:

  • #177: Removed Sync instance for EitherT[Eval, Throwable, ?]
  • #180: Dropped Scala 2.10 support

Chores:

Cancelable IO (v0.10)

16 Mar 11:48
v0.10
86a3240
Compare
Choose a tag to compare

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 on ExecutionContext
  • #134: adds the new Concurrent and ConcurrentEffect type classes, to complement the existing type classes with cancelation capabilities
  • #137, #142 and #145: adds race and racePair in IO and in the Concurrent 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 in cats-core in order to preserve coherence
  • #146: optimizes our internal AndThen implementation, currently used for making IndexedStateT stack safe for left-associated binds — this will soon be gone from cats-effect though, due to PR #2187 being merged in cats-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

18 Apr 00:11
v0.10.1
4ed75fa
Compare
Choose a tag to compare

Backports the following features:

#161 - update to cats-1.1.0
#167 - fix Effect
#182 - report errors in IO.runAsync handler
#185 - fix IO.runAsync scaladoc

This release is source and binary compatible with cats-effect-0.10.

v0.9

25 Feb 08:07
v0.9
c0614a2
Compare
Choose a tag to compare

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:

v0.8

03 Jan 18:43
v0.8
9e251b0
Compare
Choose a tag to compare

Updated Cats to latest version: 1.0.1