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,
I am really happy to announce Plug v1.4.0-rc.0. It has many improvements and bug fixes:
Multipart support is now implem...
New
Release: https://github.com/elixir-lang/elixir/releases/tag/v1.9.2
1. Enhancements
Mix
[mix release] Allow {:from_app, app_name} as a v...
New
Hi everyone,
We have just released Elixir v1.8.0-rc.0. For more information, checkout the CHANGELOG.
Please give it a try and give us f...
New
Official announcement: https://elixir-lang.org/blog/2018/01/17/elixir-v1-6-0-released/
Thanks everyone who gave the release candidate a...
New
Hello folks,
Elixir v1.4.0-rc.0 has been released. This is a release candidate for the upcoming Elixir v1.4.0.
The most notable changes...
New
This release adds basic support for Erlang/OTP 26. When migrating
to Erlang/OTP 26, keep it mind it changes how maps are stored
interna...
New
Release: Release v1.12.3 · elixir-lang/elixir · GitHub
1. Bug fixes
Elixir
[Code] Make sure that bindings in the default context return...
New
Hello everyone,
I would like to propose the addition of the Registry project to Elixir:
https://github.com/elixir-lang/registry
The...
New
Release: Release v1.12.0-rc.0 · elixir-lang/elixir · GitHub
Note: this is a release candidate. Please try it out and give us feedback! G...
New
1. Bug fixes
Elixir
[Code] Fix Code.quoted_to_algebra/2 for operator with :do key as operand
[Kernel.ParallelCompiler] Do not crash para...
New
Other popular topics
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Hello, how can I check the Phoenix version ?
Thanks !
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
I've read in another post that it may be possible with a router helper - but I couldn't find an appropriate one, and tbh, I'm still just ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including.
What is Phoenix LiveV...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New







