v1.21.0-dev
1. Enhancements
EEx
- [EEx] Support splitting middle expressions across EEx clauses
Elixir
- [Access] Add support for keyword lists in
Access.key/2andAccess.key!/1 - [Code] Add
:purgeand:purge_allcompilation tracer events - [Code] Add support for the
:erlc_optionscompiler option - [Code.Formatter] Add a
:migrate_atom_interpolationsoption - [File] Accept an open IO device in
File.stat/2,File.stat!/2,File.regular?/2,File.dir?/2, andFile.exists?/2 - [IO.ANSI] Add
bold/0,bold_off/0,dim/0,dim_off/0,blink/0,invisible/0,invisible_off/0,strikethrough/0,strikethrough_off/0,italic_off/0,underline_off/0,overline/0,overline_off/0,cursor_forward/0,cursor_backward/0, andcursor_home/0, aligning names with Erlang/OTP - [Kernel] Improve performance of type constructors and complex intersections
- [Kernel] Warn on aliases that are never used because a later alias shadows them
- [Kernel] Warn on binary patterns with segments that are not byte-aligned
- [Kernel.ParallelCompiler] Add a hint when spawned processes cannot load modules defined during compilation
- [Keyword] Optimize
Keyword.pop/3,Keyword.pop!/2, andKeyword.pop_lazy/3 - [List] Add
List.to_existing_atom/2andList.to_unsafe_atom/1 - [MapSet] Optimize
MapSet.symmetric_difference/2when set sizes differ - [Path] Add
Path.safe_join/2 - [Protocol] Add the
:skip_consolidatedoption toProtocol.extract_protocols/2 - [Protocol] Warn when implementing a protocol for a module that does not define a struct
- [Registry] Add the
:spawn_optoption toRegistry.start_link/1 - [Registry] Optimize exact key matching in lookups
- [String] Optimize
String.bag_distance/2 - [String] Add
String.to_existing_atom/2andString.to_unsafe_atom/1 - [URI] Optimize percent-decoding and
URI.to_string/1
ExUnit
- [ExUnit.Assertions] Add
trace/3helper - [ExUnit.CLIFormatter] Improve rendering of test locations in some terminals
Mix
- [mix test] Add
--coverage-formatto emit coverage reports ashtml(the default) ortext
2. Bug fixes
Elixir
- [bin/elixirc] Fail compilation on warnings when
--warnings-as-errorsis given - [Calendar] Fix
Calendar.strftime/3formatting of negative years with%y - [Calendar] Fix rounding for
:day,:hour, and:minuteunits inDateTime.diff/3,NaiveDateTime.diff/3, andTime.diff/3 - [Calendar.ISO] Fix
Calendar.ISO.valid_time?/4to reject non-integer microsecond precision - [Calendar.ISO] Reject negative zero UTC offsets in basic formats
- [Code.Formatter] Fix rendering calls where
dois followed by non-block keyword arguments - [Code.Formatter] Keep comments written after do-end block keywords (such as
rescueandafter) or after the right side of an operator close to where they were written, instead of moving them before the whole expression - [Code.Formatter] Keep parentheses on anonymous function calls with do-end blocks
- [Code.Formatter] Keep parentheses on unary operators on the left side of
in, such as(!foo) in bar - [Code.Fragment] Fix cursor completion when operator keywords such as
in,when,and,or, andnotfollow another operator - [Code.Fragment] Respect the
:file,:line, and:columnoptions inCode.Fragment.container_cursor_to_quoted/2 - [Date] Preserve the
:formatoption inDate.to_iso8601/2with custom calendars - [Date.Range] Fix slicing date ranges with stepped ranges
- [DateTime] Keep the calendar of the given map in
DateTime.convert/2andDateTime.truncate/2 - [DateTime] Truncate fractional differences towards zero in
DateTime.diff/3 - [Duration] Reject duplicate seconds in
Duration.from_iso8601/1 - [DynamicSupervisor] Do not discard the exit reason of children that terminate during shutdown
- [Enum] Fix
Enum.min/2,3andEnum.max/2,3with custom sorters on ranges - [File] Trim UTF-32 LE BOMs in
File.stream!/3 - [IO.ANSI.Docs] Do not crash on unclosed HTML comments
- [IO.ANSI.Docs] Recognize additional punctuation delimiters when rendering Markdown
- [Kernel] Continue compilation after reporting repeated map keys in patterns
- [Kernel] Do not consider local functions invoked in bitstring size expressions inside macros as unused
- [Kernel] Do not crash on invalid number specifiers in bitstrings inside functions
- [Kernel] Fix expansion of rebound variables in bitstring size expressions
- [Kernel] Expand
defguardmacros separately in guard and body contexts, preservingand/orerror semantics outside guards - [Kernel] Fix inferred stacktrace types to allow arbitrary keyword metadata
- [Kernel] Fix inferred types for functions with non-returning clauses
- [Kernel] Fix map field type inference in the presence of empty map types
- [Kernel] Fix tuple fetch and deletion type operations across equivalent tuple types
- [Kernel] Fix type checking of map updates with keys that span several domains
- [Kernel] Fix variables defined in one default argument leaking into subsequent default arguments
- [Kernel] Follow UAX #9 levels when computing the bidi skeleton of confusable identifiers
- [Kernel] Improve the error message for non-atom struct keys
- [Kernel] Raise when
|is used in guards - [Kernel] Raise on duplicate keys in
@enforce_keys - [Kernel] Fix parsing precedence of unary operators applied to do-end blocks, such as
!if a do b end || c - [Kernel] Do not accept empty tuples in
elem/2and other tuple operations during type checking - [Kernel] Fix inferred types of comprehensions using
:intowith binaries and bitstrings - [Kernel] Fix type checker crash on functions with impossible clauses
- [Kernel] Fix type checker crash on
defimplfor modules that are not Elixir structs - [Kernel] Fix unsound type refinement of
min/2andmax/2arguments - [Kernel] Improve type precision of
--/2 - [Kernel] Improve type precision of
casewhen some of its clauses always raise - [Kernel] Make pin patterns with singleton types precise, so subsequent redundant clauses are detected
- [Kernel] Report applying empty function types as bad functions instead of bad arities
- [Kernel] Support Erlang modules in
import Mod, only: :sigils - [Keyword] Delete duplicate keys when
Keyword.get_and_update/3andKeyword.get_and_update!/3return:pop - [Macro] Properly escape C1 control characters and Unicode noncharacters
- [Macro] Respect the disabled ANSI setting in
Macro.dbg/3 - [Macro] Return
truefromMacro.quoted_literal?/1for literals wrapped in__block__ - [Macro] Return valid AST from
Macro.pipe/3when piping intoAccess.get/3 - [NaiveDateTime] Fix
NaiveDateTime.diff/3over-counting incomplete units - [OptionParser] Report missing and invalid arguments for switches with
:keep - [Range] Fix
Range.disjoint?/2for ranges beyond floating-point precision - [Range] Fix
Range.disjoint?/2for single-element ranges with a negative step - [Regex] Escape U+0085, U+200E, U+200F, U+2028, and U+2029 in
Regex.escape/1, as Erlang/OTP 28+ ignores them in extended mode - [String] Fix
String.reverse/1grapheme ordering around invalid UTF-8 bytes - [String] Return
1.0fromString.bag_distance/2for two empty strings - [Time] Validate microseconds in
Time.from_seconds_after_midnight/3
ExUnit
- [ExUnit.Assertions] Fix
refute_in_delta/4at the delta boundary and with negative deltas - [ExUnit.Assertions] Support list literals in
catch_throw/1,catch_exit/1, andcatch_error/1 - [ExUnit.CaptureIO] Close the capture device when
capture_iofails to set the group leader - [ExUnit.CaptureIO] Stop
StringIOprocesses when capturing a named device fails - [ExUnit.CLIFormatter] Color the summary yellow only when all tests are excluded
- [ExUnit.CLIFormatter] Report failures whose messages contain invalid UTF-8
- [ExUnit.DocTest] Fix line numbers in
doctest_file/2failures - [ExUnit.DocTest] Fix the expected line in doctests with multi-line expressions
- [ExUnit.FailuresManifest] Do not overlap failures of sibling parameterized tests
- [ExUnit.Filters] Warn on invalid line filters instead of raising in
ExUnit.Filters.parse/1 - [ExUnit.Runner] Do not count excluded tests towards
--max-failuresonsetup_allfailures - [ExUnit.Runner] Do not leak monitor messages when the test supervisor times out on shutdown
- [ExUnit.Runner] Give each parameter set of parameterized tests its own random seed
- [ExUnit.Runner] List tests in execution order with
--dry-run - [ExUnit.Runner] Preserve the order of async modules across
--repeat-until-failureruns - [ExUnit.Runner] Record tests invalidated by module failures as failures in the failures manifest
IEx
- [IEx.Autocomplete] Do not crash when the shell has no evaluator, such as while it restarts
- [IEx.Autocomplete] Fix completion crashes on maps with non-atom keys
- [IEx.Autocomplete] Do not split Unicode codepoints when completing map keys
- [IEx.Evaluator] Recognize
**andnot inas continuation operators - [IEx.Helpers] Do not crash
process_info/1on processes monitoring others by name - [IEx.Helpers] Fix
r/1when multiple modules are defined in the same file - [IEx.Helpers] Fix heap and stack memory calculations in
process_info/1 - [IEx.Helpers] Fix showing macro specs in
h/1 - [IEx.Helpers] Shell-quote file paths given to the editor in
open/1
Logger
- [Logger] Restore the Erlang default handler when the
:loggerapplication stops - [Logger.Backends] Do not remove the backends handler when formatting an event crashes, such as on a raising
:report_cb - [Logger.Backends] Support all handler configuration changes, such as
:logger.set_handler_config/3, in the backends handler - [Logger.Formatter] Prune surrogate code points in
Logger.Formatter.prune/1
Mix
- [Mix] Ensure the lock and pubsub directories in the system tmp directory are owned by the current user
- [Mix.Generator] Support iodata contents in
create_file/3with:format_elixir - [Mix.Rebar] Handle empty refs and charlist sparse directories in rebar Git dependencies
- [Mix.SCM.Git] Raise if Git refspecs start with
- - [mix cmd] Exit with the status of the failing command
- [mix compile] Compile optional dependencies that non-optional dependencies require when
--no-optional-depsis given - [mix compile.elixir] Recompile the project when
--docsor--debug-infochange - [mix deps] Recompile path and fetchable dependencies when one of the dependencies they were compiled with is removed
- [mix deps] Mark fetchable dependencies for compilation when their build exists but their SCM manifest is missing
- [mix deps.compile] Preserve code paths and compiler options across OS partitions
- [mix escript.install] Respect the
:pathescript option and raise on URLs without a path - [mix format] Invalidate the cached configuration when imported
.formatter.exsfiles change - [mix format] Pass
:sigilsto plugins invoked for sigils, allowing nested sigils to be formatted - [mix local.hex] Install Hex with
--if-missingwhen the installed version is older than the requested one - [mix new] Avoid trailing whitespace in generated files
- [mix profile.tprof] Forward script arguments
- [mix release] Keep
:ertsin the release applications - [mix test] Do not crash the coverage summary when there are no modules
- [mix test] Do not let the coverage threshold override the exit status of test failures
3. Hard deprecations
Elixir
- [Macro.Env]
Macro.Env.fetch_alias/2andMacro.Env.fetch_macro_alias/2are deprecated, useMacro.Env.expand_alias/4instead - [Path]
Path.safe_relative_to/2is deprecated, usePath.safe_relative/2instead
Mix
- [mix compile.elixir]
--traceris deprecated, set:tracersin:elixirc_optionsor useCode.put_compiler_option/2instead
4. Soft deprecations
Elixir
- [IO.ANSI]
blink_slow/0,conceal/0,crossed_out/0,cursor_left/0,cursor_right/0,home/0,no_underline/0,not_crossed_out/0,not_italic/0,not_overlined/0,overlined/0,reveal/0,reverse/0, andreverse_off/0are deprecated in favor of the names aligned with Erlang/OTP - [Kernel] Atom interpolation (
:"foo_#{bar}") is deprecated in favor of explicitString.to_unsafe_atom/1 - [List]
List.to_atom/1is deprecated in favor ofList.to_unsafe_atom/1 - [String]
String.to_atom/1is deprecated in favor ofString.to_unsafe_atom/1
v1.20
The CHANGELOG for v1.20 releases can be found in the v1.20 branch.