{"id":8985,"date":"2019-04-29T10:31:54","date_gmt":"2019-04-29T13:31:54","guid":{"rendered":"http:\/\/blog.plataformatec.com.br\/?p=8985"},"modified":"2019-05-01T05:23:24","modified_gmt":"2019-05-01T08:23:24","slug":"whats-new-in-elixir-apr-19","status":"publish","type":"post","link":"https:\/\/blog.plataformatec.com.br\/2019\/04\/whats-new-in-elixir-apr-19\/","title":{"rendered":"What’s new in Elixir – Apr\/19"},"content":{"rendered":"
Hi everyone, we are back with another edition of What’s new in Elixir! Let’s get started.<\/p>\n
mix release<\/code> has been added!<\/a> Besides basic releases support, it supports runtime configuration, customization via templates files, custom steps, and more. A huge thank you to both Distillery<\/a> and Relx<\/a> teams for the prior work that made releases in Elixir itself possible. See the docs<\/a> for a complete rundown on the available features. Give it a try!<\/li>\n- Config changes in
mix new<\/code><\/a>: 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.exs<\/code> for projects generated with mix new<\/code>. Relying on configuration is undesired for most libraries<\/a> and the generated config<\/code> files pushed library authors in the wrong direction. Furthermore, mix new --umbrella<\/code> will 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.<\/li>\n- A new
Config<\/code> module has been added to Elixir<\/a>. 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.Config<\/code> has been soft-deprecated in favor of the new import Config<\/code> which is part of Elixir itself.<\/li>\n- Logger is now more efficient to compute when messages have to be discarded<\/a>. Performance has also been generally improved for those running in recent Erlang\/OTP versions<\/a> (21.2+).<\/li>\n
- A
~U<\/code> sigil for UTC date times<\/a> has been added.<\/li>\nSystem.get_env\/2<\/code>, System.fetch_env\/1<\/code>, and System.fetch_env!\/1<\/code> have been added<\/a> for those looking forward to simplify their config files.<\/li>\n<\/ul>\nPlus many other enhancements and bug fixes. If you want to give those features a try, you can always compile Elixir from source<\/a>. If you are using version managers, such as asdf<\/code>, they likely have built-in mechanisms to compile from master too.<\/p>\nAs 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, see the CHANGELOG<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"Hi everyone, we are back with another edition of What’s new in Elixir! Let’s get started. mix release has 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 … \u00bb<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[143,298],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8985"}],"collection":[{"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/comments?post=8985"}],"version-history":[{"count":18,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8985\/revisions"}],"predecessor-version":[{"id":9020,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8985\/revisions\/9020"}],"wp:attachment":[{"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/media?parent=8985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/categories?post=8985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/tags?post=8985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}