Elixir

Elixir

Elixir Core Team

Elixir v1.20.0-rc.2 and v1.20.0-rc.3 released

Overall, the compiler finds more bugs, for free, and it has never been faster:

  • Infers types across clauses, finding more bugs and dead code

  • Compiles ~10% faster and has a new interpreted mode (up to 5x faster, scales to the number of cores). For more information, follow the benchmarks

  • Modifying a struct definition recompiles fewer files (it no longer requires files that only pattern match or update structs to recompile)

1. Enhancements

Elixir

  • [Code] Add module_definition: :interpreted option to Code which 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 .beam file, which will have the same performance/behaviour as before
  • [Code] Make module purging opt-in and move temporary module deletion to the background to speed up compilation times
  • [Integer] Add Integer.popcount/1
  • [Kernel] Move struct validation in patterns and updates to type checker, this means adding and remove struct fields will cause fewer files to be recompiled
  • [Kernel] Add type inference across clauses. For example, if one clause says x when is_integer(x), then the next clause may no longer be an integer
  • [Kernel] Detect and warn on redundant clauses
  • [List] Add List.first!/1 and List.last!/1
  • Add Software Bill of Materials guide to the Documentation

Mix

  • [mix compile] Add module_definition: :interpreted option to Code which 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 .beam file, which will have the same performance/behaviour as before
  • [mix deps] Parallelize dep lock status checks during deps.loadpaths, improving boot times in projects with many git dependencies

2. Potential breaking changes

Elixir

  • map.foo() (accessing a map field with parens) and mod.foo (invoking a function without parens) will now raise instead of emitting runtime warnings, aligning themselves with the type system behaviour

3. Bug fixes

IEx

  • [IEx] Ensure warnings emitted during IEx parsing are properly displayed/printed
  • [IEx] Ensure pry works across remote nodes

Mix

  • [mix compile.erlang] Topsort Erlang modules before compilation for proper dependency resolution

Most Liked

josevalim

josevalim

Creator of Elixir

Yes, some of the new checks are expensive and we got bug reports, we are looking into optimized them right now. :slight_smile:

josevalim

josevalim

Creator of Elixir

We have released v1.20.0-rc.3 with many performance improvements around the type system. See the CHANGELOG below.

For those using Absinthe, I have created this pull request which I recommend using until v1.9.1 is out: perf: Break function dispatch into groups by josevalim · Pull Request #1414 · absinthe-graphql/absinthe · GitHub


1. Enhancements

IEx

  • [IEx] Optimize autocompleting modules

2. Bug fixes

Elixir

  • [Enum] Fix Enum.slice/2 for ranges with step > 1 sliced by step > 1
  • [File] Preserve directory permissions in File.cp_r/3
  • [File] Fix File.cp_r/3 infinite loop with symlink cycles
  • [File] Fix File.cp_r/3 infinite loop when copying into subdirectory of source
  • [File] Warn when defining @type record(), fixes CI on Erlang/OTP 29
  • [File] Fix File.Stream Enumerable.count for files without trailing newline
  • [Float] Fix Float.parse/1 inconsistent error handling for non-scientific notation overflow
  • [Kernel] Process fields even when structs are unknown (regression)
  • [Kernel] Improve performance on several corner cases in the type system (regression)
  • [Kernel] Fix regression when using Kernel.in/2 in defguard (regression)
josevalim

josevalim

Creator of Elixir

As with previous RCs, give it a try and let us know about compilation times and any false or unclear warnings!

Where Next?

Popular in News Top

josevalim
Elixir v1.5.0-rc.0 has been released. This is a release candidate for the upcoming Elixir v1.5. It includes bug fixes, enhancements and ...
New
Elixir
Release: Release v1.11.0 · elixir-lang/elixir · GitHub Over the last releases, the Elixir team has been focusing on the compiler, both i...
New
Elixir
1. Enhancements Elixir [File] Support distributed File.Stream [Module] Add Module.get_last_attribute/3 [Task] Reduce footprint of tasks ...
New
josevalim
Official announcement: Elixir v1.6 released - The Elixir programming language Thanks everyone who gave the release candidate a try and g...
New
josevalim
Hello everyone, A new release candidate for Ecto is out. It fixes two regressions on the previous release candidate and adds three new f...
New
Elixir
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 prec...
New
josevalim
Elixir v1.5.0-rc.1 has been released. This is the second release candidate for the upcoming Elixir v1.5. It includes bug fixes, enhancem...
New
Elixir
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
josevalim
Note: this is a language proposal so please keep the discussion on topic. If you want to talk about related behaviour but not strictly pa...
New
Elixir
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 Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New

We're in Beta

About us Mission Statement