New
v0.2.0
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,
gearsnow 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,
Asyncwas the only requirement to createFutures. Now, we require a super-capability ofAsync, namedAsync.Spawn. This can be acquired byAsync.group(or directly from the Async contexts ofAsync.blockingandFuture.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.Spawnof 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).
altis generally renamed toawaitFirstin 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 https://github.com/lampepfl/gears/pull/27
- Bring Promise and withResolver together by @m8nmueller in https://github.com/lampepfl/gears/pull/31
- Update scala-native dependencies by @natsukagami in https://github.com/lampepfl/gears/pull/26
- Update scalafmt to 3.7.17 by @He-Pin in https://github.com/lampepfl/gears/pull/35
- Add VTFactory for the group naming. by @He-Pin in https://github.com/lampepfl/gears/pull/32
- Fix dropping of listeners for transformValuesWith by @m8nmueller in https://github.com/lampepfl/gears/pull/36
- Update scala-native, use default GC by @natsukagami in https://github.com/lampepfl/gears/pull/38
- Use interruptGuard in VThreadScheduler by @m8nmueller in https://github.com/lampepfl/gears/pull/37
- chore: Fix execute not start vt issue. by @He-Pin in https://github.com/lampepfl/gears/pull/39
- Remove nested listener locks by @natsukagami in https://github.com/lampepfl/gears/pull/40
- Fix flaky "race successful with wait" test by @natsukagami in https://github.com/lampepfl/gears/pull/42
- Provide a simple Nix Flake development environment by @natsukagami in https://github.com/lampepfl/gears/pull/41
- Avoid
nativename clash by @natsukagami in https://github.com/lampepfl/gears/pull/43 - Push scala-native version to published v0.5.0-RC1 by @natsukagami in https://github.com/lampepfl/gears/pull/47
- Rename
altandaltAlltoorandawaitFirstby @natsukagami in https://github.com/lampepfl/gears/pull/44 - Upload gears API as GitHub Pages site by @natsukagami in https://github.com/lampepfl/gears/pull/50
- Add conversion extensions between
scala.concurrent.Futureand gearsFutureby @natsukagami in https://github.com/lampepfl/gears/pull/49 - Add
Future.resolved / rejected / completedas shortcuts forFuture.nowby @natsukagami in https://github.com/lampepfl/gears/pull/45 - Add a
sleepmethod that takes scala.concurrent.duration, with documentation by @natsukagami in https://github.com/lampepfl/gears/pull/51 - Experiment: Only allow
Async.Spawnto spawn runnable futures by @natsukagami in https://github.com/lampepfl/gears/pull/46 - Introduce
Retryas an alternative to Tasks by @natsukagami in https://github.com/lampepfl/gears/pull/48 - Add/fix lots of documentation by @natsukagami in https://github.com/lampepfl/gears/pull/52
- Revamp documentation resources by @natsukagami in https://github.com/lampepfl/gears/pull/54
New Contributors
- @He-Pin made their first contribution in https://github.com/lampepfl/gears/pull/35
Full Changelog: https://github.com/lampepfl/gears/compare/v0.1.0...v0.2.0