Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@natsukagami natsukagami released this 15 May 17:40
· 24 commits to main since this release
a4a6b72

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 of scala-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 create Futures. Now, we require a super-capability of Async, named Async.Spawn. This can be acquired by Async.group (or directly from the Async contexts of Async.blocking and Future.apply). Writing functions that spawns Futures are slightly more involving:
      def createFuture(using Async) = 
        Async.group:
          val fut = Future(...)
      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 on 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 to awaitFirst in cases, to be consistent with awaitAll.
  • We now host a scaladoc-generated API reference. This is currently tracking main, but will soon be updated to track the latest stable version as well.
  • We are now officially on the Apache 2 license!

Other changes

New Contributors

Full Changelog: v0.1.0...v0.2.0