20 Mar 2020
We are excited to announce the release of Ballerina 1.2.0 today! If you’re a new user you can download it from the downloads page. If you already have Ballerina installed, you can use the Ballerina Update Tool to update it to the latest version. Instructions on how to do this are also available in the downloads page.
This release takes the first step towards providing developers with a new and improved set of tools aimed at making the experience of writing integration code easier and smoother. There are also several key features that have come out from the preview/experimental status they were in. For concrete examples of the features described here, please refer to the Ballerina 1.2.0 release note.
streamtype has been refined and included in the language specification and redesigned in the compiler implementation. A stream is an object-like value that can generate a sequence of values. It provides two primitive operations: next and close. The lang library associated with the
lang.stream, provides additional operations that can be performed on a stream.
select. A query expression should start with a
fromclause and end with a
selectclause. In between those two clauses you can have zero or more
whereclauses. The part of the query expression from the
fromclause (inclusive) up to the
selectclause (exclusive) is referred to as the “query pipeline”.
doclause. The do clause contains a set of statements. For each of the input frames emitted by the query pipeline, the set of statements in the
doclause are executed with that frame in-scope.
lang.intmodule defines the following subtypes of
lang.xml, has also been revamped to complement this design.
@deprecatedannotation. The use of deprecated constructs in the code results in warnings during compilation.
In addition to the above features, the compiler has been improved to significantly reduce the compilation time. The Standard Library modules also introduce some notable features and improvements:
ballerina/httpmodule now supports HTTP cookies. It introduces new APIs for managing cookies in both the server-side and the client-side.
ballerina/cachemodule introduces a Cache API v2. This new implementation allows the user to provide custom cache eviction policies if required. It also provides a significant improvement in performance over the previous implementation.
ballerina/grpcmodule has redesigned its support for oneof fields and map fields to make better use of Ballerina language features: oneof fields are mapped optional fields in records and map fields are mapped as nested records. It also adds support for client retry for unary blocking calls.
ballerina/kafkamodule introduces v2.0 of the module. This version provides support for custom serializers/deserializers and Avro serializers/deserializers.
There are also a few feature additions and significant improvements introduced to Developer Tooling:
In addition to the above features and improvements, we have also actively worked on addressing the bugs/issues that were reported and language specification deviations in the compiler and the runtime. For a detailed list of features/changes/bug fixes please refer to the Ballerina 1.2.0 release note.
The 1.2.0 release lays the foundation for providing an even richer set of features geared towards simplifying the development of integration scenarios. So try out this release and put it through its paces. We’d love to hear all about the cool projects you do with Ballerina! Moreover, we’d love to hear your thoughts. What did you like? What do you think we could do better? Did you come across any issues? You can let us know either by creating an issue in our Github repo or by reaching out through any of the mediums listed in our community page.
And for the ones who have contributed in numerous ways, may it be through code, documentation, reporting issues or feedback, your contributions are much appreciated and we hope that we will have your continued support. Thank you and happy coding!