Releases: elixir-lang/elixir
Releases · elixir-lang/elixir
v1.0.1
Enhancements
- [Mix] Add MIX_ENV output to archive.build (as on escript.build)
Bug fixes
- [CLI] Fix Elixir CLI when running on Cygwin
- [ExUnit] Include stacktraces in ExUnit timeouts
- [Mix] Load dependencies before
deps.check
compiles dependencies - [Mix] Ensure
Mix.Config
is deep merged - [Mix] Change version requirement in new apps to
~> MAJOR.MINOR
- [Mix] Report correct location if
local.hex
fails and give higher priority to powershell install on Windows - [Mix] Ensure
--elixirc-paths
option forcompile.elixir
is a subset of the project:elixirc_paths
configuration and it does not remove skipped entries from the manifest - [Mix] Ensure
compile.elixir
writes to manifest when files are removed - [Mix] Ensure
compile.elixir
purges and deletes modules before compiling - [Mix] Do not crash on malformed proxy env var
- [Stream] Ensure
chunk/4
works correctly when halted - [System] Do not allow relative paths in
System.cmd/3
as documented - [System] Fix
:stderr_to_stdout
option inSystem.cmd/3
v1.0.0
v0.15.1
Enhancements
- [GenEvent] Support
:ack
mode for GenEvent streams - [Inspect] Support
:base
option ininspect/2
to choose the base (:binary
,:octal
,:decimal
or:hex
) numbers a printed - [Kernel] Print warnings when used
?
with characters with escape codes - [Logger] Add SASL log forwarding option to Logger
- [Logger] Add
$padlevel
to option Logger formatter - [Logger] Backends receive the exact handler value when added, allowing a key to be passed for configuration lookup
- [Logger] Add
Logger.flush/0
to flush the Logger (useful for testing) - [Logger] Persist backends dynamically added or removed via
add_backend/2
andremove_backend/2
- [Macro] Add
Macro.validate/1
to recursively check if a value is a valid quoted expression - [Mix] Load mix deps only when there is a need to use them (this improves the timing for the majority of tasks in a Mix project)
- [Mix] Make the environment explicit on the success message generated after
escript.build
is invoked - [Mix] Load
config/config.exs
inside escripts - [Mix] Store and check Elixir version requirement for generated archives
Bug fixes
- [CLI] Fix shell bugs when running on Windows with Cygwin or MinGW
- [Kernel] Modules compiled by Elixir now report the correct beam location when
:code.which/1
is invoked. If the bytecode is only available in memory,:code.which/1
returns:in_memory
- [Kernel] Do not expand args for unknown functions/macros
- [Kernel] Ensure
defstruct
,@attr
inside and friends raise a nice error messages when values cannot be properly escaped - [Kernel] Do not raise conflicts on imports used from inside quotes
- [Logger] Metadata is now correctly merged on each
Logger.metadata/1
call - [Logger] Use the Logger PID on
:error_logger
wrapper to avoid race conditions on shutdown - [Macro] Ensure bitstrings work with
Macro.escape/1
- [Mix] Ensure aliases are invoked on umbrella recursive tasks
- [Mix] Leave it up to the application to start the Logger after compilation
- [Mix] Accept more forms of git versions (like "git version 1.9.3 (Apple Git-50)")
- [Path] Do not normalize paths in
Path.join/2
as normalization is beyond the scope of such function - [URI]
to_string/1
now properly converts URI to strings when the schema is missing
Deprecations
- [Collectable] Having a function as collectable is deprecated
- [Module]
Module.function/3
is deprecated, please use:erlang.make_fun/3
instead
v0.15.0
Enhancements
- [Agent] Improve the Agent API to also accept functions that receive explicit module, function and arguments
- [IEx] Support
--werl
call on Windows - [Logger] Add
Logger
- [Map] Add
Map.from_struct/1
- [Mix] Allow
--app
flag to be passed tomix new
- [Mix] Support lowercase
http(s)_proxy
environment variables - [Mix] Allow
elixirc_paths
to also be given through the command line tomix compile.elixir
- [String]
String.slice/2
andString.slice/3
have been optimized
Bug fixes
- [IEx] Ensure functions in
Kernel.SpecialForms
andIEx.Helpers
are also auto-completed - [IEx] Ensure remote shells can be started with
--remsh
- [Kernel] Correctly parse unary/binary operators regardless of number of spaces
- [Kernel] Ensure private functions are not exported
- [Protocol] Do not expose protocol convention on
assert_impl!/2
- [Regex] Do not consider include captures on
Regex.split/3
results - [Stream] Implement the
Inspect
protocol for Streams so we do not leak the Stream representation
Deprecations
- [IEx] IEx color configuration expects a list of atoms instead of a string with colors separated by comma
- [Inspect]
Inspect.Algebra.surround_many/6
now expects Inspect.Opts instead of an integer limit - [Inspect]
Inspect.Algebra.pretty/2
is deprecated in favor ofInspect.Algebra.format/2
that instead returns iodata. This function was used only by documentation examples and it is unlikely to affect actual code - [IO]
IO.ANSI.terminal?
is deprecated in favor ofIO.ANSI.enabled?
- [IO]
IO.ANSI.escape/2
andIO.ANSI.escape_fragment/2
is deprecated in favor ofIO.ANSI.format/2
andIO.ANSI.format_fragment/2
- [Kernel] Leading
0
for octals is deprecated in favor of0o
- [Kernel]
0X
for hexadecimals is deprecated in favor of0x
- [Kernel]
0B
for binaries is deprecated in favor of0b
- [Mix] Mix color configuration expects a list of atoms instead of a string with colors separated by comma
- [String]
\NNN
,\NN
and\N
for octals are deprecated inside string, sigils and chars in favor of hexadecimal entries with\x
Backwards incompatible changes
- [Kernel]
binding/1
andbinding/2
expecting a list were removed - [Regex] Do not consider include captures on
Regex.split/3
results
v0.14.3
Enhancements
- [Access] Allow function access on
get_in/2
andget_and_update_in/3
- [Enum] Add
Enum.sort_by/3
- [ExUnit] Match the line filter by proximity instead of exact match
- [Float] Support precision in
Float.ceil/1
andFloat.floor/1
- [IO] Add
IO.(bin)read(device, :all)
- [Kernel] Print a warning if a dangling
@doc
clause is found - [Mix] Use absolute symbolic links on Windows for
_build
instead of copying - [Mix] Add
Mix.compilers
that returns all default compilers used by mix tasks - [Mix] Issue warning and reset mtime for source files from the future
- [Mix] Support task aliases in Mix
- [OptionParser] Add
OptionParser.split/1
that splits a string into argv - [Record] Allow a record to be converted to a keyword list with
record(some_record)
- [String] Improve performance of
String.split/1
- [Typespec] Allow
%Struct{}
syntax to be used in typespecs - [Typespec] Allow
record(:record, fields)
syntax to be used in typespecs
Bug fixes
- [IEx] Do not print ANSI sequences on
IEx.Helpers.clear/0
if ANSI sequences are not supported - [Inspect] Ensure
Inspect.Algebra.to_doc/2
doesn't go into a loop when there is a failure printing a struct - [Kernel]
|>
,<<<
,>>>
and^^^
made left associative in operator table - [Kernel]
<
,>
,<=
,>=
given higher precedence than comparison operators (==
,!=
, etc) in the operator table - [Kernel] Run command line and escripts in a process that does not trap exits
- [Kernel] Fix a bug where Mix paths had higher priority than CLI ones, causing protocol consolidations to not be properly loaded
- [Kernel] Fix wording on error messages when a check/guard always passes or always fails
- [Kernel] Fix a bug where an unused function warning was printed even when the function was used via
defoverridable
- [Kernel] Improve typespecs so they don't generate supertype dialyzer warnings
- [Macro]
to_string
correctly displays sigils - [Mix] Ensure Mix dependencies are not compiled every second time when
mix deps.compile
is invoked - [Mix] Fix a bug where
Mix.shell.error/1
and friends choked when printing a map - [Mix] Ensure multiple
@external_resource
entries are read by Mix compilers - [Mix] Fix a bug where tasks for umbrella projects were not properly reenabled
- [Stream] Fix bug when
flat_map
is used inside anotherflat_map
with an Enumerable - [Typespec] Fix a bug where the
list
typespec was incorrectly rendered as[]
Soft deprecations (no warnings emitted)
- [Kernel] Using a list for bitstring modifiers is deprecated (as in
<<x :: [little, utf16]>>
), please use-
as the separator instead (as in<<x :: little-utf16>>
) - [System]
System.cmd/1
is deprecated in favor ofSystem.cmd/3
Deprecations
- [Mix]
mix escriptize
is deprecated in favor ofescript.build
- [Mix]
mix local.install
andmix local.uninstall
have been deprecated in favor ofmix archive.install
andmix archive.uninstall
respectively - [Mix]
:embed_extra_apps
for escripts is deprecated, instead list the dependencies insidedef application
- [System] Giving a char list to
System.find_executable/1
is deprecated
Backwards incompatible changes
- [Access] No longer fill in missing intermediate values with empty maps
- [Float]
Float.ceil/2
andFloat.floor/2
now always returns floats and no longer accept integers - [Kernel]
defstruct
no longer automatically defines a type - [Kernel]
exit(integer)
is no longer supported from scripts to configure the exit signal. Useexit({:shutdown, integer})
instead - [Kernel] Default argument values have to be defined in a function head if the function has multiple clauses
- [Mix]
mix archive.build
replaces the functionality ofmix archive
,mix archive
now lists locally installed archives - [Mix]
Mix.shell.info/1
no longer automatically escape ANSI sequences. Instead if has to be explicitly enabled with theansi: true
option - [OptionParser]
--no-SWITCH
are only allowed for declared booleans switches
v0.14.2
Enhancements
- [Enum] Improve performance of
Enum.join/2
andEnum.map_join/3
by using iolists - [Kernel] Ensure compatibility with Erlang 17.1
- [Kernel] Support
@external_resource
attribute to external dependencies to a module - [Mix] Allow built Git dependencies to run on a system without Git by passing
--no-deps-check
- [Mix] Add
MIX_ARCHIVES
env variable (it is recommended for Elixir build tools to swap this environment) - [Task] Set
:proc_lib
initial call on task to aid debugging - [Typespec] Delay typespec compilation to after expansion
- [URI] Allow
parse/1
now accepts%URI{}
as argument and return the uri itself
Bug fixes
- [CLI] Support paths inside archives in
-pa
and-pz
options - [IEx] Remove delay when printing data from the an application start callback
- [IEx] Ensure we show a consistent error when we cannot evaluate
.iex.exs
- [Kernel] Ensure derived protocols are defined with a file
- [Kernel] Change precedence of
&
to not special case/
- [Kernel] Ensure we can only use variables and
\\
as arguments of bodyless clause
Soft deprecations (no warnings emitted)
- [EEx] Using
EEx.TransformerEngine
andEEx.AssignsEngine
are deprecated in favor of function composition withMacro.prewalk/1
(seeEEx.SmartEngine
for an example) - [Kernel]
Kernel.xor/2
is deprecated - [Mix]
Mix.Generator.from_file/1
is deprecated in favor of passingfrom_file: file
option toembed_text/2
andembed_template/2
(note though thatfrom_file/1
expects a path relative to the current file while thefrom_file: file
expects one relative to the current working directory)
Deprecations
- [Kernel]
size/1
is deprecated in favor ofbyte_size/1
andtuple_size/1
(this change was soft deprecated two releases ago)
Backwards incompatible changes
- [CLI] Remove support for the
--gen-debug
option as its usage is not documented by OTP - [Kernel] Sigils no longer balance start and end tokens, e.g. the sigil
~s(f(o)o)
is no longer valid as it finishes in the first closing)
- [Kernel] Variables set in
cond
clause heads are no longer available outside of that particularcond
clause (this is the behaviour also found incase
,receive
and friends) - [System]
build_info/0
now returns a map
v0.14.1
Enhancements
- [Base] Decoding and encoding functions now accept the
:case
as an option - [ExUnit] The test process now exits with
:shutdown
reason - [GenEvent]
GenEvent.stream/2
now accepts:sync
and:async
modes - [Node] Add
Node.start/3
andNode.stop/0
- [String] Updated Unicode database to 7.0
- [Task] Log when tasks crash
Bug fixes
- [Enum]
Enum.slice/2
andEnum.slice/3
always returns a list (and never nil) - [Kernel] Disambiguate (w)erl to (w)erl.exe
- [Mix] Ensure umbrella project is recompiled when a dependency inside an umbrella child changes
- [OptionParser] Do not allow underscores in option names
- [Path] Fix path expansion of
"/.."
- [Path] Do not match files starting with
.
inPath.wildcard/2
by default - [Process]
Process.info(pid, :registered_name)
returns{:registered_name, nil}
if there is no registered name - [String]
String.slice/2
andString.slice/3
always returns a list (and never nil) - [URI]
encode/1
does not escape reserved/unreserved characters by default nor encodes whitespace as+
(checkURI.encode_www_form/1
andURI.decode_www_form/1
for previous behaviour)
Deprecations
- [Mix]
:escript_*
options were moved into a single:escript
group
Backwards incompatible changes
- [GenEvent]
GenEvent.stream/2
defaults to:sync
mode - [Kernel] Remove
get_in/1
v0.14.0
Enhancements
- [ExUnit] Add
on_exit/1
callbacks that are guaranteed to run once the test process exits and always in another process - [Kernel] Store documentation in the abstract code to avoid loading them when the module is loaded
- [Kernel] Add
get_in/2
,put_in/3
,update_in/3
andget_and_update_in/3
to handle nested data structure operations - [Kernel] Add
get_in/1
,put_in/2
,update_in/2
andget_and_update_in/2
to handle nested data structure operations via paths - [Mix] Add
Mix.Config
to ease definition of configuration files - [Mix] Add
mix loadconfig
task that can be called multiple times to load external configs - [Mix] Support
--config
option onmix run
- [Mix] Support
HTTP_PROXY
andHTTPS_PROXY
on Mix url commands - [Mix] Support
--names
options inmix help
which emit only names (useful for autocompletion) - [Protocol] Add
Protocol.consolidate/2
,Protocol.consolidated?/1
and amix compile.protocols
task for protocol consolidation - [Protocol] Add
Protocol.derive/3
for runtime deriving of a struct - [String] Add
String.chunk/2
- [Struct] Add support for
@derive
beforedefstruct/2
definitions
Bug fixes
- [File]
File.rm
now consistently deletes read-only across operating systems - [Kernel] Ensure Mix
_build
structure works on Windows when copying projects - [Kernel] Ensure
1.0E10
(with uppercase E) is also valid syntax - [Mix] Fix
mix do
task for Windows' powershell users - [Path] Fix
Path.absname("/")
andPath.expand("/")
to return the absolute path"/"
.
Soft deprecations (no warnings emitted)
- [Kernel]
size/1
is deprecated, please usebyte_size/1
ortuple_size/1
instead - [ExUnit]
teardown/2
andteardown_all/2
are deprecated in favor ofon_exit/1
callbacks
Deprecations
- [Access]
Access.access/2
is deprecated in favor ofAccess.get/2
- [Dict]
Dict.Behaviour
is deprecated in favor ofDict
- [Kernel]
Application.Behaviour
,GenEvent.Behaviour
,GenServer.Behaviour
andSupervisor.Behaviour
are deprecated in favor ofApplication
,GenEvent
,GenServer
andSupervisor
- [Kernel]
defexception/3
is deprecated in favor ofdefexception/1
- [Kernel]
raise/3
is deprecated in favor ofreraise/2
- [Kernel]
set_elem/3
is deprecated in favor ofput_elem/3
- [Kernel] Passing an atom
var!/1
is deprecated, variables can be built dynamically withMacro.var/2
- [Mix] Exceptions that define a
:mix_error
field to be compatible with Mix are no longer supported. Instead please provide a:mix
field and useMix.raise/1
andMix.raise/2
Backwards incompatible changes
- [Access]
Kernel.access/2
no longer exists and theAccess
protocol now requiresget/2
(instead ofaccess/2
) andget_and_update/3
to be implemented - [Kernel] Retrieving docs as
module.__info__(:docs)
is no longer supported, please useCode.get_docs/2
instead - [Kernel]
Code.compiler_options/1
no longer accepts custom options, only the ones specified by Elixir (use mix config instead) - [Mix]
mix new
no longer generates a supevision tree by default, please pass--sup
instead - [Task] Tasks are automatically linked to callers and a failure in the task will crash the caller directly
v0.13.3
Enhancements
- [OptionParser] Add
:strict
option that only parses known switches - [OptionParser] Add
next/2
useful for manual parsing of options - [Macro] Add
Macro.prewalk/2/3
andMacro.postwalk/2/3
- [Kernel]
GenEvent
,GenServer
,Supervisor
,Agent
andTask
modules added - [Kernel] Make deprecations compiler warnings to avoid the same deprecation being printed multiple times
Bug fixes
- [Enum] Fix
Enum.join/2
andEnum.map_join/3
for empty binaries at the beginning of the collection - [ExUnit] Ensure the formatter doesn't error when printing :EXITs
- [Kernel] Rename
ELIXIR_ERL_OPTS
toELIXIR_ERL_OPTIONS
for consistency withERL_COMPILER_OPTIONS
- [OptionParser] Parse
-
as a plain argument - [OptionParser]
--
is always removed from argument list onparse/2
and when it is the leading entry onparse_head/2
- [Regex] Properly escape regex (previously regex controls were double escaped)
Soft deprecations (no warnings emitted)
- [Dict]
Dict.Behaviour
is deprecated in favor ofDict
- [Kernel]
Application.Behaviour
,GenEvent.Behaviour
,GenServer.Behaviour
andSupervisor.Behaviour
are deprecated in favor ofApplication
,GenEvent
,GenServer
andSupervisor
- [Kernel]
defexception/3
is deprecated in favor ofdefexception/1
- [Kernel]
raise/3
is deprecated in favor ofreraise/2
- [Kernel]
set_elem/3
is deprecated in favor ofput_elem/3
Soft deprecations for conversions (no warnings emitted)
- [Kernel]
atom_to_binary/1
andatom_to_list/1
are deprecated in favor ofAtom.to_string/1
andAtom.to_char_list/1
- [Kernel]
bitstring_to_list/1
andlist_to_bitstring/1
are deprecated in favor of the:erlang
ones - [Kernel]
binary_to_atom/1
,binary_to_existing_atom/1
,binary_to_float/1
,binary_to_integer/1
andbinary_to_integer/2
are deprecated in favor of conversion functions inString
- [Kernel]
float_to_binary/*
andfloat_to_list/*
are deprecated in favor ofFloat.to_string/*
andFloat.to_char_list/*
- [Kernel]
integer_to_binary/*
andinteger_to_list/*
are deprecated in favor ofInteger.to_string/*
andInteger.to_char_list/*
- [Kernel]
iodata_to_binary/1
andiodata_length/1
are deprecatedIO.iodata_to_binary/1
andIO.iodata_length/1
- [Kernel]
list_to_atom/1
,list_to_existing_atom/1
,list_to_float/1
,list_to_integer/1
,list_to_integer/2
andlist_to_tuple/1
are deprecated in favor of conversion functions inList
- [Kernel]
tuple_to_list/1
is deprecated in favor ofTuple.to_list/1
- [List]
List.from_char_data/1
andList.from_char_data!/1
deprecated in favor ofString.to_char_list/1
- [String]
String.from_char_data/1
andString.from_char_data!/1
deprecated in favor ofList.to_string/1
Deprecations
- [Kernel]
is_exception/1
,is_record/1
andis_record/2
are deprecated in favor ofException.exception?1
,Record.record?/1
andRecord.record?/2
- [Kernel]
defrecord/3
is deprecated in favor of structs - [Kernel]
:hygiene
inquote
is deprecated - [Mix]
Mix.project/0
is deprecated in favor ofMix.Project.config/0
- [Process]
Process.spawn/1
,Process.spawn/3
,Process.spawn_link/1
,Process.spawn_link/3
,Process.spawn_monitor/1
,Process.spawn_monitor/3
,Process.send/2
andProcess.self/0
are deprecated in favor of the ones inKernel
Backwards incompatible changes
- [Exception] Exceptions now generate structs instead of records
- [OptionParser] Errors on parsing returns the switch and value as binaries (unparsed)
- [String]
String.to_char_list/1
(previously deprecated) no longer returns a tuple but the char list only and raises in case of failure
v0.13.2
Enhancements
- [Application] Add an Application module with common functions to work with OTP applications
- [Exception] Add
Exception.message/1
,Exception.format_banner/1
,Exception.format_exit/1
andException.format/1
- [File] Add
File.ln_s/1
- [Mix]
mix deps.clean
now works accross environments - [Mix] Support line numbers in
mix test
, e.g. test/some/file_test.exs:12 - [Mix] Use
@file
attributes to detect dependencies in between.ex
and external files. This means changing an.eex
file will no longer recompile the whole project only the files that depend directly on it - [Mix] Support application configurations in
config/config.exs
which can be customized by specifying your own:config_path
- [Mix] Support user-wide configuration with
~/.mix/config.exs
- [Mix]
mix help
now uses ANSI formatting to print guides - [Regex] Support functions in
Regex.replace/4
- [String] Support
:parts
inString.split/3
Bug fixes
- [Code] Ensure we don't lose the caller stacktrace on code evaluation
- [IEx] Exit signals now exits the IEx evaluator and a new one is spawned on its place
- [IEx] Ensure we don't prune too much stacktrace when reporting failures
- [IEx] Fix an issue where
iex.bat
on Windows was not passing the proper parameters forward - [Kernel] Ensure modules defined on root respect defined aliases
- [Kernel] Do not wrap single lists in
:__block__
- [Kernel] Ensure emitted beam code works nicely with dialyzer
- [Kernel] Do not allow a module named
Elixir
to be defined - [Kernel] Create remote funs even if mod is a variable in capture
&mod.fun/arity
- [Kernel] Improve compiler message when duplicated modules are detected
- [Mix] Generate
.gitignore
for--umbrella
projects - [Mix] Verify if a git dependency in deps has a proper git checkout and clean it automatically when it doesn't
- [Mix] Ensure
mix test
works withIEx.pry/0
- [System] Convert remaining functions in System to rely on char data
Soft deprecations (no warnings emitted)
- [Application]
use Application.Behaviour
is deprecated in favor ofuse Application
- [Exception]
exception.message
is deprecated in favorException.message/1
for retrieving exception messages - [Kernel]
is_exception/1
,is_record/1
andis_record/2
are deprecated in favor ofException.exception?1
,Record.record?/1
andRecord.record?/2
- [Mix]
Mix.project/0
is deprecated in favor ofMix.Project.config/0
- [Process]
Process.spawn/1
,Process.spawn/3
,Process.spawn_link/1
,Process.spawn_link/3
,Process.spawn_monitor/1
,Process.spawn_monitor/3
,Process.send/2
andProcess.self/0
are deprecated in favor of the ones inKernel
Deprecations
- [IEx] IEx.Options is deprecated in favor of
IEx.configure/1
andIEx.configuration/0
- [Kernel]
lc
andbc
comprehensions are deprecated in favor offor
- [Macro]
Macro.safe_terms/1
is deprecated - [Process]
Process.delete/0
is deprecated - [Regex] Deprecate
:global
option inRegex.split/3
in favor ofparts: :infinity
- [String] Deprecate
:global
option inString.split/3
in favor ofparts: :infinity
Backwards incompatible changes
- [ExUnit]
ExUnit.Test
andExUnit.TestCase
has been converted to structs - [ExUnit] The test and callback context has been converted to maps
- [Kernel]
File.Stat
,HashDict
,HashSet
,Inspect.Opts
,Macro.Env
,Range
,Regex
andVersion.Requirement
have been converted to structs. This meansis_record/2
checks will no longer work, instead, you can pattern match on them using%Range{}
and similar - [URI] The
URI.Info
record has now become theURI
struct - [Version] The
Version.Schema
record has now become theVersion
struct