What's new in Elixir v1.9 (dev)
Hi everyone, we are back with another edition of What’s new in Elixir! Let’s get started.
mix releasehas been added! Besides basic releases support, it supports runtime configuration, customization via templates files, custom steps, and more. A huge thank you to both Distillery and Relx teams for the prior work that made releases in Elixir itself possible. See the docs for a complete rundown on the available features. Give it a try!
Config changes in
mix new: Configuration has been a recurring topic in the Elixir community and Elixir v1.9.0 aims to further guide the community towards best practices. The first change is that we will no longer generate
config/config.exsfor projects generated with
mix new. Relying on configuration is undesired for most libraries and the generated
configfiles pushed library authors in the wrong direction. Furthermore,
mix new --umbrellawill no longer generate a configuration for each child app, instead all configuration should be declared in the umbrella root. That's how it has always behaved, we are now making it explicit.
Configmodule has been added to Elixir. Since releases may have their own configuration and since we do not want releases to depend on Mix (which is a build tool),
use Mix.Confighas been soft-deprecated in favor of the new
import Configwhich is part of Elixir itself.
~Usigil for UTC date times has been added.
System.fetch_env!/1have been added for those looking forward to simplify their config files.
Plus many other enhancements and bug fixes. If you want to give those features a try, you can always <a href=”https://elixir-lang.org/install.html#compiling-from-source-unix-and-mingw” target=”_blank” rel=”noopener noreferrer”>compile Elixir from source</a>. If you are using version managers, such as <code>asdf</code>, they likely have built-in mechanisms to compile from master too.
As usual, in the last weeks we have done extensive work on the issues tracker, bringing the number of open issues to below 10 and the number of pending PRs to below 5 (at the time of writing). We are always proud of how much work and care goes into the issues tracker, thanks everyone who contributed! For a complete listing of all changes, <a href=”https://github.com/elixir-lang/elixir/blob/v1.9/CHANGELOG.md” target=”_blank” rel=”noopener noreferrer”>see the CHANGELOG</a>.
P.S.: This post was originally published on Plataformatec’s blog.