Releases: elixir-lang/elixir
Releases · elixir-lang/elixir
v1.7.0-rc.0
Release v1.7.0-rc.0
v1.6.6
This release supports Erlang/OTP 21.0 by removing all warnings and by properly supporting the new Erlang logger module.
Important! the Precompiled.zip attachment below is precompiled on the lowest supported Erlang/OTP version, which is Erlang/OTP 19.0. Therefore, if you want to run Elixir v1.6 with Erlang/OTP 21, we recommend you to compile Elixir from source.
1. Bug fixes
Elixir
- [Base] Do not raise when finding bad digits in
Base.decode32!withcase: :mixed - [Code] Preserve the user's choice when
fnis followed by a newline and it has only a single clause - [DynamicSupervisor] Properly account for restarting children in the
:max_childrenconfiguration - [String] Add performant impl for string upcase/downcase
:asciimode - [Task.Supervisor] Fix type spec for
start_child/4
Logger
- [Logger] Do not crash truncation when truncate is set to infinity
Mix
- [mix format] Match files starting with dot
v1.6.5
This release supports Erlang/OTP 21.0-rc by removing all warnings and by properly redirecting logger output. Note it is not guaranteed it will support Erlang/OTP 21.0 final.
1. Bug fixes
- [Code] Preserve the user's choice in the formatter on parens call with next break fits
- [Code] Preserve the user's choice in the formatter on calls without parens when we have one argument per line
- [Code] Fix formatting when there is a tilde in the first element of a bitstring
- [Kernel] Support specsdiff flag on
__info__spec clauses - [Kernel] Do not exclude hygienic vars in
defguard - [Kernel.SpecialForms] Mark
forcomprehensions as generated to avoid dialyzer warnings - [Macro] Make sure
Macro.to_string/2emits valid quoted expressions - [Task] Support
:infinitytimeout onTask.yield_many/2 - [Task.Supervisor] Do not crash spawning supervised tasks when the parent process is dead
- [URI] Fix parsing of URIs with trailing
?
v1.6.4
v1.6.3
1. Enhancements
Elixir
- [Code.Formatter] Support comments in the middle of pipelines,
whenand|expressions
2. Bug fixes
Elixir
- [Code.Formatter] Consider commas when breaking groups
- [Code.Formatter] Ensure proper precedence between
&and operators - [Code.Formatter] Consider
.formatter.exswhen formatting stdin
Logger
- [Logger.Translator] Ensure logger doesn't crash when reporting named
DynamicSupervisor
v1.6.2
1. Enhancements
Mix
- [mix compile.erlang] Teach Mix erlang compiler alternative spelling for
-behaviordeclaration - [mix format] Support the
:subdirectoriesconfiguration that points to other directories with their own.formatter.exsfile. This is useful in umbrella applications.mix new --umbrellahas also been changed to use this new configuration by default - [mix format] Include the current environment for missing dependency errors
2. Bug fixes
Elixir
- [Code.Formatter] Ensure
->does not exceed line length - [DynamicSupervisor] Properly tag error reports generated by dynamic supervisors so they can be properly translated by
Logger - [DynamicSupervisor] Consider extra arguments during child restart
- [Kernel] Ensure arguments given to a guard defined with
defguardare evaluated in the correct order - [Module] Do not remove docs for previous function declaration when
@impl trueis used - [Supervisor] Ensure
use Supervisorproperly adds the@behaviour Supervisorannotation
Mix
- [Mix.Shell] Bring back
Mix.Shell.cmd/2- this arity was defined via a default argument that was accidentally removed
v1.6.1
1. Enhancements
Elixir
- [DynamicSupervisor] Implement
child_spec/1for DynamicSupervisor - [Kernel] Raise better error messages on invalid map syntax
2. Bug fixes
Elixir
- [Code.Formatter] Only rearrange
not inoperator if explicitly opted-in - [Code.Formatter] Ensure do blocks do not exceed line length on calls with a single argument
- [Collectable] Support bitstrings in Collectable and for-comprehensions (regression in v1.6.0)
- [GenServer] Do not override user own
@optsattribute - [Enum] Reintroduce zipping of any enumerable of enumerables in
Enum.zip/1(regression in v1.6.0) - [Macro] Reorder kw blocks in
Macro.to_string/1to avoid warnings - [Protocol] Fix protocol consolidation when some chunks may be missing
- [Stream] Reintroduce zipping of any enumerable of enumerables in
Stream.zip/1(regression in v1.6.0) - [Supervisor] Do not override user own
@optsattribute - [Supervisor] Add
@specto second clause ofstart_link/2
ExUnit
- [ExUnit.Case] Reintroduce
:casein ExUnit setup/setup_all/test context
v1.6.0
Official announcement: https://elixir-lang.org/blog/2018/01/17/elixir-v1-6-0-released/
1. Enhancements
EEx
- [EEx] Allow markers
/and|to be used in a custom EEx engine
Elixir
- [Calendar] Add truncate to
Time,DateTimeandNaiveDateTimeto facilitate microsecond precision pruning - [Code] Add
format_string!/2andformat_file!/2for automatic code formatting - [Code] Support column annotations in quoted expressions with
columns: trueinCode.string_to_quoted/2 - [DynamicSupervisor] Add
DynamicSupervisordesigned to manage children that are added and removed dynamically - [Exception] Make
Exception.blame/3extensible by adding an optionalblame/2callback to exceptions - [Exception] Improve the printing of guards on blamed exceptions
- [Enumerable] Add
Enumerable.slice/1and optimize manyEnumoperations with the new protocol. This allows data-structures with index-based random access to provide a non-linear implementation - [Inspect] Show UTF-8 BOM on inspected strings
- [Inspect.Algebra] Add
:strictand:flexbreaks - this gives more control over the document fitting - [Inspect.Algebra] Allow a group to inherit the parent group break
- [Inspect.Algebra] Add
force_unfit/1andnext_break_fits/2which give more control over document fitting - [Inspect.Algebra] Add
collapse_lines/1for collapsing multiple lines to a maximum value - [Inspect.Algebra] Allow
nest/2to be:resetor be set to the current:cursorposition - [Kernel] Prefix variables with V when emitting Erlang code. This improves the integration with tools such as Erlang code formatters and the GUI debugger
- [Kernel] Warn on the use of
length(x) == 0in guards - [Kernel] Warn if
catchcomes beforerescuein try - [Kernel] Warn if heredoc is outdented compared to its closing quotes
- [Kernel] Add
defguard/1anddefguardp/1to make it easier to build guard-safe macros - [Kernel.ParallelCompiler] Add
compile/2,compile_to_path/3andrequire/2which provide detailed information about warnings and errors - [Kernel.SpecialForms] Support the
uniq: trueflag inforcomprehensions - [Module] Introduce
@deprecatedand@sinceattributes - [List] Rearrange equals and inserts for shorter diff scripts in
List.myers_difference/2 - [Record] Allow
:macrosand:includesto be given toRecord.extract/2 - [Stream] Add
Stream.intersperse/2 - [String] Update to Unicode 10
- [String] Allow passing empty string
matchtoString.replace/4 - [String] Support context and language sensitive operations in
String.upcase/2andString.downcase/2. Currently only the:greekcontext is supported - [String] Support
:asciiconversion inString.upcase/2andString.downcase/2 - [Time] Add
Time.add/3
ExUnit
- [ExUnit.Assertions] Perform inclusive checks in
assert_in_delta - [ExUnit.Callbacks] Add
ExUnit.Callbacks.start_supervised!/2 - [ExUnit.Case] Generate a random seed per test based on the test suite seed
IEx
- [IEx.Autocomplete] Provide contextual autocompletion:
t Enum.will autocomplete types,b Enumwill autocomplete callbacks - [IEx.CLI] Provide hints for developers when a bad host name is given to
--remsh - [IEx.Helpers] Automatically include specs when showing documentation for functions/macros
- [IEx.Helpers] Improve formatting of behaviours and typespecs by using the formatter
- [IEx.Helpers] Allow pattern matching and guard expressions when on
IEx.break!
Logger
- [Logger] Add
:discard_thresholdto Logger to help with message queue overflow
Mix
- [mix app.start] Add
--preload-modulestomix app.start - [mix archive.build] Allow
mix archive.buildto bundle dot files via an option - [mix compile] Define a behavior for Mix compiler tasks and return diagnostics from compiler tasks
- [mix compile] Track struct dependencies between files and recompile them only if the struct changes
- [mix deps] Support
:system_envoption when specifying dependencies - [mix format] Add a
mix formattask that formats the given files (or the files specified in a.formatter.exsfile) - [mix profile.eprof] Add a new task for time-based profiling with eprof
- [mix test] Run all functions in a describe block by giving the
file:linethe describe block starts - [mix test] Report the top N slowest tests with the
--slowest Nflag - [mix test] Report the number of doctests and tests separately
- [mix xref] Support
--include-siblingsin reports for umbrella support - [mix xref] Add
mix xref graph --format stats - [mix xref] Add
--only-nodesand--labelfilters to mix xref graph - [mix xref] Add
mix xref deprecatedthat shows the callsite of deprecated functions
2. Bug fixes
Elixir
- [CLI] Support path with spaces as argument to elixir.bat
- [Inspect] Properly handle minus signal for non-decimal negative integers
- [Integer] Do not raise on non-integer values in
is_odd/is_even - [Kernel] Solve a precedence issue between
&and|, such as[&Foo.bar/1 | &Baz.bat/2] - [Kernel] Do not load dynamic Elixir modules as
:in_memoryas this value is not officially supported by the code server. Instead, use an empty list, which is the same value used by Erlang. - [Kernel] Validate variable struct name is atom when used in pattern matching
- [Kernel] No longer generate documentation for
defdelegatefunctions automatically to avoid overriding previously specified@doc - [Macro] Fix
Macro.to_string/2for tuple calls, such asalias Foo.{Bar, Baz} - [MapSet] Return valid MapSet when unioning a legacy MapSet
- [Regex] Return a leading empty space when splitting on empty pattern. This makes the
splitoperation consistent with the other operations in theRegexmodule - [Stream] Ensure
Stream.chunk_while/4does not emit more elements than necessary when halted - [String] Return a leading empty space when splitting on empty string. This makes the
splitoperation consistent with the other operations in theStringmodule - [URI] Preserve empty fragments in
URI.parse/1
Mix
- [mix app.start] Improve the quality of reports if app fails to boot
- [mix cmd] Allow
mix cmdto be invoked multiple times without marking it as executed - [mix deps] Ensure optional dependencies in umbrella applications are loaded
- [mix deps.update] Ensure transitive new non-Hex dependencies are also fetched when a repo is updated
- [mix xref] Take compile dependencies with higher priority than runtime ones when building a graph
- [mix xref] Handle external files for xref callers and warnings
3. Soft deprecations (no warnings emitted)
Elixir
- [GenServer] Warn if
init/1is not defined inGenServer. This brings GenServer closer to the implementation in OTP and aligns all behaviours to require theinit/1callback - [Inspect.Algebra]
surround/3andsurround_many/6are deprecated in favor ofcontainer_doc/6 - [Kernel] Specifying map types with variable keys without defining the type as required/optional is deprecated
- [Kernel.ParallelCompiler]
files/2andfiles_to_path/3are deprecated in favor ofcompile/2andcompile_to_path/3 - [Kernel.ParallelRequire]
files/2is deprecated in favor ofKernel.ParallelCompiler.require/2 - [Supervisor] The
:simple_one_for_onestrategy is deprecated in favor ofDynamicSupervisor - [Supervisor] Passing a list of args to
Supervisor.start_child/2is deprecated in favor ofDynamicSupervisor - [Task.Supervisor] Passing
:restartand:shutdowntoTask.Supervisor.start_link/2is deprecated (it should be passed on start child instead)
ExUnit
- [ExUnit.Formatter]
:case_startedand:case_finishedevents are deprecated in favor of:module_startedand:module_finished
Mix
- [Mix.Compilers.Erlang] Returning
{:ok, val} | :errorfrom custom Erlang compilers is deprecated in favor of{:ok, val, warnings} | {:error, errors, warnings}
4. Deprecations
Elixir
- [Enum]
Enum.partition/2is deprecated in favor ofEnum.split_with/2 - [Keyword]
Keyword.replace/3is deprecated in favor ofKeyword.fetch/2andKeyword.put/3 - [Map]
Map.replace/3is deprecated in favor ofMap.fetch/2andMap.put/3 - [Macro]
Macro.unescape_tokens/1andMacro.unescape_tokens/2are deprecated in favor ofEnum.map/2 - [Range] Deprecate
Range.range?/1in favor of pattern matching on_ .. _
v1.6.0-rc.1
Release v1.6.0-rc.1
v1.6.0-rc.0
Release v1.6.0-rc.0