Elixir release

1.9.0

Change breakdown

Organization at a glance

Detailed changelog

Enhancement

42 changes

Tool: EEx Module: EEx

Allow more complex mixed expressions when tokenizing

Tool: Elixir Module: Access

Allow Access.at/1 to handle negative index

Tool: Elixir Module: CLI

Add support for --boot, --boot-var, --erl-config, --pipe-to, --rpc-eval, and --vm-args options

Tool: Elixir Module: Code

Add static_atom_encoder option to Code.string_to_quoted/2

Tool: Elixir Module: Code

Support :force_do_end_blocks on Code.format_string!/2 and Code.format_file!/2

Tool: Elixir Module: Code

Do not raise on deadlocks on Code.ensure_compiled/1

Tool: Elixir Module: Config

Add Config, Config.Reader, and Config.Provider modules for working with configuration

Tool: Elixir Module: File

Add File.rename!/2

Tool: Elixir Module: Inspect

Add :inspect_fun and :custom_options to Inspect.Opts

Tool: Elixir Module: Kernel

Add ~U sigil for UTC date times

Tool: Elixir Module: Kernel

Optimize &super/arity and &super(&1)

Tool: Elixir Module: Kernel

Optimize generated code for with with a catch-all clause

Tool: Elixir Module: Kernel

Validate __struct__ key in map returned by __struct__/0,1

Tool: Elixir Module: Module

Add Module.get_attribute/3

Tool: Elixir Module: Protocol

Improve Protocol.UndefinedError messages to also include the type that was attempted to dispatch on

Tool: Elixir Module: Protocol

Optimize performance of dynamic dispatching for non-consolidated protocols

Tool: Elixir Module: Record

Include field names in generated type for records

Tool: Elixir Module: Regex

Automatically recompile regexes

Tool: Elixir Module: Registry

Add Registry.select/2

Tool: Elixir Module: System

Add System.restart/0, System.pid/0 and System.no_halt/1

Tool: Elixir Module: System

Add System.get_env/2, System.fetch_env/1, and System.fetch_env!/1

Tool: Elixir Module: System

Support SOURCE_DATE_EPOCH for reproducible builds

Tool: ExUnit Module: ExUnit

Allow multiple :exclude on configuration/CLI

Tool: ExUnit Module: ExUnit.DocTest

No longer wrap doctest errors in custom exceptions. They ended-up hiding more information than showing

Tool: ExUnit Module: ExUnit.DocTest

Display the actual doctest code when doctest fails

Tool: IEx Module: IEx.CLI

Copy ticktime from remote node on IEx --remsh

Tool: IEx Module: IEx.CLI

Automatically add a host on node given to --remsh

Tool: Logger Module: Logger

Use a decentralized mode computation for Logger which allows overloads to be detected more quickly

Tool: Logger Module: Logger

Use persistent_term to store configuration whenever available for performance

Tool: Mix Module: Mix

Follow XDG base dir specification in Mix for temporary and configuration files

Tool: Mix Module: Mix.Generator

Add copy_file/3, copy_template/4, and overwite?/2

Tool: Mix Module: Mix.Project

Add preferred_cli_target that works like preferred_cli_env

Tool: Mix Module: mix archive.uninstall

Allow mix archive.uninstall APP to uninstall any installed version of APP

Tool: Mix Module: mix new

No longer generate a config/ directory for mix new

Tool: Mix Module: mix release

Add support for releases

Tool: Mix Module: mix release.init

Add templates for release configuration

Tool: Mix Module: mix test

Allow running tests for a given umbrella app from the umbrella root with mix test apps/APP/test. Test failures also include the apps/APP prefix in the test location

Tool: Mix Module: Mix.Config

Mix.Config has been deprecated in favor of the Config module that now ships as part of Elixir itself. Reading configuration files should now be done by the Config.Reader module

Tool: Elixir Module: CLI

Deprecate --detached option, use --erl "-detached" instead

Tool: Elixir Module: Map

Deprecate Enumerable keys in Map.drop/2, Map.split/2, and Map.take/2

Tool: Elixir Module: String

The :insert_replaced option in String.replace/4 has been deprecated. Instead you may pass a function as a replacement or use :binary.replace/4 if you need to support earlier Elixir versions

Tool: Mix Module: Mix.Project

Deprecate Mix.Project.load_paths/1 in favor of Mix.Project.compile_path/1

Bugfix

25 changes

Tool: EEx Module: EEx

Consistently trim newlines when you have a single EEx expression per line on multiple lines

Tool: Elixir Module: Code

Quote :: in Code.format_string!/1 to avoid ambiguity

Tool: Elixir Module: Code

Do not crash formatter on false positive sigils

Tool: Elixir Module: Enum

Ensure the first equal entry is returned by Enum.min/2 and Enum.max/2

Tool: Elixir Module: Kernel

Improve error message when string interpolation is used in a guard

Tool: Elixir Module: Kernel

Properly merge and handle docs for callbacks with multiple clauses

Tool: Elixir Module: Kernel

Guarantee reproducible builds on modules with dozens of specs

Tool: Elixir Module: Kernel

Resolve __MODULE__ accordingly in nested defmodule to avoid double nesting

Tool: Elixir Module: Kernel

Type variables starting with an underscore (_foo) should not raise compile error

Tool: Elixir Module: Kernel

Keep order of elements when macro in/2 is expanded with a literal list on the right-hand side

Tool: Elixir Module: Kernel

Print proper location on undefined function error from dynamically generated functions

Tool: Elixir Module: System

Make sure :init.get_status/0 is set to {:started, :started} once the system starts

Tool: Elixir Module: Path

Do not expand ~ in Path.expand/2 when not followed by a path separator

Tool: Elixir Module: Protocol

Ensure debug_info is kept in protocols

Tool: Elixir Module: Regex

Ensure inspect returns valid ~r// expressions when they are manually compiled with backslashes

Tool: Elixir Module: Registry

Fix ETS leak in Registry.register/2 for already registered calls in unique registries while the process is still alive

Tool: ExUnit Module: ExUnit

Raise error if attempting to run single line tests on multiple files

Tool: ExUnit Module: ExUnit

Return proper error on duplicate child IDs on start_supervised

Tool: IEx Module: IEx

Automatically shut down IEx if we receive EOF

Tool: Logger Module: Logger

Don't discard Logger messages from other nodes as to leave a trail on both systems

Tool: Mix Module: mix compile

Ensure Erlang-based Mix compilers (erlang, leex, yecc) set valid position on diagnostics

Tool: Mix Module: mix compile

Ensure compilation halts in an umbrella project if one of the siblings fail to compile

Tool: Mix Module: mix deps

Raise an error if the umbrella app's dir name and mix.exs app name don't match

Tool: Mix Module: mix deps.compile

Fix subcommand splitting bug in rebar3

Tool: Mix Module: mix test

Do not consider modules that are no longer cover compiled when computing coverage report, which could lead to flawed reports