Releases: elixir-lang/elixir
Releases · elixir-lang/elixir
v1.4.3
Note: This release had a regression that has been immediately fixed on version 1.4.4.
This version includes changes that make Elixir fully compatible with Erlang OTP 20-rc.1.
1. Enhancements
Elixir
- [Kernel] Improve compilation time for modules with many clauses
- [Map] Warn when attempting to override
__struct__key - [Regex] Add
recompile/1andrecompile!/1to ease transition to OTP 20 for archives and stored regexes
Logger
- [Logger.Translator] Handle OTP 20 GenServer log messages
Mix
- [mix compile] Recompile projects if OTP version changes
2. Bug fixes
Elixir
- [Kernel] Fix code generation when non-binary bitstrings are in AST
- [Record] Properly escape fields passed to
defrecord
ExUnit
- [ExUnit.Diff] Do not fail when comparing maps with nil or boolean keys
IEx
- [IEx.Helpers] Do not log exits on
IEx.Helpers.c/2failures
Mix
- [mix archive.install] Detect proper path on URLs with query strings
- [mix loadpaths] Do not assume all paths in loadpaths exist
v1.4.2
1. Bug fixes
EEx
- [EEx] Support middle expressions on trim mode
Elixir
- [Calendar] Correct typo on Calendar types
- [Kernel] Ensure redefined functions point to the proper source
- [OptionParser] Add
:allow_nonexistent_atomsto support unsafe behaviour prior to v1.4 - [Stream] Allow consuming multiple items from suspended enumerable in
Stream.transform/3 - [String] Incorporate new grapheme rules in Unicode 9
IEx
- [IEx.Autocomplete] Do not crash on aliases which are not known at compile time
Mix
- [Mix.Umbrella] Ensure umbrella projects can depend on other umbrella projects
- [Mix.Archive] Ensure previous archives with
.ezextension are deleted
v1.4.1
1. Bug fixes
Elixir
- [Kernel] Remove warning when making private functions overridable
- [Path] Ensure
Path.join/1returns strings for lists of one element - [Regex] Ensure
Regex.escape/1also escapes-
IEx
- [IEx] Disable ANSI detection for powershell to avoid false positives
Mix
- [Mix.Make] Run
make cleanforerlang.mk - [Mix.Rebar] Support all of rebar3 dependency package declaration
- [Mix.Rebar] Only pass overrides from parent to child in Rebar dep
v1.4.0
Official announcement: https://elixir-lang.org/blog/2017/01/05/elixir-v1-4-0-released/
1. Enhancements
Elixir
- [Calendar] Add
Date.compare/2,Time.compare/2,NaiveDateTime.compare/2andDateTime.compare/2 - [Calendar] Support
NaiveDateTime.add/3andNaiveDateTime.diff/3for adding seconds (up to microseconds) as well as the difference between two NaiveDateTimes in seconds (up to microseconds) - [Calendar] Add
Date.leap_year?/1andDate.day_of_week/1 - [Calendar] Ensure
Date,TimeandNaiveDateTimeAPIs work with any struct that provides the same set of fields as their respective struct. For example, aNaiveDateTimecan be given toDatesince it contains a superset of the fields in theDatestruct - [Enum] Add
Enum.map_every/2that invokes the given function with every nth item - [Enum] Add
min/2,max/2,min_max/2,min_by/3,max_by/3, andmin_max_by/3that allow a function specifying the default value when the enumerable is empty - [Enum] Introduce
Enum.zip/1to zip multiple entries at once - [Float] Introduce
Float.ratio/1that returns a tuple with the numerator and denominator as integers to retrieve the given float - [GenServer] Log warn on default
handle_info/2implementation - [Inspect] Support syntax coloring via the
:syntax_coloroption - [Integer]
Integer.digits/2now accepts negative integers - [Integer] Add
Integer.mod/2andInteger.floor_div/2 - [IO] Add
:labeloption toIO.inspect/2to help distinguish multipleIO.inspect/2calls. - [Kernel] Recognize merge conflict markers in source and provide a readable error message
- [Kernel] Warn on unused module attributes
- [Kernel] Improve compiler message on unexpected end of line
- [Kernel] Raise
BadBooleanErrorwhen a non-boolean is given on the left-hand side ofand/or - [List] Add
List.pop_at/3 - [List] Add
List.myers_difference/2 - [OptionParser] Expand multi-letter aliases in
OptionParser - [Process] Add
Process.send_after/4 - [Process] Improve error messages on
Process.register/2errors - [Registry] Add a local, decentralized and scalable key-value process storage
- [Stream] Add
Stream.map_every/2that invokes the given function with every nth item - [Stream] Introduce
Stream.zip/1to lazily zip multiple entries at once - [String] Update to Unicode 9.0.0
- [Task] Add
Task.async_stream/3andTask.async_stream/5as well as the supervised versionsTask.Supervisor.async_stream/4andTask.Supervisor.async_stream/6 - [URI] Allow 0 as URI scheme default port
ExUnit
- [ExUnit.Diff] Use red or green background for whitespace-only diffs
- [ExUnit.Doctest] Allow inspected structures with multiples lines and unicode characters in the doctest result
- [ExUnit.Formatter] Replace lhs/rhs with left/right in the formatter for clarity
IEx
- [IEx.Autocomplete] Stop appending a trailing dot when autocompleting modules in IEx
- [IEx.Autocomplete] Support autocompletion for structs
- [IEx.Autocomplete] Improve IEx autocomplete to support navigating map atom keys
- [IEx.Helpers]
c/1now compiles in memory by default to avoid common issue where.beamfiles remain at projects root directory - [IEx.Helpers] Add info about protocols in
i/1 - [IEx.Server] Support interrupting IEx evaluation through the Ctrl+G prompt
Mix
- [mix archive] Compress archive files built by
mix archiveas they are now unzipped during installation - [mix archive] Install from SCM
- [mix compile] Automatically infer the list of applications for Mix projects
- [mix cmd] Add the ability to specify one or more apps in
mix cmd - [mix deps] Warn if there are non-applications in the
appsdirectory for umbrella projects - [mix deps] Add warning for invalid paths on
mix deps.clean - [mix deps] Add
Mix.Project.apps_pathsthat returns the paths to children applications in umbrella projects - [mix deps] Add
MIX_REBARenvironment variable for overriding local rebar - [mix escript] Install from SCM
- [mix new] Check directory existence in
mix newand ask how to proceed if one exists - [mix new] Applications built with the
--supflag now have an individual module to work as application callback - [mix test] Add
--formatteroption tomix test - [mix xref] Provide "did you mean?" suggestions for
mix xref
2. Bug fixes
Elixir
- [Access] Do not accept nils in
Access.key/1andAccess.key/2in favor of explicit default values (or Access.key!/1 if you expect the key to always be available) - [Float] Avoid multiple roundings in
Float.ceil/2,Float.floor/2andFloat.round/2 - [Kernel] Don't crash in
macro_exported?/3when dealing with Erlang modules - [Kernel] Ensure locals calls are rewritten when calling a local function or macro from inside a module
- [Kernel] Annotate the context for variables as zero-arity funs in quotes
- [Kernel.SpecialForms] Ensure comprehensions with guards and filters keep proper ordering,
- [Kernel.SpecialForms] Produce meaningful warning when with's else clauses have no effect
- [Macro] Wrap fn calls in parens in
Macro.to_string/2 - [Macro] Do not print aliases as keys inside keyword lists in
Macro.to_string/2 - [OptionParser] Support options in
OptionParser.to_argv/2to ensure:countswitches are correctly encoded - [Stream] Ensure
Stream.take/2does not consume next element on:suspend - [String] Fix infinite recursion in
String.replace_leading/3andString.replace_trailing/3when given an empty string - [Task] Fix
Task.shutdown/1,2infinite block when task has no monitor - [Task] Ensure task cannot link after parents unlinks
ExUnit
- [ExUnit] Fix a race condition in
assert_receivewhere we would assert a message was not received but show it in the list of messages when the message is delivered right after the timeout value
IEx
- [IEx.Helpers] Purge consolidated protocols before and after
recompile/0
Mix
- [Mix.Dep] Use
gmakeon FreeBSD instead ofmakewhen compiling make dependencies - [Mix.Project] Only copy files from source when they're newer than destination (for Windows machines)
- [Mix.Task] Ensure non-recursive tasks inside umbrella are reenabled
3. Soft deprecations (no warnings emitted)
Elixir
- [Enum]
Enum.partition/2has been deprecated in favor ofEnum.split_with/2 - [System] Deprecate plural time units in favor of singular ones to align with future Erlang releases
ExUnit
- [ExUnit] Using GenEvent to implement ExUnit formatters is deprecated. Please use the new
GenServerbased formatters instead
4. Deprecations
Elixir
- [Access]
Access.key/1is deprecated due to erratic behaviour for missing keys, please use Access.key/2 instead with proper default values - [Behaviour] The
Behaviourmodule is deprecated. Callbacks may now be defined directly via the@callbackattribute - [Enum] Deprecate
Enum.uniq/2in favor ofEnum.uniq_by/2 - [Float]
Float.to_char_list/2andFloat.to_string/2are deprecated (use the :erlang functions if such conversions are desired) - [Kernel] Deprecate support for making private functions overridable. Overridable functions must always be public as they must be contracts
- [Kernel] Warn if variable is used as a function call
- [OptionParser] Deprecate aliases with multiple letters, such as
-abc - [Set] Deprecate the
Setmodule - [Stream] Deprecate
Stream.uniq/2in favor ofStream.uniq_by/2
IEx
- [IEx.Helpers]
import_file/2is deprecated in favor ofimport_file_if_available/1
Mix
- [Mix.Utils]
underscore/1andcamelize/1are deprecated
v1.4.0-rc.1
Release v1.4.0-rc.1
v1.4.0-rc.0
Release v1.4.0-rc.0
v1.3.4
1. Bug fixes
Elixir
- [Kernel] Ensure the compiler does not generate unecessary variable bindings inside case statements. This improves the code emitted and make sure "unused variable warnings" are not mistakenly silenced
- [Kernel] Move
raisechecks to runtime to avoid crashing cover on Erlang 19.1 - [Protocol] Do not emit warnings when using protocols on opaque types
ExUnit
- [ExUnit.CaptureLog] Flush Erlang's
:error_loggerbefore capturing to avoid mixed messages
v1.3.3
1. Enhancements
Elixir
- [DateTime] Support negative integer in
DateTime.from_unix/2 - [Kernel.LexicalTracker] Do not consider remote typespecs as a compile-time dependency
- [Kernel.ParallelCompiler] Do not emit deadlock messages when the process is waiting on itself
- [Kernel.Typespec] Mark struct update syntax as generated to avoid false positives from dialyzer
ExUnit
- [ExUnit] Make ExUnit server timeout configurable
Logger
- [Logger] Use
:ansi_colorif one is available in metadata
Mix
- [Mix] Add support for the
:sparseoption inMix.SCM.Git - [Mix] Skip dependendency loading if
MIX_NO_DEPSis set to1
2. Bug fixes
Elixir
- [System] Use
NULinstead of/dev/nullon Windows when buildingSystem.build_info
IEx
- [IEx.Autocomplete] Resolves issue with autocompletion on structs not working
Mix
- [Mix] Also store external resources that are not part of the current working directory in compilation manifest
- [Mix] Always include the compiled file source in manifests
v1.3.2
1. Enhancements
Elixir
- [Kernel] Support guards in
elseclauses inwith
Mix
- [Mix] Add
MIX_NO_DEPSenv var for disabling dep loading. Used for third-party scripts and tools like Nix package manager - [Mix] Add
mix test --listen-on-stdinthat automatically reruns tests on stdin - [Mix] Disable
--warnings-as-errorswhen compiling dependencies - [Mix] Add
--filteroption tomix deps.unlockto unlock only matching dependencies
2. Bug fixes
Elixir
- [Enum] Return
nilif enumerable halts inEnum.find_index/3 - [Kernel] Do not attempt to load modules that have not been required when invoking regular functions, otherwise this invalidates the
@compile {:autoload, false}directive.
Mix
- [Mix] Ensure missing protocol dependencies are discarded in umbrella projects with shared build
ExUnit
- [ExUnit.Diff] Ensure no leading or trailing when diffing some maps
v1.3.1
1. Enhancements
IEx
- [IEx.Helpers]
Add import_file_if_availablefor importing files only if they are available - [IEx.Helpers]
Add import_if_availablefor importing modules only if they are available
2. Bug fixes
Elixir
- [Kernel] Ensure structs can be expanded in dynamic module names
- [Kernel] Ensure aliases warnings are not accidentally discarded when the same module is imported
- [Kernel.ParallelCompiler] Ensure two modules with cyclic struct dependencies cannot run into a deadlock when compiling
- [Kernel.Typespec] Support module attributes in remote types
- [Module] Do not expect stacktraces to be always present when dispatching to locals during the module compilation
IEx
- [IEx.Helpers] Fix
hhelper for operators
Mix
- [Mix] Do not load modules for xref purposes, instead use BEAM info
- [Mix] Ensure
deps.checkdoes not check archives (that's done in loadpaths) - [Mix] Validate application properties before traversing them
- [Mix] Check for proper Makefile when compiling on Windows
- [Mix] Enforce space after comma in
mix do