Update Base Image to v1.20.0#2009
Open
renovate[bot] wants to merge 1 commit into
Open
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
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.19.5→1.20.01.19.5→1.20.0Release Notes
elixir-lang/elixir (elixir)
v1.20.0Compare Source
Announcement: https://elixir-lang.org/blog/2026/06/03/elixir-v1-20-0-released/
This release requires Erlang/OTP 27+ and is compatible with Erlang/OTP 29.
Type system improvements
Elixir's type system now understands all language constructs and can infer types for your function definitions, using typing information from Elixir's standard library and your dependencies, to find verified bugs and dead code.
This has been achieved through a series of improvements, such as type refinement across clauses, occurrence typing, typing of map keys and domains, and more.
Type inference of guards
This release also performs inference of guards! Let's see some examples:
The code above correctly infers
xis a list andyis an integer.The one above infers x is a binary or an integer, and
yis a two element tuple with:okas first element and a binary or integer as second.The code above infers
xis a map which has the:fookey, represented as%{..., foo: dynamic()}. Remember the leading...indicates the map may have other keys.And the code above infers
xdoes not have the:fookey (hencex.foowill raise a typing violation), which has the type:%{..., foo: not_set()}.You can also have expressions that assert on the size of data structures:
Elixir will correctly track the tuple has at most two elements, and therefore accessing
elem(x, 3)will emit a typing violation. In other words, Elixir can look at complex guards, infer types, and use this information to find bugs in our code, without a need to introduce type signatures (yet).Whole-body type inference
Elixir also performs inference based on the function body itself. Take the following code:
Elixir now infers that the function expects a
mapas first argument, and the map must have the keys.fooand.barwhose values are eitherinteger()orfloat(). The return type will be eitherinteger()orfloat().Here is another example:
Even though the
+operator works with both integers and floats, Elixir infers thataandbmust be both integers, as the result of+is given to a function that expects an integer. The inferred type information is then used during type checking to find possible typing errors. The typing inferred from your dependencies are also used to help infer more precise types for your own applications.Typing across clauses
Elixir now infers the type of a given clause based on previous clauses. Let's see an example:
System.get_env("SOME_VAR")returns eithernilor abinary(). Because the first clause matches onnil, the type system knowsvaluecan no longer benil, and therefore it must only be abinary(), which allows the second clause to also type check without violations.This type inference across clauses also helps the type system find redundant clauses and dead code in existing codebases. Elixir v1.20 also implements occurrence typing for
cond,case, andwith, providing more precise types within each clause.Typing of atom and domain keys in maps
Maps were one of the first data-structures we implemented within the Elixir type system however, up to this point, they only supported atom keys. If they had additional keys, those keys were simply marked as
dynamic().As of Elixir v1.20, we can track all possible domains as map keys. For example, the map:
will have the type:
It is also possible to mix domain keys, as above, with atom keys, yielding the following:
This system is an implementation of Typing Records, Maps, and Structs, by Giuseppe Castagna (2023).
Typing of map operations
We have typed the majority of the functions in the
Mapmodule, allowing the type system to track how keys are added, updated, and removed across all possible key types.For example, imagine we are calling the following
Mapfunctions with a variablemap, which we don't know the exact shape of, and an atom key:As you can see, we track when keys are set and also when they are removed.
Some operations, like
Map.replace/3, only replace the key if it exists, and that is also propagated by the type system:In other words, if the key exists, it would have been replaced by an integer value. Furthermore, whenever calling a function in the
Mapmodule and the given key is statically proven to never exist in the map, an error is emitted.By combining full type inference with bang operations like
Map.fetch!/2,Map.pop!/2,Map.replace!/3, andMap.update!/3, Elixir is able to propagate information about the desired keys. Take this module:The code above has a type violation, which is now caught by the type system:
Acknowledgements
The type system was made possible thanks to a partnership between CNRS and Remote. The development work is currently sponsored by Fresha and Tidewave.
Compile-time improvements
Elixir's v1.20 improves compilation times once more, especially on applications with many cores.
It also introduces a new compiler option called
:module_definition, which if the module definition should be:compiled(the default) or:interpreted. Note this does not affect the.beamfile written to disk, only how the contents insidedefmoduleare executed. Using the:interpretedmode may offer better compilation times for large projects, especially on machines with high core count, however, it comes with some downsides:Errors during compilation may have less precise stacktraces
Anonymous functions within
defmodulecan have only up to 20 arguments.If this is an issue, you can use maps or tuples to group the data.
Note the functions themselves inside
defmodule, such as the ones definedinside
defand friends, can still have up to 255 argumentsYou can enable it by setting
elixirc_options: [module_definition: :interpreted]in yourmix.exs.v1.20.0 (2026-06-03)
This release requires Erlang/OTP 27+ and is compatible with Erlang/OTP 29.
1. Enhancements
EEx
Elixir
date_from_iso_daysby using the Neri-Schneider algorithm:dbg_callbackoption to eval functionsmodule_definition: :interpretedoption toCodewhich allows module definitions to be evaluated instead of compiled. In some applications/architectures, this can lead to drastic improvements to compilation times. Note this does not affect the generated.beamfile, which will have the same performance/behaviour as beforecontainer_cursor_to_quotedEnum.min_maxsorter[:raw]opts inFile.read/2File.cp_r/3instead of erroring with reason:eioFloat.round/2by avoiding big integersInteger.ceil_div/2Integer.popcount/1IO.iodata_empty?/1x when is_integer(x), then the next clause may no longer be an integercase,cond, andwithdbgfor pipesList.first!/1andList.last!/1after_compile/2callback failscount_children/1andstop/3Process.get_label/1keys: {:duplicate, :key}toordered_setwith composite keysRegex.import/1to import regexes defined with/EString.length/1andString.slice/3ExUnit
--repeat-until-failure:formatteroption for custom log formattingIEx
source/1Mix
--outputoptionmodule_definition: :interpretedoption toCodewhich allows module definitions to be evaluated instead of compiled. In some applications/architectures, this can lead to drastic improvements to compilation times. Note this does not affect the generated.beamfile, which will have the same performance/behaviour as before:elixirc_pathsto be a list of strings to avoid paths from being discarded (the only documented type was lists of strings)deps.loadpaths, improving boot times in projects with many git dependenciesmix depsoutput--outputoption--no-compileoptionmix source MODULEto print or open a given module/function locationmix test --dry-run2. Potential breaking changes
Elixir
?for security reasonsrequire SomeModuleno longer expands to the given module at compile-time, but it still returns the module at runtime. Note Elixir does not guarantee macros will expand to certain constructs, only what its execution result, but since this can break code relying on the previous behaviour, such asrequire(SomeMod).some_macro(), we are adding this note to the CHANGELOG3. Bug fixes
Elixir
Enum.slice/2for ranges with step > 1 sliced by step > 1File.cp_r/3File.cp_r/3infinite loop with symlink cyclesFile.cp_r/3infinite loop when copying into subdirectory of sourceFile.Stream'sEnumerable.countfor files without trailing newline@type record()for Erlang/OTP 29Float.parse/1inconsistent error handling for non-scientific notation overflowInteger.extended_gcd/2returning negative GCD for zero base casesInteger.undigits/2only: :sigilsoption when the imported module exports non-sigil symbols withsigil_prefixAnyimplementationto_timeout/1ArgumentErrorinKeyword.from_keys/2for non-atom keysMacro.to_string/1with escaped trailing newlinePath.relative_to_cwd/2Stream.cycle/1when enumerable reduce call yields no elementsString.count/2URI.mergeleaking:+marker when base path is empty stringExUnit
IEx
Logger
Logger.configure/1Mix
non_executable_binary_to_termon loopback pubsubMIX_OS_DEPS_COMPILE_PARTITION_COUNT--warnings-as-errorsnot catching misnamed test file warnings--raisewhenmix test --warnings-as-errorspasses with warnings4. Hard deprecations
Elixir
File.stream!(path, modes, lines_or_bytes)is deprecated in favor ofFile.stream!(path, lines_or_bytes, modes)<<x::size(^existing_var)>>Kernel.ParallelCompiler.async/1is deprecated in favor ofKernel.ParallelCompiler.pmap/2, which is more performant and addresses known limitationsLogger
Logger.*_backendfunctions are deprecated in favor of handlers. If you really want to keep on using backends, see the:logger_backendspackageLogger.enable/1andLogger.disable/1have been deprecated in favor ofLogger.put_process_level/2andLogger.delete_process_level/1Mix
xref: [exclude: ...]in yourmix.exsis deprecated in favor ofelixirc_options: [no_warn_undefined: ...]Configuration
📅 Schedule: (UTC)
🚦 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 was generated by Mend Renovate. View the repository job log.