v1.12.0
Announcement: https://elixir-lang.org/blog/2021/05/19/elixir-v1-12-0-released/
1. Enhancements
EEx
- [EEx.Engine] Add c:EEx.Engine.handle_text/3callback that receives text metadata
- [EEx.Engine] Emit warnings for unused "do" expression in EEx
Elixir
- [Code] Add Code.cursor_context/2to return the context of a code snippet
- [Code] Do not add newlines around interpolation on code formatting. Note this means formatted code that has interpolation after the line length on Elixir v1.12 won't be considered as formatted on earlier Elixir versions
- [Code] Do not add brackets when keywords is used in the access syntax
- [Calendar] Support basic datetime format in Calendar.ISOparsing functions
- [Code] Improve evaluation performance on systems running on Erlang/OTP 24+
- [Date] Support steps via Date.range/3
- [DateTime] Add offsettoDateTime.to_iso8601/2(nowto_iso8601/3)
- [Enum] Add Enum.count_until/2andEnum.count_until/3
- [Enum] Add Enum.product/1
- [Enum] Add Enum.zip_with/2,Enum.zip_with/3,Enum.zip_reduce/3, andEnum.zip_reduce/4
- [Enum] Add support for functions as the second argument of Enum.with_index/2
- [Exception] Show error_infodata for exceptions coming from Erlang
- [Float] Add Float.pow/2
- [Integer] Add Integer.pow/2andInteger.extended_gcd/2
- [IO] Add IO.stream/0andIO.binstream/0which default to STDIO with line orientation
- [List] Add default value for List.first/1andList.last/1
- [Kernel] Add first..last//stepas support for stepped ranges
- [Kernel] Also warn for literal structs on min/2andmax/2
- [Kernel] Add Kernel.tap/2andKernel.then/2
- [Kernel] Do not add runtime dependencies to remotes in typespecs
- [Kernel] When there is an unused variable warning and there is a variable with the same name previously defined, suggest the user may have wanted to use the pin operator
- [Kernel] Improve error messages on invalid character right after a number
- [Kernel] Show removal and deprecated tips from Erlang/OTP
- [Macro] Add export dependencies on Macro.struct!/2
- [Macro] Support :newlineto customize newlines escaping inMacro.unescape_string/2
- [Module] Raise on invalid @dialyzerattributes
- [Module] Add Module.get_definition/2andModule.delete_definition/2
- [Module] Allow @on_loadto be a private function
- [Module] Validate @dialyzerrelated module attributes
- [Module] Add Module.reserved_attributes/0to list all reserved attributes by the language
- [Range] Add Range.new/3andRange.size/1
- [Regex] Add offset option to Regex.scan/3andRegex.run/3
- [Registry] Support :compressiononRegistrytables
- [Registry] Support Registry.values/3for reading values under a given key-pid pair
- [Stream] Add Stream.zip_with/2andStream.zip_with/3
- [String] Add :turkicmode option to String case functions
- [String] Update to Unicode 13.0
- [System] Add System.trap_signal/3andSystem.untrap_signal/2
- [System] Add System.shell/2to invoke a command that is interpreted by the shell
- [Tuple] Add Tuple.sum/1andTuple.product/1
- [URI] Support RFC3986 compliant encoding and decoding of queries via the :rfc3986option
ExUnit
- [ExUnit] Intercept SIGQUIT (via Ctrl+\) and show a list of all aborted tests as well as intermediate test results
- [ExUnit] Interpolate module attributes in match assertions diffs
- [ExUnit] Print how much time is spent on asyncvssynctests
- [ExUnit] Improve error messages for doctests
- [ExUnit] Compile doctests faster (often by two times)
- [ExUnit] Add ExUnit.async_run/0andExUnit.await_run/1
IEx
- [IEx] Make IEx' parser configurable to allow special commands
- [IEx] Show function signature when pressing tab after the opening parens of a function
- [IEx] If an IEx expression starts with a binary operator, such as |>, automatically pipe in the result of the last expression
Mix
- [Mix] Add Mix.install/2for dynamically installing a list of dependencies
- [Mix] Support :exit_codeoption inMix.raise/2
- [Mix] Discard MIX_ENVandMIX_TARGETvalues if they are empty strings
- [Mix] Print the time taken to execute a task with on MIX_DEBUG=1
- [mix compile.erlang] Compile multiple files in parallel
- [mix escript.build] Deep merge configuration and ensure argv is set when executing config/runtime.exs
- [mix release] Add RELEASE_PROGto releases with the name of the executable starting the release
- [mix release] Support remote.vm.argsto customize how the connecting VM boots
- [mix test] Run all available tests if there are no pending --failedtests. This provides a better workflow as you no longer need to toggle the--failedflag between runs
2. Bug fixes
Elixir
- [CLI] Ensure -e ""(with an empty string) parses correctly on Windows
- [Inspect] Do not override user supplied :limitoption for derived implementations
- [Kernel] Allow heredoc inside a heredoc interpolation
- [Kernel] Preserve CRLF on heredocs
- [Kernel] Public functions without documentation now appear as an empty map on Code.fetch_docs/1, unless they start with underscore, where they remain as:none. This aligns Elixir's implementation with EEP48
- [Kernel] Do not crash when complex literals (binaries and maps) are used in guards
- [Kernel] Properly parse keywords (such as end) followed by the::operator
- [Kernel] Do not ignore unimplemented signatures from generated functions
- [Kernel] Improve error message when an expression follows a keyword list without brackets
- [Macro] Macro.decompose_call/1now also consider tuples with more than 2 elements to not be valid calls
- [Macro] Fix Macro.to_string/1double-escaping of escape characters in sigils
- [Macro] Fix Macro.underscore/1on digits preceded by capitals: "FOO10" now becomes "foo10" instead of "fo_o10"
- [Macro] Preserve underscores between digits on Macro.underscore/1
- [OptionParser] Properly parse when numbers follow-up aliases, for example, -ab3is now parsed as-a -b 3
- [Path] Fix Path.relative_to/2when referencing self
- [Path] Do not crash when a volume is given to Path.absname/1, such as "c:"
- [Task] Ensure Task.async_stream/2withordered: falsediscard results as they are emitted, instead of needlessly accumulating inside the stream manager
- [Task] Raise if :max_concurrencyis set to 0 on streaming operations
- [URI] Do not discard empty paths on URI.merge/2
ExUnit
- [ExUnit.Case] Make @tag tmp_diran absolute directory, avoiding inconsistencies if the test changes the current working directory
- [ExUnit.Diff] Fix cases where the diffing algorithm would fail to print a pattern correct
IEx
- [IEx] Fix auto-completion inside remote shells
Mix
- [mix app.config] Do not emit false positive warnings when configured dependencies that have runtime: falseset
- [mix compile.elixir] Ensure that a manifest is generated even with no source code
- [mix compile.elixir] Make sure export dependencies trigger recompilation when the dependency is removed as well as when the whole file is removed
- [mix compile.elixir] Do not emit false positive warnings when a path dependency adds a module that is then used by the current application in the same mix compilecycle
- [mix test] Ensure protocols within the current project are consolidated when --coveris given
- [mix release] Improve compliance of release scripts with stripped down Linux installations
- [mix release] Preserve file mode when copying non-beam ebin files
- [mix xref] Ensure args are passed to the underlying mix compilecall
3. Soft-deprecations (no warnings emitted)
Elixir
- [Kernel] Using first..lastto match on ranges is soft-deprecated and will warn on future Elixir versions. Usefirst..last//stepinstead
- [Kernel] Using first..lastto create decreasing ranges is soft-deprecated and will warn on future versions. Usefirst..last//-1instead
4. Hard-deprecations
EEx
- [EEx.Engine] use EEx.Engineis deprecated in favor of explicit delegation
Elixir
- [Kernel] The binary operator ^^^is deprecated. If you are usingBitwise.^^^/2, useBitwise.bxor/2instead
- [Kernel] Deprecate @foo()in favor of@foo
- [System] Deprecate System.stacktrace/0(it was already deprecated outside of catch/rescue and now it is deprecated everywhere)
Mix
- [mix compile] The :xrefcompiler is deprecated and it has no effect. Please remove it from your mix.exs file.
Checksums
- Precompiled.zip SHA1: b607b2d0e78e1ae6f9d112ba3e1b617a1ee7580b
- Precompiled.zip SHA512: 57e970640f7e273a62fbde60545ed85c18d667e194d0d3483b941ea3164f12664cc0c186968c1f341253f1907157ae88953b5caa413204f93bba08710fdc0b50
- Docs.zip SHA1: fbf8939ea56f3cdda90ee04680fdc43f7b1d41e2
- Docs.zip SHA512: c06ee0a72cbb4cc138a11b1acee14efde2cc2c7de5a121ee386c9a9ba583ccc10dd8b5ebc29cbf89bd9da8c091868d8fdd4b148bfa6fa564dc033449700d0b08