v0.12.0
Pre-release
Pre-release
Enhancements
- [Exception] Allow
exception/1to be overriden and promote it as the main mechanism to customize exceptions - [File] Add
File.stream_to!/3 - [Float] Add
Float.floor/1,Float.ceil/1andFloat.round/3 - [Kernel] Add
List.delete_at/2andList.updated_at/3 - [Kernel] Add
Enum.reverse/2 - [Kernel] Implement
defmodule/2,@/1,def/2and friends in Elixir itself.case/2,try/2andreceive/1have been made special forms.var!/1,var!/2andalias!/1have also been implemented in Elixir and demoted from special forms - [Record] Support dynamic fields in
defrecordp - [Stream] Add
Stream.resource/3 - [Stream] Add
Stream.zip/2,Stream.filter_map/3,Stream.each/2,Stream.take_every/2,Stream.chunk/2,Stream.chunk/3,Stream.chunk/4,Stream.chunk_by/2,Stream.scan/2,Stream.scan/3,Stream.uniq/2,Stream.after/2andStream.run/1 - [Stream] Support
Stream.take/2andStream.drop/2with negative counts
Bug fixes
- [HashDict] Ensure a
HashDictstored in an attribute can be accessed via the attribute - [Enum] Fix bug in
Enum.chunk/4where you'd get an extra element when the enumerable was a multiple of the counter and a pad was given - [IEx] Ensure
c/2helper works with full paths - [Kernel]
quote location: :keepnow only affects definitions in order to keep the proper trace in definition exceptions - [Mix] Also symlink
includedirectories in _build dependencies - [Version] Fix
Version.match?/2with~>and versions with alphanumeric build info (like-dev)
Deprecations
- [Enum]
Enumerable.count/1andEnumerable.member?/2should now return tagged tuples. Please seeEnumerabledocs for more info - [Enum] Deprecate
Enum.chunks/2,Enum.chunks/4andEnum.chunks_by/2in favor ofEnum.chunk/2,Enum.chunk/4andEnum.chunk_by/2 - [File]
File.binstream!/3is deprecated. Simply useFile.stream!/3which is able to figure out ifstreamorbinstreamoperations should be used - [Macro]
Macro.extract_args/1is deprecated in favor ofMacro.decompose_call/1
Backwards incompatible changes
- [Enum] Behaviour of
Enum.drop/2andEnum.take/2has been switched when given negative counts - [Enum] Behaviour of
Enum.zip/2has been changed to stop as soon as the first enumerable finishes - [Enum]
Enumerable.reduce/3protocol has changed to support suspension. Please seeEnumerabledocs for more info - [Mix] Require
:escript_main_moduleto be set before generating escripts - [Range]
Range.Iteratorprotocol has changed in order to work with the newEnumerable.reduce/3. Please seeRange.Iteratordocs for more info - [Stream] The
Stream.Lazystructure has changed to accumulate functions and accumulators as we go (its inspected representation has also changed) - [Typespec]
whenclauses were moved to the outer part of the spec and should be in the keywords format. Soadd(a, b) when is_subtype(a, integer) and is_subtype(b, integer) :: integershould now be written asadd(a, b) :: integer when a: integer, b: integer