v1.2 brings enhancements, bug fixes, performance improvements and more into Elixir. Elixir v1.2 supports only Erlang 18. Upgrading to Erlang 18 is therefore recommended before upgrading Elixir.
- [Base] Optimize encode and decode operations about 10 times
- [Enum] Use the faster and auto-seeding
:randinstead of:randominEnum.shuffle/1andEnum.random/1andEnum.take_random/2 - [GenServer] Add
GenServer.stop/1for reliably shutting servers down - [Kernel] Support multiple aliases in
alias,import,requireanduse. For example,alias MyApp.{Foo, Bar, Baz} - [Kernel] Add
struct!/2. Similar tostruct/2but raises on invalid keys - [Kernel] Warn if
@doc/@typedoc/@moduledocattributes are redefined - [Kernel] Mark quoted expressions as generated avoiding false positives on dialyzer
- [Kernel] Allow variables as map keys on creation
%{key => value}and on matches%{^key => value} - [Kernel] Allow the pin operator
^infnclauses and on the left side of<-inforcomprehensions - [Kernel] Introduce
withas a special form that allows matching on right side parameters - [Kernel] Raise when right hand side of
->does not provide any expression - [Kernel] Warn if the Elixir was compiled with a different endianness than the one currently available at runtime
- [Kernel] Warn if a variable is used after being defined exclusively in a nested context
- [Kernel] Warn if piping into an expression without parenthesis
- [Macro] Add
Macro.traverse/4that performs pre and post-walk at once - [Macro] Add
Macro.camelize/1andMacro.underscore/1 - [Process] Add
Process.get_keys/0 - [String] Introduce
String.trim_{prefix,suffix,leading,trailing}/2. The first two will remove only the first occurrence of the given match in string. The last two will remove all occurrences of the given match - [String] Support
String.normalize/2andString.equivalent?/2that perform NFD and NFC normalization - [Task] Add
Task.Supervisor.async_nolink/1/3that spawns a supervised task without linking to the caller process - [Task] Introduce
Task.yield_many/2 - [Task] Raise an error when a task is queried from a non-owning process (instead of waiting forever)
- [IEx] Display type docs for
t(Module.type)andt(Module.type/arity) - [IEx] Add
i/1helper that prints information about any data type
- [Logger] Add file to logger metadata
- [Mix] Cache and always consolidate protocols
- [Mix] Add
warn_test_patterntomix testthat will warn on potentially misconfigured test files - [Mix] Introduce
MIX_QUIETenvironment variable that configures the underlying Mix task to output only error messages - [Mix] Validate git options and warn on conflicting ref, branch or tags
- [Kernel] Change
__ENV__.fileif@fileis set for the given function - [Kernel] Make
Kernel.ParallelRequireaware of:warning_as_errors - [Kernel] Improve error message for invalid
do/do:
- [IEx] Do not start apps on
recompilehelper if--no-startwas given - [IEx] Avoid copying of data when evaluating every expression in IEx
- [Mix] Always run non-recursive tasks at the umbrella root
- [Mix] Ensure rebar projects work on directory names that contain non-latin characters
- [Mix] Ignore directories inside
appsin umbrellas that do not have amix.exsfile
- [Dict]
DictandHashDictare soft deprecated in favor ofMap - [Keyword]
Keyword.size/1is deprecated in favor oflength/1 - [Map]
Map.size/1is deprecated in favor ofmap_size/1 - [Set]
SetandHashSetare soft deprecated in favor ofMapSet
- [Mix]
Mix.Utils.camelize/1andMix.Utils.underscore/1are soft deprecated in favor ofMacro.camelize/1andMacro.underscore/1