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

Elixir
Release: Release v1.9.2 · elixir-lang/elixir · GitHub 1. Enhancements Mix [mix release] Allow {:from_app, app_name} as a version for re...
New
josevalim
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
Elixir
This release includes type inference of patterns to provide warnings for an initial set of constructs (binaries, maps, and atoms) within ...
New
Elixir
Official announcement: Elixir v1.15 released - The Elixir programming language This release requires Erlang/OTP 24 and later. Elixir v1...
New
josevalim
Hello everyone, We have released Elixir v1.3.3. This release has some compiler- and dialyzer-related improvements as well as some enhanc...
New
Elixir
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
josevalim
Hi! :wave: I hope everyone is well! The Elixir team releases new versions every 6 months, typically every January and July. However, si...
New
Elixir
Release: Release v1.11.1 · elixir-lang/elixir · GitHub 1. Bug fixes Elixir [Code] Ignore tracers if lexical tracker is dead or explicit...
New
josevalim
In Elixir we are continuously trying to improve the experience for developers learning the language. However, there are still common road...
New
josevalim
Elixir v1.14 brings many improvements to the debugging experience in Elixir and data-type inspection. It also includes a new abstraction...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
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
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement