Elixir release

1.8.0

Change breakdown

Organization at a glance

Detailed changelog

Enhancement

47 changes

Tool: EEx Module: EEx

Optimize the default template engine to compile and execute more efficiently

Tool: Elixir Module: Calendar

Add Calendar.TimeZoneDatabase and a Calendar.UTCOnlyTimeZoneDatabase implementation

Tool: Elixir Module: Calendar

Add callbacks day_of_year/3, quarter_of_year/3, year_of_era/1, and day_of_era/3

Tool: Elixir Module: Code.Formatter

Preserve user's choice of new line after most operators

Tool: Elixir Module: Date

Add Date.day_of_year/1, Date.quarter_of_year/1, Date.year_of_era/1, and Date.day_of_era/1

Tool: Elixir Module: DateTime

Add DateTime.from_naive/3, DateTime.now/1, and DateTime.shift_zone/3

Tool: Elixir Module: File

Allow :raw option in File.exists?/2, File.regular?/2, and File.dir?/2

Tool: Elixir Module: File

Allow POSIX time as an integer in File.touch/2 and File.touch!/2

Tool: Elixir Module: Inspect

Allow Inspect protocol to be derivable with the :only/:except options

Tool: Elixir Module: Kernel

Do not propagate counters to variables in quote inside another quote

Tool: Elixir Module: Kernel

Warn on ambiguous use of :: and | in typespecs

Tool: Elixir Module: Kernel

Add :delegate_to @doc metadata tag when using defdelegate

Tool: Elixir Module: Kernel

Improve compile-time building of ranges via the .. operator

Tool: Elixir Module: Kernel

Compile charlist interpolation more efficiently

Tool: Elixir Module: Kernel

Add floor/1 and ceil/1 guards

Tool: Elixir Module: Kernel.SpecialForms

Add :reduce option to for comprehensions

Tool: Elixir Module: List

Add List.myers_difference/3 and List.improper?/1

Tool: Elixir Module: Macro

Add Macro.struct!/2 for proper struct resolution during compile time

Tool: Elixir Module: Map

Optimize and merge nested maps put and merge operations

Tool: Elixir Module: Range

Add Range.disjoint?/2

Tool: Elixir Module: Record

Reduce memory allocation when updating multiple fields in a record

Tool: Elixir Module: Registry

Allow associating a value on :via tuple

Tool: Elixir Module: String

Add String.bag_distance/2

Tool: Elixir Module: Task

Add $callers tracking to Task - this makes it easier to find which process spawned a task and use it for tracking ownership and monitoring

Tool: ExUnit Module: ExUnit

Add ExUnit.after_suite/1 callback

Tool: ExUnit Module: ExUnit.Assertions

Show last N messages (instead of first N) from mailbox on assert_receive fail

Tool: IEx Module: IEx.Helpers

Add port/1 and port/2

Tool: IEx Module: IEx.Server

Expose IEx.Server.run/1 for custom IEx sessions with the ability to broker pry sessions

Tool: Mix Module: Mix

Add Mix.target/0 and Mix.target/1 to control dependency management per target

Tool: Mix Module: Mix.Project

Add :depth and :parents options to deps_paths/1

Tool: Mix Module: mix archive.install

Add a timeout when installing archives

Tool: Mix Module: mix compile

Include optional dependencies in :extra_applications

Tool: Mix Module: mix escript.install

Add a timeout when installing escripts

Tool: Mix Module: mix format

Warn when the same file may be formatted by multiple .formatter.exs

Tool: Mix Module: mix test

Allow setting the maximum number of failures via --max-failures

Tool: Mix Module: mix test

Print a message instead of raising on unmatched tests inside umbrella projects

Tool: Elixir Module: Enum

Passing a non-empty list to Enum.into/2 was inconsistent with maps and is deprecated in favor of Kernel.++/2 or Keyword.merge/2

Tool: Elixir Module: Inspect.Algebra

surround/3 is deprecated in favor of Inspect.Algebra.concat/2 and Inspect.Algebra.nest/2

Tool: Elixir Module: Inspect.Algebra

surround_many/6 is deprecated in favor of container_doc/6

Tool: Elixir Module: Kernel

Using @since will now emit a unused attribute warning. Use @doc since: "1.7.2" instead

Tool: Elixir Module: Kernel

Passing a non-empty list as :into in for comprehensions was inconsistent with maps and is deprecated in favor of Kernel.++/2 or Keyword.merge/2

Tool: Elixir Module: Kernel.ParallelCompiler

files/2 is deprecated in favor of compile/2

Tool: Elixir Module: Kernel.ParallelCompiler

files_to_path/2 is deprecated in favor of compile_to_path/2

Tool: Elixir Module: Kernel.ParallelRequire

files/2 is deprecated in favor of Kernel.ParallelCompiler.require/2

Tool: Elixir Module: System

:seconds, :milliseconds, etc. as time units is deprecated in favor of :second, :millisecond, etc.

Tool: Elixir Module: System

System.cwd/0 and System.cwd!/0 are deprecated in favor of File.cwd/0 and File.cwd!/0

Tool: Mix Module: mix compile.erlang

Returning {:ok, contents} or :error as the callback in Mix.Compilers.Erlang.compile/6 is deprecated in favor of returning {:ok, contents, warnings} or {:error, errors, warnings}

Bugfix

19 changes

Tool: Elixir Module: Calendar

Allow printing dates with more than 9999 years

Tool: Elixir Module: Exception

Exclude deprecated functions in "did you mean?" hints

Tool: Elixir Module: Float

Handle subnormal floats in Float.ratio/1

Tool: Elixir Module: Kernel

Remove Guard test tuple_size(...) can never succeed Dialyzer warning on try

Tool: Elixir Module: Kernel

Expand operands in size*unit bitstring modifier instead of expecting size and unit to be literal integers

Tool: Elixir Module: Kernel

Do not deadlock on circular struct dependencies in typespecs

Tool: Elixir Module: Kernel

Raise proper error message when passing flags to the Erlang compiler that Elixir cannot handle

Tool: Elixir Module: Kernel

Do not leak variables in cond clauses with a single matching at compile-time clause

Tool: Elixir Module: NaiveDateTime

Do not accept leap seconds in builder and parsing functions

Tool: Elixir Module: String

Fix ZWJ handling in Unicode grapheme clusters

Tool: Elixir Module: StringIO

Handle non-printable args in StringIO gracefully

Tool: IEx Module: IEx.Helpers

Use typespec info (instead of docs chunk) and properly format callbacks in b/1

Tool: Logger Module: Logger

Allow Logger backends to be dynamically removed when an application is shutting down

Tool: Mix Module: mix compile

Ensure changes in deps propagate to all umbrella children - this fix a long standing issue where updating a dependency would not recompile all projects accordingly, requiring a complete removal of _build

Tool: Mix Module: mix compile

Avoid time drift when checking and updating compiler manifest files

Tool: Mix Module: mix compile.app

Respect the :only option between umbrella siblings

Tool: Mix Module: mix compile.protocols

Reconsolidate protocols if local dependencies are stale

Tool: Mix Module: mix deps

Properly mark dependencies with different :system_env as diverged

Tool: Mix Module: mix new

Use --module value when setting up filenames