Welcome to a new release of Gears!
Highlights
- We now ship artifacts for both Scala JVM and Scala Native! Adding Gears to your project is now as simple as
using dep "ch.epfl.lamp::gears::0.2.0"
! - Alongside the shipped artifacts,
gears
now no longer require a snapshot/locally published version ofscala-native
. We use 0.5.1 directly. - A lot of the internal designs were brought up-to-date with the Gears book, including (but not limited to):
- Previously,
Async
was the only requirement to createFuture
s. Now, we require a super-capability ofAsync
, namedAsync.Spawn
. This can be acquired byAsync.group
(or directly from the Async contexts ofAsync.blocking
andFuture.apply
). Writing functions that spawns Futures are slightly more involving:This guarantees that futures do not escape the function scope, and hence don't become "dangling" once the function returns. See #46 and the section ondef createFuture(using Async) = Async.group: val fut = Future(...)
Async.Spawn
of the book for more details. - Listener locks no longer need to be nested. This should simplify the requirements for implementing custom Listeners, as well as improve the performance of races (especially nested races).
alt
is generally renamed toawaitFirst
in cases, to be consistent withawaitAll
.
- Previously,
- We now host a
scaladoc
-generated API reference. This is currently trackingmain
, but will soon be updated to track the latest stable version as well. - We are now officially on the Apache 2 license!
Other changes
- replace git url with http for submodules by @m8nmueller in #27
- Bring Promise and withResolver together by @m8nmueller in #31
- Update scala-native dependencies by @natsukagami in #26
- Update scalafmt to 3.7.17 by @He-Pin in #35
- Add VTFactory for the group naming. by @He-Pin in #32
- Fix dropping of listeners for transformValuesWith by @m8nmueller in #36
- Update scala-native, use default GC by @natsukagami in #38
- Use interruptGuard in VThreadScheduler by @m8nmueller in #37
- chore: Fix execute not start vt issue. by @He-Pin in #39
- Remove nested listener locks by @natsukagami in #40
- Fix flaky "race successful with wait" test by @natsukagami in #42
- Provide a simple Nix Flake development environment by @natsukagami in #41
- Avoid
native
name clash by @natsukagami in #43 - Push scala-native version to published v0.5.0-RC1 by @natsukagami in #47
- Rename
alt
andaltAll
toor
andawaitFirst
by @natsukagami in #44 - Upload gears API as GitHub Pages site by @natsukagami in #50
- Add conversion extensions between
scala.concurrent.Future
and gearsFuture
by @natsukagami in #49 - Add
Future.resolved / rejected / completed
as shortcuts forFuture.now
by @natsukagami in #45 - Add a
sleep
method that takes scala.concurrent.duration, with documentation by @natsukagami in #51 - Experiment: Only allow
Async.Spawn
to spawn runnable futures by @natsukagami in #46 - Introduce
Retry
as an alternative to Tasks by @natsukagami in #48 - Add/fix lots of documentation by @natsukagami in #52
- Revamp documentation resources by @natsukagami in #54
- chore: Bump Scala to 3.3.3 by @He-Pin in #55
- chore: Use scalafmt to group imports by @He-Pin in #63
- Update scala-native to 0.5.1 by @natsukagami in #66
- Add Apache 2.0 LICENSE by @natsukagami in #53
- Fix bad references in documentation by @natsukagami in #70
- Set up
sbt-ci-release
by @natsukagami in #72 - chore: bump sbt to 1.10.0 by @He-Pin in #74
- Make
jvmInterruptible
public by @natsukagami in #73
New Contributors
Full Changelog: v0.1.0...v0.2.0