forked from danhper/opencov
-
Notifications
You must be signed in to change notification settings - Fork 1
chore(deps): update dependency elixir to v1.19.2 #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/elixir-1.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6a6daab to
61d9532
Compare
61d9532 to
d59938e
Compare
d59938e to
e39bf7f
Compare
e39bf7f to
d08b259
Compare
d08b259 to
13e23ff
Compare
13e23ff to
e52c2d0
Compare
e52c2d0 to
8b69ae5
Compare
8b69ae5 to
aeda573
Compare
aeda573 to
f14b298
Compare
f14b298 to
4495db9
Compare
4495db9 to
6d1a3a7
Compare
6d1a3a7 to
fd9227d
Compare
fd9227d to
030c6cc
Compare
030c6cc to
048da4d
Compare
048da4d to
fd25d77
Compare
fd25d77 to
5736f8d
Compare
5736f8d to
b6fdfb3
Compare
b6fdfb3 to
ede4633
Compare
ede4633 to
b058fe1
Compare
b058fe1 to
25f5191
Compare
25f5191 to
c7e40d3
Compare
c7e40d3 to
2c6b988
Compare
2c6b988 to
676eb8a
Compare
676eb8a to
2911433
Compare
2911433 to
6982384
Compare
6982384 to
d5b3c37
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.13.2-otp-24->1.19.2Release Notes
elixir-lang/elixir (elixir)
v1.19.2Compare Source
1. Enhancements
Elixir
.beamfiles in the compilerMix
--no-check-cwdto skip compiler check to aid debugging2. Bug fixes
Elixir
IO.inspect :label~~~unary operatorLogger
Mix
elixirc_pathsis not a list of string pathsMIX_OS_DEPS_COMPILE_PARTITION_COUNTacrossmix escript.install,mix archive.install, and othersv1.19.1Compare Source
1. Bug fixes
EEx
EEx.compile_stringElixir
dbg/2Mix
v1.18.4Compare Source
This release includes initial support for Erlang/OTP 28, for those who want to try it out. In such cases, you may use Elixir v1.18.4 precompiled for Erlang/OTP 27, as it is binary compatible with Erlang/OTP 28. Note, however, that Erlang/OTP 28 no longer allows regexes to be defined in the module body and interpolated into an attribute. If you do this:
You must rewrite it to:
1. Enhancements
IEx
IEx.Helpers.process_info/1which prints process informationMix
--no-listenersoption--no-listenersoption2. Bug fixes
Elixir
@on_definitioncallbacks@on_loadcallbackssupercallselixir_erlMix
v1.18.3Compare Source
1. Enhancements
Elixir
<<_::3*8>>in typespecsMix
--no-listenersoption2. Bug fixes
Elixir
--no-colornot setting:ansi_enabledto falsenilStream.cycle/1is explicitly haltedExUnit
IEx
__MODULE__recompileif IEx is not runningv1.18.2Compare Source
1. Enhancements
Elixir
--color/--no-colorfor enabling and disabling of ANSI colorscontainer_cursor_to_quotedwith trailing fragmentsMix
2. Bug fixes
Elixir
elixir,elixirc, andmixon Windows, as they leave the shell broken after quitting ErlangExUnit
IEx
Mix
v1.18.1Compare Source
1. Enhancements
2. Bug fixes
Elixir
Code.Fragment.container_cursor_to_quoted/2with:trailing_fragmentparses expressions that were supported in previous versions@fileannotation@fileannotation:no_parensmetadata when using capture with arity on all casesExUnit
--repeat-until-failurecan be combined with groupsMix
--warnings-as-errorsv1.18.0Compare Source
Official announcement: https://elixir-lang.org/blog/2024/12/19/elixir-v1-18-0-released/
1. Enhancements
Elixir
elixir,elixirc, andmixon Windows. Those provide a safer entry point for running Elixir from other platformsDuration.to_string/1Code.format_string!/2--and---inCode.format_string!/2to make precedence clearerCode.string_to_quoted/2whentoken_metadata: trueto help compute ranges from the AST:capture_argas its own entry inCode.Fragment.surround_context/2Config.read_config/1Enum.product_by/2andEnum.sum_by/2MissingApplicationsErrorexception to denote missing applicationsJSONmodule with encoding and decoding functionalityJSON.Encoderfor all Calendar types_), such ashttp_сервер. Previously allowed highly restrictive identifiers, which mixed Latin and other scripts, such as the japanese word for t-shirt,Tシャツ, now require the underscore as wellelem/2unquoteandunquote_splicingto catch bugs earlierERL_COMPILER_OPTIONS=deterministic. Keep in mind deterministic builds strip source and other compile time information, which may be relevant for programsList.ends_with?/2dbghandling ofif/2,with/1and of code blocksMacro.struct_info!/2to return struct information mirroringmod.__info__(:struct)Registry.lock/3for local lockingPartitionSupervisor.resize!/2to resize the number of partitions in a supervisor (up to the limit it was started with)Process.sleep/1@undefined_impl_descriptionto customize error message when an implementation is undefined__deriving__/1as optional macro callback toProtocol, no longer requiring empty implementationsExUnit
ExUnit.Casetest_pidas a tagIEx
IEx.configure(auto_reload: true)to automatically pick up modules recompiled from other operating system processes:dot_iexsupport toIEx.configure/1Mix
mix format --migrateto migrate from deprecated functionality:listenersconfiguration to listen to compilation events from the current and other operating system processes2. Bug fixes
Elixir
Code.string_to_quoted/2next_break_fitsrespectsline_lengthunquoteandunquote_splicingto provide better error reports instead of failing too late inside the compilerStream.transform/5URI.merge/2ExUnit
assert/1with=IEx
IEx.Helpers.recompile/0will reload modules changed by other operating system processesMix
--all-warningswhen files do not changerebar3in some casesprivdirectories.appfiles deterministic in releasesMix.Shellon Windows when outputting non UTF-8 characters3. Soft deprecations (no warnings emitted)
Elixir
color/3is deprecated in favor ofcolor_doc/3fold_doc/2is deprecated in favor offold/2unlessin favor ofif. Usemix format --migrateto automate the migrationMacro.struct!/2is deprecated in favor ofMacro.struct_info!/2__deriving__/3inside theAnyimplementation is deprecated, derive it inside the protocol definition itself4. Hard deprecations
EEx
<%#is deprecated in favor of<%!--or<% #c:EEx.handle_text/2is deprecated in favor ofc:EEx.handle_text/3Elixir
:warnings_as_errorsis deprecated viaCode.put_compiler_option/2. This must not affect developers, as the:warnings_as_errorsoption is managed by Mix tasks, and not directly used via theCodemoduleEnumerable.slice/1List.zip/1is deprecated in favor ofEnum.zip/1Module.eval_quoted/3in favor ofCode.eval_quoted/3Range.new/2Tuple.append/2is deprecated, useTuple.insert_at/3insteadMix
mix cmd --app APPin favor ofmix do --app APP:warnings_as_errorsconfiguration in:elixirc_optionsis deprecated. Instead pass the--warnings-as-errorsflag tomix compile. Alternatively, you might alias the task:aliases: [compile: "compile --warnings-as-errors"]:warnings_as_errorsconfiguration in:test_elixirc_optionsis deprecated. Instead pass the--warnings-as-errorsflag tomix test. Alternatively, you might alias the task:aliases: [test: "test --warnings-as-errors"]compilers/0in favor ofMix.Task.Compiler.compilers/0v1.17
The CHANGELOG for v1.17 releases can be found in the v1.17 branch.
v1.17.3Compare Source
1. Bug fixes
Elixir
IEx
recompileMix
--labeloption on stats and cyclesv1.17.2Compare Source
1. Bug fixes
Logger
:gen_statem'sformat_status/2returns non-tupleMix
:refRELEASE_MODEand set ERRORLEVEL on.batscriptsv1.17.1Compare Source
1. Enhancements
Mix
2. Bug fixes
EEx
Elixir
with'selsepatternsno_returnfunctionExUnit
--repeat-until-failurev1.17.0Compare Source
Official announcement: https://elixir-lang.org/blog/2024/06/12/elixir-v1-17-0-released/
1. Enhancements
Elixir
Access.find/1that mirrorsEnum.find/2Code.Fragment.container_cursor_to_quoted/2Date.shift/2to shift dates with duration and calendar-specific semanticsDateto accept years outside of-9999..9999rangeDateTime.shift/2to shift datetimes with duration and calendar-specific semanticsDurationdata typec:GenServer.format_status/1callbackKernel.get_in/1with safe nil-handling for access and structsKernel.is_non_struct_map/1guardKernel.to_timeout/1Keyword.intersect/2-3to mirror theMapAPIMacro.Env.define_alias/4,Macro.Env.define_import/4,Macro.Env.define_require/4,Macro.Env.expand_alias/4,Macro.Env.expand_import/5, andMacro.Env.expand_require/6to aid the implementation of language servers and embedded languagesNaiveDateTime.shift/2to shift naive datetimes with duration and calendar-specific semanticsProcess.set_label/1String.byte_slice/3to slice a string to a maximum number of bytes while keeping it UTF-8 encodeduse_stdio: falseinSystem.cmd/3andSystem.shell/2Time.shift/2to shift times with duration and calendar-specific semanticsExUnit
start_supervisedIEx
recompilewas called and the current working directory changedc/0as an alias tocontinue/0IEx.Pry.annotate_quoted/3to annotate a quoted expression with pry breakpointsLogger
:gen_statemreports using Elixir data structuresMix
:depthoption toMix.SCM.Git, thus supporting shallow clones of Git dependencies:optionalis used in combination with:in_umbrella--umbrella-onlytomix deps.treemix test --breakpointsthat sets up a breakpoint before each test that will runmix test --repeat-until-failureto rerun tests until a failure occursmix test --slowest-modulesto print slowest modules based on all of the tests they hold2. Bug fixes
Elixir
(a -> b)were not wrapped as part of the literal encoder..and...are handled at the AST levelquote bind_quoted: ...twice:lineproperty when:fileis given as option toquoteMacro.escape/2when passing a quote triplet without valid metaModule.get_attribute/3for persisted attributes which have not yet been written toIEx
Mix
3. Soft deprecations (no warnings emitted)
Elixir
c:GenServer.format_status/2callback to align with Erlang/OTP 25+Mix
mix profile.tprofmix profile.tprof4. Hard deprecations
Elixir
:alltoIO.read/2andIO.binread/2is deprecated, pass:eofinstead~cinsteadleft..rightwithout explicit steps inside patterns and guards is deprecated, writeleft..right//stepinstead10..1without an explicit step is deprecated, write10..1//-1insteadExUnit
register_test/4is deprecated in favor ofregister_test/6for performance reasonsv1.16.3Compare Source
1. Bug fixes
Elixir
--dbgflag in Elixir's CLIwhenSystem.cmd/3:undefinedfields are properly converted tonilwhen invoking Erlang's APILogger
Mix
v1.16.2Compare Source
1. Enhancements
Elixir
:defmoduletracing event on module definitionMix
Mix.install_project_dir/0Mix.install/2installationMix.SCM.delete/12. Bug fixes
Elixir
Path.relative_to/2dealt with "." as inputIEx
ExUnit
v1.16.1Compare Source
1. Bug fixes
Elixir
Code.quoted_to_algebra/2for operator with :do key as operandString.capitalize/1with a single codepointIEx
$HOMEis setMix
v1.16.0Compare Source
Official announcement: https://elixir-lang.org/blog/2023/12/22/elixir-v1-16-0-released/
1. Enhancements
EEx
Elixir
:emit_warningsforCode.string_to_quoted/2MismatchedDelimiterErrorfor handling mismatched delimiter exceptions\r\n:offsetoption toFile.stream!/2UndefinedFunctionErrorKernel.ParallelCompiler.pmap/2to compile multiple additional entries in parallelTrue/False/Nilare used as aliases and there is no such aliasMacro.compile_apply/4@nifsannotation from Erlang/OTP 25@dialyzerconfigurationString.replace_invalid/2:limitoption toTask.yield_many/2Logger
Logger.levels/0Mix
MIX_PROFILEto profile a list of comma separated tasks--sparseoption:applicationsand:extra_applicationsare used:detailswhen possiblelib/and one of them is changed--sparseoptioninclude/directory in releasesmix test test/foo_test.exs:13 test/bar_test.exs:272. Bug fixes
Elixir
Code.Fragment.surround_context/2when matching on->IO.binwrite/2on terminated device (mirroringIO.write/2)dbgmodule is a compile-time dependencyunquote/1and the function/macro itself is unusedElixir.in their definition@after_compilecallbacks to avoid deadlocksMacro.to_string/1for certain ASTsFile.cwd!/0inPath.expand/1andPath.absname/1Path.relative_to/2returns a relative path when the given argument does not share a common prefix withcwdExUnit
IEx
Mix
mix archive.installmix escript.install3. Soft deprecations (no warnings emitted)
Elixir
File.stream!(file, options, line_or_bytes)in favor of keeping the options as last argument, as inFile.stream!(file, line_or_bytes, options)Kernel.ParallelCompiler.async/1in favor ofKernel.ParallelCompiler.pmap/2Path.safe_relative_to/2in favor ofPath.safe_relative/2Mix
Mix.Task.Compiler.Diagnostic4. Hard deprecations
Elixir
Date.range/3with a negative step insteadEnum.slice/2, givefirst..last//1instead~R/.../is deprecated in favor of~r/.../. This is because~R/.../still allowed escape codes, which did not fit the definition of uppercase sigilsString.slice/2, givefirst..last//1insteadExUnit
format_time/2, useformat_times/1insteadMix
:leexto be added as a compiler to run theleexcompiler:yeccto be added as a compiler to run theyecccompilerv1.15.8Compare Source
1. Bug fixes
Elixir
--dbgflag in Elixir's CLISystem.cmd/3:undefinedfields are properly converted tonilwhen invoking Erlang's APILogger
Mix
v1.15.7Compare Source
1. Enhancements
Elixir
2. Bug fixes
EEx
Mix
Mix.Tasks.Format.formatter_for_file/2v1.15.6Compare Source
This release also includes fixes to the Windows installer.
1. Bug fixes
EEx
Elixir
*in bitstringsCode.quoted_to_algebra/2Mix
:extra_applicationsdeclare in umbrella projects are loadedv1.15.5Compare Source
1. Enhancements
IEx
2. Bug fixes
Elixir
Code.Fragment.surround_context/2for aliases and submodules of non-aliasesExUnit
IEx
Mix
blakeis always availablev1.15.4Compare Source
1. Bug fixes
Mix
v1.15.3Compare Source
1. Enhancements
Elixir
Mix
Mix.install/22. Bug fixes
Elixir
with_diagnosticspropagate warnings from inner Erlang passesIEx
--remshon Erlang/OTP 25 and earlierMix
__mix_recompile__?callbacks are properly invokedv1.15.2Compare Source
1. Bug fixes
IEx
v1.15.1Compare Source
1. Enhancements
Code.string_to_quoted/2honors:static_atoms_encoderfor multi-letter sigils2. Bug fixes
ExUnit
capture_logcapture_logcallsIEx
pryworks on Erlang/OTP 25 and earlier while IEx is bootingCode.Fragment.surround_contextconsiders surround context around spaces and parensLogger
:functionas metadataMix
mtime was successfully retrieved
--werlfrom release scripts on Erlang/OTP 26v1.15.0Compare Source
Official announcement: https://elixir-lang.org/blog/2023/06/19/elixir-v1-15-0-released/
1. Enhancements
EEx
Elixir
%s) toCalendar.strftime/2Code.format_string!/2now converts'charlists'into~c"charlists"by default:on_undefined_variableto the compiler options to preserve the warning behaviour which was deprecated back in Elixir v1.4Code.loaded?/1andCode.ensure_all_loaded(!)/1Code.prepend_paths/1,Code.append_paths/1, andCode.delete_paths/1Code.with_diagnostics/2to return diagnostics when compiling and evaluating codeCode.Fragment.cursor_context/1Code.Fragment.container_cursor_to_quoted/1Date.before?/2andDate.after?/2DateTime.before?/2andDateTime.after?/2DateTime.utc_now/2File.StreamInspectnow renders'charlists'as~c"charlists"by defaultcaseandcondinsidedbg/2t:nonempty_binary/0andt:nonempty_bitstring/0@behaviours as runtime dependencieserror: ...messages, similar towarning: ...Code.compiler_options(on_undefined_variable: :warn)at the top of yourmix.exs--sname undefined/--name undefinedso a name is automatically generatedKeyword.split_with/2Macro.Env.lookup_alias_as/2Map.split_with/2Map.intersect/2andMap.intersect/3MapSet.split_with/2NaiveDateTime.beginning_of_day/1andNaiveDateTime.end_of_day/1NaiveDateTime.before?/2andNaiveDateTime.after?/2NaiveDateTime.utc_now/2Module.get_last_attribute/3:return_separatoroptionProcess.alias/0,1andProcess.unalias/1Range.split/2:fast_asciimode toString.valid?/2Supervisor:linesinSystem.cmd/3to capture output line by lineTask.yield_many/2Task.Supervisor.start_child/2Time.before?/2andTime.after?/2URI.append_path/2ExUnit
{module, function}tuples in ExUnitsetupcallbacksExUnit.Case.get_last_registered_test/1ExUnit.DocTest.doctest_file/2doctest_datain doctest tagsIEx
--dbg pryIEX_HOMEalias,import, andrequireruntime_info(:allocators)Range,DateTime, andRegexLogger
Logger.add_handlers/1andLogger.default_formatter/1default_formatteranddefault_handlerconfiguration for Logger which configures Erlang/OTP logger:always_evaluate_messagesconfiguration to LoggerMix
:start_concurrentlyconfiguration--all-warningsby default@external_resourcesoptional_applicationsto.appfile--purge-consolidation-path-if-stalewhich will purge the given consolidation path if compilation is requiredmix deps.get/mix deps.update--check-lockedwhich raises if changes to the lockfile are required--no-exitoption--check-formattedfails--trace-to-fileto improve performance when working with large outputsevalcommand--outputflagdef clito unify all CLI defaults in a single placeMix.Project.deps_tree/12. Bug fixes
Elixir
Exception.blame/3File.cp/2File.rm_rf/1try/rescue...inside typespecsbehaviour_infoandmodule_infofunctions from Erlang modulesModule.get_attribute/3returnsniland not the given default value when an attribute has been explicitly set asnilSystem.stop/1executesURI.merge/2works accordingly with relative pathsExUnit
@tag capture_log: truewas set to true and the Logger application was shut down in the middle of the testsetup_allIEx
whenever the input reader was killed
Mix
cwdin compiler cache keyerlsrv.exein path with spacesmix xrefis used at the umbrella root3. Soft deprecations (no warnings emitted)
Elixir
File.cp/3andFile.cp_r/3with a function as third argumentis deprecated in favor of a keyword list
:return_diagnosticsoption to beset to true when compiling or requiring code
Logger
add_backend/2,remove_backend/2, andconfigure_backend/2have been deprecatedin favor of the new
:logger_backendsdependency:consoleconfiguration has been deprecated in favor of:default_formatter:backendsconfiguration has been deprecated in favor ofLogger.add_handlers/1Mix
:preferred_cli_envis deprecated in favor of:preferred_envsindef cli:preferred_cli_targetis deprecated in favor of:preferred_targetsindef cliHEX_MIRRORis deprecated in favor ofHEX_BUILDS_URL4. Hard deprecations
Elixir
Calendar.ISO.day_of_week/3is deprecated in favor ofCalendar.ISO.day_of_week/4Exception.exception?/1is deprecated in favor ofKernel.is_exception/1...as a valid function call identifierRegex.regex?/1is deprecated in favor ofKernel.is_struct/2Logger
Logger.warn/2is deprecated in favor ofLogger.warning/2v1.14.5Compare Source
This release contains fixes for Erlang/OTP 26.
Bug fixes
Elixir
Mix
v1.14.4Compare Source
This release adds basic support for Erlang/OTP 26. When migrating
to Erlang/OTP 26, keep it mind it changes how maps are stored
internally and they will be printed and traversed in a different
order (note maps never provided a guarantee of their order).
To aid migration, this release adds
:sort_mapstoinspectcustom options, in case you want to sort them before inspection:
Enhancements
Elixir
:sort_mapstoInspect.Opts.custom_optionsIEx
Mix
Bug fixes
Elixir
Code.quoted_to_string_with_comments/2debug_info/4when returning core_v1quote keep: trueto avoid invalid stacktracesStream.zip/1hanging on empty listMix
v1.14.3Compare Source
1. Enhancements
Elixir
ExUnit
2. Bug fixes
Elixir
Calendar.strftime/2is_struct/2guardsdefguardexpansiondefmoduleMacro.to_string/1for large negative integers__ENV__in macrosPath.wildcard/2expands..symlinks accordinglyRange.disjoint?/2implementationExUnit
v1.14.2Compare Source
1. Enhancements
Elixir
Code.eval_quoted_with_env/4with support for the:prune_bindingoptionExUnit
:doctestand:doctest_lineas meta tagsExUnit.Formatter.format_assertion_diff/4Mix
Mix.install/2accepts atoms as paths2. Bug fixes
Elixir
size*unitshortcut in bitstringdefguard:forin protocols with the appropriate envExUnit
ExUnit.run/1Mix
v1.14.1Compare Source
1. Enhancements
Elixir
Application.compile_env/3inside module attributesMacro.expand_literals/2andMacro.expand_literals/3:close_stdintoSystem.shell/2Mix
--all-warningsoption2. Bug fixes
Elixir
:uniqis given inforcomprehensions and the result is unused@enforce_keysattribute afterdefstructdeclaration:debug_infochunkMacro.to_string/2when converting an AST with:erlang.binary_to_atom/2String.split/3andString.next_grapheme/1returning invalid results on invalid UTF-8 encodingSystem.shell/2uri.portas:undefinedin certain cases inURI.new/1ExUnit
:moduledocand functions are specified in:onlyIEx
--no-pryis givenMix
.formatter.exsso they are properly re-evaluted on every callv1.14.0Compare 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.
dbgKernel.dbg/2is 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/2can do more. It's a macro, so it understands Elixir code. You can seethat when you pass a series of
|>pipes to it.dbg/2will print the valuefor every step of the pipeline. This code:
Prints this:
IEx and Prying
dbg/2supports 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-pryoption to IEx.PartitionSupervisor
PartitionSupervisoris 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
PartitionSupervisorto supervise multipleisolated copies of that process running concurrently, each assigned its own
partition.
For example, imagine you have an
ErrorReporterprocess that you use to reporterrors to a monitoring service.
As the concurrency of your application goes up, the
ErrorReporterprocessmight 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
ErrorReporterprocess under aPartitionSupervisor.The
PartitionSupervisorwill spin up a number of processes equal toSystem.schedulers_online()by default (most often one per core). Now, whenrouting requests to
ErrorReporterprocesses we can use a:viatuple 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
ErrorReporterprocess, 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
PartitionSupervisorispartitioning something like a
DynamicSupervisor. When starting many processesun
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.