github typelevel/cats-effect v3.7.0

one day ago

This is the fifty-ninth release in the Cats Effect 3.x lineage. It is fully binary compatible with every 3.x release and fully source-compatible with the 3.7.x lineage.

What's Changed

This is a relatively smaller minor release jump relative to 3.6.x since it contains a major and long-anticipated enhancement: support for Scala Native 0.5, including full multithreading on LLVM! This has been a very long time coming, and we've been planning how to provide this support and planting the seeds for several years now. As noted in previous release notes, the integrated runtime released in 3.6.0 provides the basic building blocks for true, practically usable multithreaded asynchronous I/O on LLVM, and this release finally brings all of those pieces to fruition.

Full support has been implemented for epoll and kqueue, and we intend to extend this support to io_uring in the future. These polling systems have been significantly upgraded and enhanced since 3.6.x in order to support the same sort of thread coordination that has been present on the JVM from the beginning.

Of course, the largest piece of this is the WorkStealingThreadPool itself. This was ported from JVM-only to cross-build entirely on both JVM and LLVM targets. Surprisingly, almost no changes were required to make this possible! It is a testament to the thought and effort which went into Scala Native 0.5 that this port was dramatically smoother and less complex than anyone could have reasonably predicted. While we did run into a few minor issues with Scala Native, only one major problem with its multithreading support was encountered, and it only applies in a very niche scenario which was easily worked around.

We really cannot stress enough how impressed we are with Scala Center and Virtus' work on this front. Scala Native 0.5 is quite the triumph, and Cats Effect 3.7 is the proof. Going forward, you should essentially expect rough parity between scheduling functionality on JVM and LLVM, with JavaScript now being the unusual one (due to its single-threaded nature).

As an aside, it's worth noting that this parity holds despite the fact that Scala Native actually implements subtly different memory publication semantics than the JVM in some very specific circumstances. The Cats Effect concurrency state model (i.e. Ref/Deferred) is such that these semantic differences are entirely invisible in userspace, while the performance benefits are present regardless. This is one example of the careful planning and coordination which went into this release spanning across many people and multiple projects.

The one area in which Cats Effect on Scala Native meaningfully lags behind the JVM is fiber tracing. This functionality should exist on LLVM, but it appears that the APIs do not work correctly at runtime. It is expected that these bugs will be resolved in a future Scala Native release, at which point we'll be able to enable the functionality in Cats Effect.

Enhancements

Bug Fixes

Documentation

Behind the Scenes

  • Update scalafmt-core to 3.8.4 in series/3.x by @typelevel-steward[bot] in #4235
  • Update sbt-scalafix to 0.14.0 in series/3.x by @typelevel-steward[bot] in #4237
  • Update sbt-typelevel to 0.7.6 in series/3.x by @typelevel-steward[bot] in #4243
  • Update scalafmt-core to 3.8.5 in series/3.x by @typelevel-steward[bot] in #4242
  • Update scala-library to 2.13.16 in series/3.x by @typelevel-steward[bot] in #4239
  • Update scalafmt-core to 3.8.6 in series/3.x by @typelevel-steward[bot] in #4251
  • Update sbt-scalajs, scalajs-compiler, ... to 1.18.2 in series/3.x by @typelevel-steward[bot] in #4249
  • Update sbt-typelevel to 0.7.7 in series/3.x by @typelevel-steward[bot] in #4252
  • Revert documentation format changes by @mzuehlke in #4246
  • flake.lock: Update by @typelevel-steward[bot] in #4258
  • Update scala3-library, ... to 3.3.5 in series/3.x by @typelevel-steward[bot] in #4261
  • Update sbt-mdoc to 2.6.3 in series/3.x by @typelevel-steward[bot] in #4265
  • Update scalafmt-core to 3.9.1 in series/3.x by @typelevel-steward[bot] in #4278
  • Update sbt-scalafix to 0.14.2 in series/3.x by @typelevel-steward[bot] in #4275
  • Update sbt-mdoc to 2.6.4 in series/3.x by @typelevel-steward[bot] in #4272
  • flake.lock: Update by @typelevel-steward[bot] in #4281
  • Backport v3.6.0-RC2 changes by @djspiewak in #4282
  • Replace specs2 with munit by @iRevive in #4216
  • Update scalafmt-core to 3.9.2 in series/3.x by @typelevel-steward[bot] in #4284
  • Update sbt, scripted-plugin to 1.10.8 in series/3.x by @typelevel-steward[bot] in #4285
  • Update sbt, scripted-plugin to 1.10.9 in series/3.x by @typelevel-steward[bot] in #4286
  • Update sbt, scripted-plugin to 1.10.10 in series/3.x by @typelevel-steward[bot] in #4288
  • Update scalafmt-core to 3.9.3 in series/3.x by @typelevel-steward[bot] in #4294
  • Update scalafmt-core to 3.9.4 in series/3.x by @typelevel-steward[bot] in #4297
  • Update sbt-mdoc to 2.6.5 in series/3.x by @typelevel-steward[bot] in #4304
  • Update sbt, scripted-plugin to 1.10.11 in series/3.x by @typelevel-steward[bot] in #4303
  • Merge changes from 3.6.0 into series/3.x by @djspiewak in #4312
  • fix: Nix development Enviroment & Readme Fix by @qxrein in #4298
  • Replace deprecated commands in build.sbt by @iRevive in #4339
  • Update cats-core, cats-free, ... to 2.13.0 in series/3.x by @typelevel-steward[bot] in #4356
  • Merge changes from 3.6.1 into series/3.x by @armanbilge in #4364
  • Update sbt-scalafix to 0.14.3 in series/3.x by @typelevel-steward[bot] in #4403
  • flake.lock: Update by @typelevel-steward[bot] in #4327
  • Update sbt, scripted-plugin to 1.11.0 in series/3.x by @typelevel-steward[bot] in #4413
  • Update sbt, scripted-plugin to 1.11.1 in series/3.x by @typelevel-steward[bot] in #4416
  • Update sbt-typelevel to 0.8.0 in series/3.x by @typelevel-steward[bot] in #4417
  • Update sbt, scripted-plugin to 1.11.2 in series/3.x by @typelevel-steward[bot] in #4420
  • Update sbt, scripted-plugin to 1.11.3 in series/3.x by @typelevel-steward[bot] in #4427
  • flake.lock: Update by @typelevel-steward[bot] in #4414
  • Merge changes from 3.6.2 into series/3.x by @djspiewak in #4436
  • Update versions for 3.6.3 by @djspiewak in #4452
  • Merge changes from 3.6.3 into series/3.x by @djspiewak in #4453
  • Update sbt-mdoc to 2.7.2 in series/3.x by @typelevel-steward[bot] in #4441
  • Backport more recent changes from series/3.6.x by @djspiewak in #4459
  • flake.lock: Update by @typelevel-steward[bot] in #4461
  • Update sbt, scripted-plugin to 1.11.4 in series/3.x by @typelevel-steward[bot] in #4467
  • Update cats-mtl, cats-mtl-laws to 1.6.0 in series/3.x by @typelevel-steward[bot] in #4472
  • Update sbt, scripted-plugin to 1.11.5 in series/3.x by @typelevel-steward[bot] in #4477
  • flake.lock: Update by @typelevel-steward[bot] in #4480
  • Update sbt, scripted-plugin to 1.11.6 in series/3.x by @typelevel-steward[bot] in #4485
  • Update scalacheck to 1.19.0 in series/3.x by @typelevel-steward[bot] in #4484
  • flake.lock: Update by @typelevel-steward[bot] in #4491
  • flake.lock: Update by @typelevel-steward[bot] in #4521
  • Update sbt, scripted-plugin to 1.11.7 in series/3.x by @typelevel-steward[bot] in #4496
  • scala-native 0.5.9 by @durban in #4510
  • scala 3.3.7 by @durban in #4519
  • Update scalafmt-core to 3.9.10 in series/3.x by @typelevel-steward[bot] in #4536
  • Update sbt-jmh to 0.4.8 in series/3.x by @typelevel-steward[bot] in #4492
  • Update sbt-typelevel to 0.8.4 in series/3.x by @typelevel-steward[bot] in #4533
  • flake.lock: Update by @typelevel-steward[bot] in #4537
  • Update auxlib, clib, javalib, nativelib, ... to 0.5.10 in series/3.x by @typelevel-steward[bot] in #4545
  • Update scalafmt-core to 3.10.4 in series/3.x by @typelevel-steward[bot] in #4544
  • flake.lock: Update by @typelevel-steward[bot] in #4547
  • flake.lock: Update by @typelevel-steward[bot] in #4558
  • Update sbt-typelevel to 0.8.5 in series/3.x by @typelevel-steward[bot] in #4555
  • Update scalafmt-core to 3.10.7 in series/3.x by @typelevel-steward[bot] in #4552
  • Upgrade all the things (take 3?) by @djspiewak in #4563
  • Update scala-library to 2.13.18 in series/3.x by @typelevel-steward[bot] in #4528
  • Update sbt-mdoc to 2.8.2 in series/3.x by @typelevel-steward[bot] in #4535
  • Update sbt-scalajs, scalajs-compiler, ... to 1.20.2 in series/3.x by @typelevel-steward[bot] in #4542
  • Update sbt-scalafix to 0.14.6 in series/3.x by @typelevel-steward[bot] in #4557
  • Update scala-library to 2.12.21 in series/3.x by @typelevel-steward[bot] in #4530
  • Update munit-scalacheck to 1.2.0 in series/3.x by @typelevel-steward[bot] in #4486
  • Update sbt, scripted-plugin to 1.12.5 in series/3.x by @typelevel-steward[bot] in #4559

Uncategorized

New Contributors

Full Changelog: v3.6.3...v3.7.0

Don't miss a new cats-effect release

NewReleases is sending notifications on new releases.