Elixir
Elixir Core Team
Elixir v1.20.0-rc.5 released
This release requires Erlang/OTP 27+ and is compatible with Erlang/OTP 29.
1. Enhancements
EEx
- [EEx] Optimize compiler by flattening expr list only once
Elixir
- [Base] Optimize Base validation functions by using SWAR techniques
- [Float] Optimize
Float.round/2by avoiding big integers - [Inspect] Increase inspect limit to help print deeply nested data structures
- [Inspect] Support printing Erlang records (using Erlang notation)
- [Kernel] Add occurrence typing on
case,cond, andwith - [Registry] Switch
{:duplicate, :key}key_ets to ordered_set with composite keys - [String] SWAR-optimize ASCII fast paths in
String.length/1andString.slice/3
ExUnit
- [ExUnit] Show remaining runs when using
--repeat-until-failure
IEx
- [IEx.Helpers] Add
source/1
Mix
- [mix app.tree] Support
--outputoption - [mix deps.tree] Support
--outputoption - [mix help] Support printing docs for types and callbacks
- [mix format] Support
--no-compileoption - [mix source] Add
mix source MODULEto print or open a given module/function location
2. Potential breaking changes
Elixir
- [Kernel] Disallow raw CR line ending in strings, comments and after
?for security reasons
3. Bug fixes
Elixir
- [Kernel] Fix a compiler crash when importing a module with
only: :sigilsoption when the imported module exports non-sigil symbols withsigil_prefix - [Kernel] Reject negative Duration in
to_timeout/1 - [Macro] Fix generation of heredocs in
Macro.to_string/1with escaped trailing newline - [Path] Consistently return path as binary in
Path.relative_to_cwd/2 - [Stream] Raise in
Stream.cycle/1when enumerable reduce call yields no elements - [String] Support empty pattern list in
String.count/2
Logger
- [Logger] Persist log level to app env in
Logger.configure/1
Mix
- [Mix] Use
non_executable_binary_to_termon loopback pubsub - [mix compile.elixir] Fix scenario where Elixir would tag mtimes in the future
Most Liked
josevalim
Creator of Elixir
As usual, this release has additional type checks and performance improvements. Please give it a try. We expect only one additional RC after this one with any pending fixes, so we can release v1.20.0.
17
vkryukov
Congratulations on the release! Are you interested in false positive type warnings - should we report them as bugs? E.g., I have a piece of HEEX where the type checker complains but stop complaining if I simply change the order
<.yinsh_score_ring
:for={index <- 1..3}
# no complaints if `earned?` is placed here instead
# earned?={index <= player.yinsh_rings_removed}
id={"#{@id}-#{player.color}-ring-score-#{index}"}
color={player.color}
earned?={index <= player.yinsh_rings_removed}
/>
The type warning:
type warning found at:
│
270 │ earned?={index <= player.yinsh_rings_removed}
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ lib/playgipf_web/components/game_components.ex:270: PlaygipfWeb.GameComponents."game_topbar (overridable 1)"/1
warning: comparison with structs found:
index <= player.yinsh_rings_removed
given types:
dynamic(
%{
...,
__struct__:
Date or DateTime or Decimal or NaiveDateTime or Phoenix.LiveComponent.CID or Postgrex.Copy or
Postgrex.Query or Postgrex.TextQuery or Time or URI or Version or Version.Requirement
} or atom() or bitstring() or empty_list() or float() or integer() or
non_empty_list(term(), term())
) <= dynamic()
where "index" was given the type:
# type: dynamic(
%{
...,
__struct__:
Date or DateTime or Decimal or NaiveDateTime or Phoenix.LiveComponent.CID or Postgrex.Copy or
Postgrex.Query or Postgrex.TextQuery or Time or URI or Version or Version.Requirement
} or atom() or bitstring() or empty_list() or float() or integer() or
non_empty_list(term(), term())
)
# from: lib/playgipf_web/components/position_components/position_panel.ex:441
to_string(index)
where "player" was given the types:
# type: dynamic(%{..., game_type: term()})
# from: lib/playgipf_web/components/position_components/position_panel.ex:431
player.game_type == :yinsh
# type: dynamic(%{..., game_type: :yinsh})
# from: lib/playgipf_web/components/position_components/position_panel.ex:431
player.game_type == :yinsh
# type: dynamic(%{..., game_type: :yinsh, yinsh_setup?: false})
# from: lib/playgipf_web/components/position_components/position_panel.ex:431
not player.yinsh_setup?
# type: dynamic(%{
...,
color:
%{
...,
__struct__:
Date or DateTime or Decimal or NaiveDateTime or Phoenix.LiveComponent.CID or Postgrex.Copy or
Postgrex.Query or Postgrex.TextQuery or Time or URI or Version or Version.Requirement
} or atom() or bitstring() or empty_list() or float() or integer() or
non_empty_list(term(), term()),
game_type: :yinsh,
yinsh_setup?: false
})
# from: lib/playgipf_web/components/position_components/position_panel.ex:441
to_string(player.color)
Comparison operators (>, <, >=, <=, min, and max) perform structural and not semantic comparison. Comparing with a struct won't give meaningful results. Structs that can be compared typically define a compare/2 function within their modules that can be used for semantic comparison.
4
josevalim
Creator of Elixir
That’s unexpected, please file a report!
3
Popular in News
Hi everyone,
We are glad to announce that the second release candidate for Elixir v1.6.0 is out.
Check out the CHANGELOG and give the r...
New
Elixir v1.4.5 has been released with fixes for those interested in running Erlang/OTP 20: Release v1.4.5 · elixir-lang/elixir · GitHub
New
Hello everyone,
We have just released GenStage 0.10.0 with an important bug fix if you were using the BroadcastDispatcher with a selecto...
New
Announcement: Elixir v1.20 released: now a gradually typed language - The Elixir programming language
This release requires Erlang/OTP 2...
New
Hello everyone,
This past weekend we have released Ecto v2.1.0-rc.5, hopefully the last release candidate for Ecto v2.1: ecto/CHANGELOG....
New
1. Enhancements
Mix
[mix compile.elixir] Do not run fixpoint computation on runtime dependencies. This should considerably improve compi...
New
Release: Release v1.11.1 · elixir-lang/elixir · GitHub
1. Bug fixes
Elixir
[Code] Ignore tracers if lexical tracker is dead or explicit...
New
Hi everyone, this release includes type inference across applications and is our last step before v1.20. Please give it a try!
Here are ...
New
Release: Release v1.10.0-rc.0 · elixir-lang/elixir · GitHub
Support for Erlang/OTP 21+
Elixir v1.10 requires Erlang/OTP 21+, allowing El...
New
1. Enhancements
Elixir
[Duration] Add Duration.to_iso8601/1 and Duration.from_iso8601/1
[Keyword] Add Keyword.intersect/2-3 to mirror th...
New
Other popular topics
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









