Elixir devs throw compiler tracing and release improvements into 1.10 cauldron

Elixir devs throw compiler tracing and release improvements into 1.10 cauldron

José Valim has released version 1.10 of his general purpose programming language Elixir, which mainly extends the release mechanism introduced in v1.9, and adds tracing to its compiler.

Elixir is a language for the Erlang virtual machine that came up in 2011 and aims to help with building fault-tolerant and distributed applications. Companies using it for their services range from PagerDuty to Discord. 

Compiler tracing was included in v1.10 to offer users a way of listening to events as they are emitted by the compiler. Previously many had defaulted to an internal database for checking for undefined functions and the like, asking for more additions not needed by the core project. Since the database wasn’t meant for public use in the first place, the new functionality provides users with more control over the information they want to store, while also letting them disable some warnings on the site of the call instead of in the overall project configuration.

Along with the addition of two new options to Code.string_to_quoted/2 and better documented metadata in the language’s abstract syntax tree, compiler tracing is also meant to give analysis tools more information leading to better insight for developers.

Another improvement in Elixir 1.10 comes in the form of an Application.compile_env/3 function, which will supposedly solve the issue of users changing values in the application environment once code has been compiled. Since this doesn’t have the desired effect of the programme using the new value at runtime, the new function will compare values used during compilation with the runtime ones, and throw an error where appropriate. 

In terms of releases, a mechanism to package self-contained applications introduced in Elixir 1.9, Valim and his helpers have made dual boot optional and added overlays to facilitate the inclusion of extra files. It now also allows RELEASE_DISTRIBUTION to be fully disabled and comes with a step to automatically package releases.

Elixir carries a test framework called ExUnit, which, starting from v1.10, can be used in concurrent tests, and for diffing data structures against a pattern which should improve usability. 

The new version requires Erlang/OTP 21 or newer to work as intended. Additional information can be found in the release notes.