47 Degrees joins forces with Xebia read more

Arrow 1.1.4 & 1.1.5 is now available

Arrow 1.1.4 & 1.1.5 is now available

We are excited to announce the release of Arrow 1.1.4 and 1.1.5, a powerful set of tools for writing functional programming patterns in an idiomatic way in Kotlin. This release introduces two new concurrent data types, streamlines some of the core features towards 2.x.x, and includes a number of bug fixes and performance improvements. We encourage all Kotlin users to upgrade to the latest version of Arrow to take advantage of these improvements. Thank you to the community for your continued support and contributions. Below, we summarize the most important changes. For the full changelog, check out our Github page.

Why two versions?

Arrow 1.1.4 is released with Kotlin 1.7.22, and Arrow 1.1.5 is released with Kotlin 1.8.0. If you’re using the Arrow Optics KSP plugin with Kotlin 1.7.22, you should prefer 1.1.4 with Google KSP version 1.7.22-1.0.8.

If you’re already on Kotlin 1.8.0, or not using KSP, then you should prefer Arrow 1.1.5.

Arrow Core

After discussions with the Arrow community and users, we have decided to deprecate a number of methods in the Either API. This decision was made in order to make using Either more Kotlin idiomatic and align with our goals for the 2.0.0 release.

In previous versions of Arrow, the API for working with Either included a number of methods that were not idiomatic to Kotlin and did not align with the conventions used by the Kotlin Standard Library. As a result, these methods were often confusing to users and made the API more difficult to use.

This change will not reduce the overall size of the API in this release, but will lay the groundwork for further reductions in 2.0.0. We believe that this change will make it easier for users to work with Either and will improve the overall user experience. You can find the documentation and discussion in the Either Deprecation PR on the Arrow project.

These deprecations are all marked with the ReplaceWith mechanism of the Kotlin IDEA plugin to provide an easy way to migrate to the new APIs. If you encounter anything that hinders you from migrating, or have any other feedback, please open an issue on the official Arrow repository.

Arrow Fx

This release of Arrow Fx Coroutines includes the backport of the Resource DSL, which was planned in preparation for 2.0.0, as well as two concurrency primitives: CountDownLatch and CyclicBarrier.

The Resource DSL offers a more idiomatic way of reasoning about resource safety in Kotlin. Simon Vergauwen gave a talk about this at the Advanced Kotlin Dev Day, and code leveraging the new Resource DSL is available in our example Ktor functional microservice.

CountDownLatch is a synchronization tool that allows one or more coroutines to suspend until a set of operations has been completed. This can be useful for coordinating the actions of multiple coroutines, ensuring that they are executed in the correct order.

CyclicBarrier is similar to CountDownLatch, but it allows coroutines to wait for each other to reach a certain point in their execution before resuming. This can be useful for coordinating the actions of multiple coroutines that need to perform a complex operation together.

With the addition of these two primitives, Arrow Fx Coroutines provides even more powerful tools for working with concurrent code. We encourage all users to upgrade to the latest version and take advantage of these new features.

What is next?

In the coming weeks and months, Arrow will be preparing itself further for its 2.0.0 release. When Kotlin 1.8.0 is released, we’ll make a final 1.1.x release with it.

After that, the 1.2.x series is planned, introducing more backports and deprecations to provide a graceful migration towards 2.x.x. Migration scripts will be provided on a best-effort basis, which should be able to handle 99% of the work to migrate to these new backports in combination with the official ReplaceWith mechanism of the Kotlin IDEA plugin.

Xebia Functional (formerly 47 Degrees) 💙 Kotlin

We the functional team at Xebia are great fans of Kotlin, exploring the many possibilities it brings to the back-end scene. We’re proud maintainers of Arrow, a set of companion libraries to Kotlin’s standard library, coroutines, and compiler; and provide Kotlin training to become an expert Kotliner. If you’re interested in talking to us, you can use our contact form, or join us on the Kotlin Slack.

Ensure the success of your project

47 Degrees can work with you to help manage the risks of technology evolution, develop a team of top-tier engaged developers, improve productivity, lower maintenance cost, increase hardware utilization, and improve product quality; all while using the best technologies.