Elixir release

1.2.0

Change breakdown

Organization at a glance

Detailed changelog

Enhancement

52 changes

Tool: Elixir Module: Application

Add spec/1 and spec/2 to retrieve application specification

Tool: Elixir Module: Application

Add get_application/1 to retrieve the application a given module belongs to

Tool: Elixir Module: Base

Optimize encode and decode operations about 10 times

Tool: Elixir Module: Enum

Use the faster and auto-seeding :rand instead of :random in Enum.shuffle/1 and Enum.random/1 and Enum.take_random/2

Tool: Elixir Module: Enum

Add Enum.with_index/2

Tool: Elixir Module: GenServer

Add GenServer.stop/1 for shutting down servers reliably

Tool: Elixir Module: IO

Add color related functions to IO.ANSI

Tool: Elixir Module: Kernel

Support multiple aliases in alias, import, require and use. For example, alias MyApp.{Foo, Bar, Baz}

Tool: Elixir Module: Kernel

Add struct!/2. Similar to struct/2 but raises on invalid keys

Tool: Elixir Module: Kernel

Warn if @doc/@typedoc/@moduledoc attributes are redefined

Tool: Elixir Module: Kernel

Warn if non-variables are used in defdelegate/2 (as they have no effect)

Tool: Elixir Module: Kernel

Mark quoted expressions as generated, avoiding false positives on dialyzer

Tool: Elixir Module: Kernel

Allow variables as map keys on creation %{key => value} and on matches %{^key => value}

Tool: Elixir Module: Kernel

Allow the pin operator ^ in fn clauses and on the left side of <- in for comprehensions

Tool: Elixir Module: Kernel

Introduce with as a special form that allows matching on right side parameters

Tool: Elixir Module: Kernel

Warn when right hand side of -> does not provide any expression

Tool: Elixir Module: Kernel

Warn if the Elixir was compiled with a different endianness than the one currently available at runtime

Tool: Elixir Module: Kernel

Warn if a variable is used after being defined exclusively in a nested context

Tool: Elixir Module: Kernel

Warn if piping into an expression without parentheses

Tool: Elixir Module: Macro

Add Macro.traverse/4 that performs pre and post-walk at once

Tool: Elixir Module: Macro

Add Macro.camelize/1 and Macro.underscore/1

Tool: Elixir Module: Process

Add Process.get_keys/0

Tool: Elixir Module: Stream

Add Stream.with_index/2

Tool: Elixir Module: String

Introduce String.replace_{prefix,suffix,leading,trailing}/2. The first two will replace only the first occurrence of the given match in string. The last two will replace all occurrences of the given match

Tool: Elixir Module: String

Support String.normalize/2 and String.equivalent?/2 that perform NFD and NFC normalization

Tool: Elixir Module: System

Add System.time_offset, System.monotonic_time, System.system_time, System.convert_time_unit and System.unique_integer

Tool: Elixir Module: System

Allow System.cmd/3 to remove variables by specifying nil values

Tool: Elixir Module: Task

Add Task.Supervisor.async_nolink/1/3 that spawns a supervised task without linking to the caller process

Tool: Elixir Module: Task

Introduce Task.yield_many/2

Tool: Elixir Module: Task

Raise an error when a task is queried from a non-owning process (instead of waiting forever)

Tool: ExUnit Module: ExUnit

Allow one test to raise multiple errors. The goal is to enable tools in the ecosystem to emit multiple failure reports from the same test

Tool: ExUnit Module: ExUnit

Support @tag report: [:foo, :bar] which will include the values for tags :foo and :bar whenever a test fails

Tool: IEx Module: IEx

Allow IEX_WITH_WERL to be set on Windows to always run on WERL mode

Tool: IEx Module: IEx

Display type docs for t(Module.type) and t(Module.type/arity)

Tool: IEx Module: IEx

Add i/1 helper that prints information about any data type

Tool: IEx Module: IEx

Show source code snippet whenever there is a request to pry a given process

Tool: Logger Module: Logger

Add file to logger metadata

Tool: Mix Module: Mix

Cache and always consolidate protocols

Tool: Mix Module: Mix

Add warn_test_pattern to mix test that will warn on potentially misconfigured test files

Tool: Mix Module: Mix

Introduce MIX_QUIET environment variable that configures the underlying Mix task to output only error messages

Tool: Mix Module: Mix

Introduce MIX_DEBUG environment variable that prints information about the task being run

Tool: Mix Module: Mix

Validate git options and warn on conflicting ref, branch or tags

Tool: Mix Module: Mix

New umbrella applications will now share configuration and build files

Tool: Mix Module: Mix

Add experimental support for Rebar 3

Tool: Mix Module: Mix

Do not warn when an optional dependency has a conflicting :only option with another dependency

Tool: Mix Module: Mix

Raise readable error message when parsertools is not available

Tool: Mix Module: Mix

Add --build flag to mix deps.clean DEP to only remove artifacts from _build

Tool: Kernel Module: Dict

Dict and HashDict are soft deprecated in favor of Map

Tool: Kernel Module: Keyword

Keyword.size/1 is deprecated in favor of length/1

Tool: Kernel Module: Map

Map.size/1 is deprecated in favor of map_size/1

Tool: Kernel Module: Set

Set and HashSet are soft deprecated in favor of MapSet

Tool: Mix Module: Mix

Mix.Utils.camelize/1 and Mix.Utils.underscore/1 are soft deprecated in favor of Macro.camelize/1 and Macro.underscore/1

Bugfix

18 changes

Tool: Kernel Module: Access

Improve error messages when using Access on non-valid key-value structures

Tool: Kernel Module: Kernel

Raise when conflicting :only and :except are given to import

Tool: Kernel Module: Kernel

Change __ENV__.file if @file is set for the given function

Tool: Kernel Module: Kernel

Make Kernel.ParallelRequire aware of :warning_as_errors

Tool: Kernel Module: Kernel

Improve error message for invalid do/do:

Tool: Kernel Module: Macro

Ensure Macro.to_string/2 respects operator precedence when using the access operator

Tool: Kernel Module: Path

Do not crash when expanding paths that go beyond the root, for example, Path.expand("/../..")

Tool: Kernel Module: String

Ensure UnicodeConversionError does not contain invalid string in its error message

Tool: IEx Module: IEx

Do not start apps on recompile helper if --no-start was given

Tool: IEx Module: IEx

Avoid copying of data when evaluating every expression in IEx

Tool: Mix Module: Mix

Always run non-recursive tasks at the umbrella root

Tool: Mix Module: Mix

Ensure rebar projects work on directory names that contain non-latin characters

Tool: Mix Module: Mix

Ignore directories inside apps in umbrellas that do not have a mix.exs file

Tool: Mix Module: Mix

Ensure Mix can be used with path dependencies where the app name is different than the path basename

Tool: Mix Module: Mix

Ensure dependencies won't crash when updating from a git repository to a hex repository and the git version did not respect SemVer

Tool: Mix Module: Mix

Do not run remote converger if dependencies have diverged

Tool: Mix Module: Mix

Ensure umbrella dependencies across all environments are loaded on parent deps.get/deps.update

Tool: ExUnit Module: ExUnit

Include file and line in all compilation errors for doctests