chore(deps): update elixir docker tag to v1.14.3 #23
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/elixir-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.14.0
->1.14.3
1.14.0
->1.14.3
1.13.4-otp-24
->1.14.3
Release Notes
elixir-lang/elixir
v1.14.3
Compare Source
1. Enhancements
Elixir
ExUnit
2. Bug fixes
Elixir
Calendar.strftime/2
is_struct/2
guardsdefguard
expansiondefmodule
Macro.to_string/1
for large negative integers__ENV__
in macrosPath.wildcard/2
expands..
symlinks accordinglyRange.disjoint?/2
implementationExUnit
v1.14.2
Compare Source
1. Enhancements
Elixir
Code.eval_quoted_with_env/4
with support for the:prune_binding
optionExUnit
:doctest
and:doctest_line
as meta tagsExUnit.Formatter.format_assertion_diff/4
Mix
Mix.install/2
accepts atoms as paths2. Bug fixes
Elixir
size*unit
shortcut in bitstringdefguard
:for
in protocols with the appropriate envExUnit
ExUnit.run/1
Mix
v1.14.1
Compare Source
1. Enhancements
Elixir
Application.compile_env/3
inside module attributesMacro.expand_literals/2
andMacro.expand_literals/3
:close_stdin
toSystem.shell/2
Mix
--all-warnings
option2. Bug fixes
Elixir
:uniq
is given infor
comprehensions and the result is unused@enforce_keys
attribute afterdefstruct
declaration:debug_info
chunkMacro.to_string/2
when converting an AST with:erlang.binary_to_atom/2
String.split/3
andString.next_grapheme/1
returning invalid results on invalid UTF-8 encodingSystem.shell/2
uri.port
as:undefined
in certain cases inURI.new/1
ExUnit
:moduledoc
and functions are specified in:only
IEx
--no-pry
is givenMix
.formatter.exs
so they are properly re-evaluted on every callv1.14.0
Compare Source
Elixir v1.14 brings many improvements to the debugging experience in Elixir
and data-type inspection. It also includes a new abstraction for easy
partitioning of processes called
PartitionSupervisor
, as well as improvedcompilation times and error messages.
Elixir v1.14 is the last version to support Erlang/OTP 23. Consider updating
to Erlang/OTP 24 or Erlang/OTP 25.
dbg
Kernel.dbg/2
is a new macro that's somewhat similar toIO.inspect/2
, butspecifically tailored for debugging.
When called, it prints the value of whatever you pass to it, plus the debugged
code itself as well as its location. This code:
Prints this:
dbg/2
can do more. It's a macro, so it understands Elixir code. You can seethat when you pass a series of
|>
pipes to it.dbg/2
will print the valuefor every step of the pipeline. This code:
Prints this:
IEx and Prying
dbg/2
supports configurable backends. IEx automatically replaces the defaultbackend by one that halts the code execution with
IEx.Pry
, giving developersthe option to access local variables, imports, and more. This also works with
pipelines: if you pass a series of
|>
pipe calls todbg
(or pipe into it at theend, like
|> dbg()
), you'll be able to step through every line in the pipeline.You can keep the default behaviour by passing the
--no-pry
option to IEx.PartitionSupervisor
PartitionSupervisor
is a new module that implements a new supervisor type. Thepartition supervisor is designed to help with situations where you have a single
supervised process that becomes a bottleneck. If that process's state can be
easily partitioned, then you can use
PartitionSupervisor
to supervise multipleisolated copies of that process running concurrently, each assigned its own
partition.
For example, imagine you have an
ErrorReporter
process that you use to reporterrors to a monitoring service.
As the concurrency of your application goes up, the
ErrorReporter
processmight receive requests from many other processes and eventually become a
bottleneck. In a case like this, it could help to spin up multiple copies of the
ErrorReporter
process under aPartitionSupervisor
.The
PartitionSupervisor
will spin up a number of processes equal toSystem.schedulers_online()
by default (most often one per core). Now, whenrouting requests to
ErrorReporter
processes we can use a:via
tuple androute the requests through the partition supervisor.
Using
self()
as the partitioning key here means that the same process willalways report errors to the same
ErrorReporter
process, ensuring a form ofback-pressure. You can use any term as the partitioning key.
A Common Example
A common and practical example of a good use case for
PartitionSupervisor
ispartitioning something like a
DynamicSupervisor
. When starting many processesunder it, a dynamic supervisor can be a bottleneck, especially if said processes
take a long time to initialize. Instead of starting a single
DynamicSupervisor
,you can start multiple:
Now you start processes on the dynamic supervisor for the right partition.
For instance, you can partition by PID, like in the previous example:
Improved errors on binaries and evaluation
Erlang/OTP 25 improved errors on binary construction and evaluation. These improvements
apply to Elixir as well. Before v1.14, errors when constructing binaries would
often be hard-to-debug generic "argument errors". With Erlang/OTP 25 and Elixir v1.14,
more detail is provided for easier debugging. This work is part of EEP
54.
Before:
Now:
Slicing with steps
Elixir v1.12 introduced stepped ranges, which are ranges where you can
specify the "step":
Stepped ranges are particularly useful for numerical operations involving
vectors and matrices (see Nx, for example).
However, the Elixir standard library was not making use of stepped ranges in its
APIs. Elixir v1.14 starts to take advantage of steps with support for stepped
ranges in a couple of functions. One of them is
Enum.slice/2
:binary_slice/2
(andbinary_slice/3
for completeness) has been added to theKernel
module, that works with bytes and also support stepped ranges:Expression-based inspection and
Inspect
improvementsIn Elixir, it's conventional to implement the
Inspect
protocol for opaquestructs so that they're inspected with a special notation, resembling this:
This is generally done when the struct content or part of it is private and the
%name{...}
representation would reveal fields that are not part of the publicAPI.
The downside of the
#name<...>
convention is that the inspected output is notvalid Elixir code. For example, you cannot copy the inspected output and paste
it into an IEx session.
Elixir v1.14 changes the convention for some of the standard-library structs.
The
Inspect
implementation for those structs now returns a string with a validElixir expression that recreates the struct when evaluated. In the
MapSet
example above, this is what we have now:
The
MapSet.new/1
expression evaluates to exactly the struct that we'reinspecting. This allows us to hide the internals of
MapSet
, while keepingit as valid Elixir code. This expression-based inspection has been
implemented for
Version.Requirement
,MapSet
, andDate.Range
.Finally, we have improved the
Inspect
protocol for structs so thatfields are inspected in the order they are declared in
defstruct
.The option
:optional
has also been added when deriving theInspect
protocol, giving developers more control over the struct representation.
See the updated documentation for
Inspect
for a general rundown onthe approaches and options available.
1. Enhancements
EEx
<%!-- --%>
EEx.tokenize/2
Elixir
Access.slice/1
Application.compile_env/4
andApplication.compile_env!/3
to read the compile-time environment inside macrosDateTime.from_iso8601/2
day
/hour
/minute
onadd
/diff
across different calendar modules:normalize_bitstring_modifiers
toCode.format_string!/2
Code.compile_string/2
andCode.compile_quoted/2
Code.env_for_eval/1
andCode.eval_quoted_with_env/3
__MODULE__
in several functionsEnum.slice/2
dereference_symlinks: true
inFile.cp/3
andFile.cp_r/3
1.0e16
and the fractional value is precisely zeroFloat.min_finite/0
andFloat.max_finite/0
Inspect
protocol:optional
when deriving the Inspect protocol for hiding fields that match their default valuedefstruct
Date.Range
,MapSet
, andVersion.Requirement
Macro.Env
and keywords as stacktrace definitions inIO.warn/2
IO.ANSI.syntax_colors/0
and related configuration to be shared across IEx anddbg
dbg/0-2
macro..
as a nullary operator that returns0..-1//1
binary_slice/2
andbinary_slice/3
generated: true
annotations on macro expansionKeyword.from_keys/2
andKeyword.replace_lazy/3
List.keysort/3
with support for asorter
functionMacro.classify_atom/1
andMacro.inspect_atom/2
Macro.expand_literal/2
andMacro.path/2
Macro.Env.prune_compile_info/1
Map.from_keys/2
andMap.replace_lazy/3
MapSet.filter/2
,MapSet.reject/2
, andMapSet.symmetric_difference/2
Node.spawn_monitor/2
andNode.spawn_monitor/4
@after_verify
attribute for executing code whenever a module is verifiedPartitionSupervisor
that starts multiple isolated partitions of the same child for scalabilityPath.safe_relative/1
andPath.safe_relative_to/2
Registry.count_select/2
Stream.duplicate/2
andStream.transform/5
String.replace/3
,String.split/3
, andString.splitter/3
String.slice/2
:zip_input_on_exit
option toTask.async_stream/3
:mfa
in theTask
struct for reflection purposesURI.append_query/2
Version.to_string/1
Version.Requirement
source in theInspect
protocolExUnit
ExUnit.Callbacks.start_link_supervised!/2
ExUnit.run/1
to rerun test modulesIEx
--dot-iex
line by line::
inside<<...>>
)pid/1
h/1
Logger
Logger.put_process_level/2
Mix
:config_path
and:lockfile
options toMix.install/2
--no-optional-deps
to skip optional dependencies to test compilation works without optional dependenciesMix.Dep.Converger
now tells which deps formed a cycle--app
option to restrict recursive tasks in umbrella projects+
as a task separator instead of commamix format -
when reading from stdinmix format
plugins are missing:runtime_config_path
acceptfalse
to skip theconfig/runtime.exs
:test_elixirc_options
and default to not generating docs nor debug info chunk for tests--group
flag inmix xref graph
2. Bug fixes
Elixir
Calendar.strftime/3
--rpc-eval
usage__exception__
field astrue
when expanding exceptions in typespecsTrue
,False
, andNil
aliases are used@derive
attributesdefimpl :for
Regex.compile/2
System.fetch_env!/1
to mirror map operationsExUnit
tmp_dir
in ExUnit to avoid test name collisioncapture_log
)ExUnit.after_suite/1
callback even when no tests runsetup
with imported function from withindescribe
failed to compileIEx
exports/1
in IEx for long function namesMix
--warnings-as-errors
when used with--all-warnings
mix format
RELEASE_MODE
afterenv.{sh,bat}
are executedmix xref trace
runtime: false
onMix.install/2
3. Soft deprecations (no warnings emitted)
Elixir
File.cp/3
andFile.cp_r/3
is deprecated.Instead pass the callback the
:on_conflict
key of a keyword listEEx
<%# ... %>
for comments is deprecated. Please use<% # ... %>
or the new multi-line comments with<%!-- ... --%>
Logger
Logger.enable/1
andLogger.disable/1
in favor ofLogger.put_process_level/2
Mix
--app
option inmix cmd CMD
is deprecated in favor of the more efficientmix do --app app cmd CMD
4. Hard deprecations
Elixir
Application.get_env/3
and friends in the module body is now discouraged, useApplication.compile_env/3
insteaduse Bitwise
is deprecated, useimport Bitwise
instead~~~
is deprecated in favor ofbnot
for clarity:each_cycle
is deprecated, return a{:compile | :runtime, modules, warnings}
tuple instead<|>
to avoid ambiguity with upcoming extended numerical operatorsString.starts_with?/2
Logger
$levelpad
on message formattingMix
Mix.Tasks.Xref.calls/1
is deprecated in favor of compilation tracers5. Backwards incompatible changes
Mix
v1.13.4
Compare Source
This release has been verified to work with Erlang/OTP 25 RC2.
1. Enhancements
Elixir
2. Bug fixes
Elixir
require
Registry
send work with named triplets3. Deprecations
Mix
Checksums
325fbdd
2ae1b2e
v1.13.4-otp-25
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.
f2a76e15fc
to19c5ed65d9