Elixir release

1.11.0

Change breakdown

Organization at a glance

Detailed changelog

Enhancement

71 changes

Tool: EEx Module: EEx

Track column information in EEx templates when enabled in the compiler

Tool: EEx Module: EEx

Show column information in EEx error messages

Tool: EEx Module: EEx

Support :indentation option when compiling EEx templates for proper column tracking

Tool: Elixir Module: Access

Add Access.at!/1

Tool: Elixir Module: Calendar

Add Calendar.strftime/3 for datetime formatting

Tool: Elixir Module: Calendar

Add linear integer representations to Calendar modules: Date.from_gregorian_days/2, Date.to_gregorian_days/1, NaiveDateTime.from_gregorian_seconds/3, NaiveDateTime.to_gregorian_seconds/1, Time.from_seconds_after_midnight/1, and Time.to_seconds_after_midnight/1

Tool: Elixir Module: Calendar

Add new! to Date/Time/NaiveDateTime/DateTime (new has also been added to DateTime for completeness)

Tool: Elixir Module: Calendar

Support custom starting day of the week in Date.day_of_week/2

Tool: Elixir Module: Calendar

Add Date.beginning_of_month/1 and Date.end_of_month/1

Tool: Elixir Module: Calendar

Add Date.beginning_of_week/2 and Date.end_of_week/2

Tool: Elixir Module: Code

Add :column to Code.string_to_quoted*/2

Tool: Elixir Module: Code

Add Code.can_await_module_compilation?/0 to check if the parallel compiler is enabled and it can await for other modules to be compiled

Tool: Elixir Module: Config

Support config_env/0 and config_target/0 in config files

Tool: Elixir Module: Config

Allow import_config to be disabled for some configuration files

Tool: Elixir Module: Enum

Allow a sorting function on Enum.min_max_by/3,4, including the new compare/2 conventions

Tool: Elixir Module: Kernel

Add is_struct/2 guard

Tool: Elixir Module: Kernel

Add is_exception/1 and is_exception/2 guards

Tool: Elixir Module: Kernel

Support map.field syntax in guards

Tool: Elixir Module: Kernel

Add +++ and --- with right associativity to the list of custom operators

Tool: Elixir Module: Kernel

Warn if a variable that looks like a compiler variable (such as __MODULE__) is unused

Tool: Elixir Module: Kernel.ParallelCompiler

Report individual file compilation times when profile: :time is given

Tool: Elixir Module: Kernel.ParallelCompiler

Improve precision of :long_compilation_threshold so it takes only compilation times into account (and not waiting times)

Tool: Elixir Module: Registry

Add Registry.delete_meta/2

Tool: Elixir Module: Task

Add Task.await_many/2

Tool: ExUnit Module: ExUnit

Add support for coloring on Windows 10 consoles/shells

Tool: ExUnit Module: ExUnit

Add ExUnit.fetch_test_supervisor/0

Tool: ExUnit Module: ExUnit

Add @tag :tmp_dir support to ExUnit. The temporary directory is automatically created and pruned before each test

Tool: ExUnit Module: ExUnit

Add file and line to ExUnit's --trace

Tool: ExUnit Module: ExUnit.Assertion

Allow receive timeouts to be computed at runtime

Tool: ExUnit Module: ExUnit.Case

Add register_test/6 to speed up compilation of custom tests

Tool: ExUnit Module: ExUnit.Doctest

Allow users to add tags to doctests

Tool: IEx Module: IEx

Add support for coloring on Windows 10 consoles/shells

Tool: IEx Module: IEx.Helpers

Show docs from Erlang modules that have been compiled with the docs chunk

Tool: Logger Module: Logger

Add notice, critical, alert, and emergency log levels

Tool: Logger Module: Logger

Support structured logging by logging maps or keyword lists

Tool: Logger Module: Logger

Allow level to be set per module with Logger.put_module_level/2

Tool: Logger Module: Logger

Include erl_level in Logger's metadata

Tool: Mix Module: mix

Add MIX_BUILD_ROOT to config _build dir

Tool: Mix Module: mix

Introduce MIX_XDG as a simpler mechanism to opt-in to the XDG specification

Tool: Mix Module: mix

Allow requirements for a Mix task to be listed via the @requirements module attribute

Tool: Mix Module: mix

Allow optional dependencies to be defined in :extra_applications and :applications

Tool: Mix Module: mix app.config

Add new mix app.config task that compiles applications and loads runtime configuration

Tool: Mix Module: mix archive.install

Support --repo option on Hex packages

Tool: Mix Module: mix compile

Support the __mix_recompile__?/0 callback for custom behaviour on when Mix should recompile a given module

Tool: Mix Module: mix compile.elixir

Mark modules for path dependencies as "Export dependencies" if they changed but their public interface is the same

Tool: Mix Module: mix compile.elixir

Track application boundaries in the Elixir compiler. If you invoke code from Erlang or Elixir standard libraries and you don't depend on the proper applications, a warning will be emitted. A warning will also be emitted if you invoke code from an umbrella sibling that you don't depend on - effectively forbidding cyclic dependencies between apps

Tool: Mix Module: mix deps

Sort the dependencies alphabetically before printing

Tool: Mix Module: mix deps

Use origin/HEAD as the default Git ref in dependencies

Tool: Mix Module: mix deps

Redact Git username/password in output log

Tool: Mix Module: mix deps

Support rebar3's git_subdir resource type

Tool: Mix Module: mix deps.compile

Allow local deps to be skipped on mix deps.compile

Tool: Mix Module: mix deps.unlock

Print which dependencies get unlocked when using the --unused flag

Tool: Mix Module: mix escript.install

Support --repo option on Hex packages

Tool: Mix Module: mix new

Add @impl to application generated by mix new --sup

Tool: Mix Module: mix release

Enable overriding sys.config location via RELEASE_SYS_CONFIG env var

Tool: Mix Module: mix release

Boot a release under configuration in interactive mode and then swap to embedded mode (if running on Erlang/OTP 23+)

Tool: Mix Module: mix release

Add rel_templates_path to configure the source of template files such as "env.sh.eex", "vm.args.eex" and "overlays"

Tool: Mix Module: mix release

Allow some chunks to be kept in the :strip_beams config

Tool: Mix Module: mix test

Allow :ignore_modules inside :test_coverage option

Tool: Mix Module: mix test.coverage

Add mix test.coverage that aggregates coverage results from umbrellas and OS partitioning

Tool: Mix Module: mix xref

Make the --label option for mix xref graph transitive by default and add --only-direct for only direct dependencies

Tool: Mix Module: mix xref

Add --format cycles support for mix xref graph

Tool: Mix Module: mix xref

Add support to mix xref graph for using --source and --sink at the same time

Tool: Elixir Module: Exception

Exception.exception?/1 is deprecated in favor of Kernel.is_exception/1

Tool: Elixir Module: Regex

Regex.regex?/1 is deprecated in favor of Kernel.is_struct/2

Tool: Elixir Module: Logger

warn log level is deprecated in favor of warning

Tool: Elixir Module: mix release

config/releases.exs is deprecated in favor of a more general purpose config/runtime.exs

Tool: Elixir Module: Supervisor

Deprecate Supervisor.start_child/2 and Supervisor.terminate_child/2 in favor of DynamicSupervisor

Tool: Elixir Module: Supervisor.Spec

Deprecate Supervisor.Spec.worker/3 and Supervisor.Spec.supervisor/3 in favor of the new typespecs

Tool: Elixir Module: System

Deprecate System.stacktrace/0 in favor of __STACKTRACE__

Tool: Mix Module: Mix.Project

Deprecate Mix.Project.compile/2 in favor of Mix.Task.run("compile", args)

Bugfix

30 changes

Tool: EEx Module: EEx

Make trimming behaviour via the :trim option more consistent

Tool: Elixir Module: Application

Warn if non-atom keys are given to put_env, get_env, fetch_env, and delete_env

Tool: Elixir Module: Code

Do not send language keyword through the :static_atoms_encoder in Code.string_to_quoted

Tool: Elixir Module: Kernel

Validate values given to :line in quote to avoid emitting invalid ASTs

Tool: Elixir Module: Kernel

Report the correct line number when raising inside a macro

Tool: Elixir Module: Kernel

Fix an issue where elixirc would not accept paths with backslash (\) separators on Windows

Tool: Elixir Module: Kernel

Properly parse &//2 (i.e. the capture of the division operator)

Tool: Elixir Module: Kernel

Raise CompileError when trying to define reserved types

Tool: Elixir Module: Kernel

Improve compiler error message when using | in a def signature

Tool: Elixir Module: Kernel

Improve error message when trying to use invalid list operators in guards

Tool: Elixir Module: Kernel.SpecialForms

Add |/2 to the list of special forms to avoid inconsistent behaviour on overrides

Tool: Elixir Module: Keyword

Enforce keys to be atoms in Keyword.keys/1

Tool: Elixir Module: Record

Keep lexical ordering when creating records

Tool: Elixir Module: Registry

Do not crash when a process with key-value has been registered using :via and it fails to start on init

Tool: Elixir Module: URI

URI.decode_query/2 emits an empty string for parameters without values, according to URL's living standard - note this behaviour is not specified in the spec implemented by the URI module, so the living standard was chosen

Tool: Elixir Module: Version

Add defaults and enforce keys in Version struct

Tool: ExUnit Module: ExUnit.CaptureIO

Fix race condition where a dead capture would still be considered as active

Tool: ExUnit Module: ExUnit.Diff

Do not crash when failing to eval/inspect struct

Tool: ExUnit Module: ExUnit.Diff

Properly diff numbers in respect to == and === operators

Tool: IEx Module: IEx

Fix tokenizer emitting repeated warnings in the REPL

Tool: IEx Module: IEx

Ensure --dot-iex is preserved when restarting the evaluator and after shell respawn

Tool: IEx Module: IEx.Pry

Ensure IEx.pry can be triggered more than twice when invoked from the same process

Tool: Mix Module: mix cmd

Fix a bug where only the first --app option would be executed

Tool: Mix Module: mix compile

Fix an issue where new protocol implementations would not propagate when running mix compile from an umbrella root

Tool: Mix Module: mix deps.compile

Use gmake instead of make when compiling deps on NetBSD/DragonFlyBSD

Tool: Mix Module: mix release

Load .app from dependencies path when it is a project dependency

Tool: Mix Module: mix release

Always include "rel/overlays" in the list of overlays directories if available

Tool: Mix Module: mix release

Change erts/bin/erl binary mode to 0o755

Tool: Mix Module: mix test

Compare to test coverage threshold inclusively

Tool: Logger Module: Logger

Print metadata for all types that implement String.Chars