Elixir v1.20.0-rc.6 released

Hi everyone, this release includes type inference across applications and is our last step before v1.20. Please give it a try!

Here are some things to try out:

  1. Before upgrading, run mix compile --profile time --force and see how long it takes
  2. Run mix compile --profile time --force after upgrading and report

Please report the times and your Elixir version for each.

If you have some additional seconds, please try the following changes to your mix.exs. Run mix compile --profile time --force and report your times for each scenario independently, only on -rc.6:

  1. elixirc_options: [infer_signatures: [:elixir]] (This makes it so we only use Elixir’s stdlib to infer signatures. I do not recommend it in practice but measuring it will help assess the impact of inference across apps)

  2. elixirc_options: [module_definition: :interpreted] (Interprete module definitions when compiling modules, does not impact produced .beam files, it is OK to use it in prod)

Full release notes here: Release v1.20.0-rc.6 · elixir-lang/elixir · GitHub

Thank you!

15 Likes

Application A

Elixir 1.19.5 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6237ms
[profile] Finished writing modules to disk in 51ms
[profile] Finished after compile callback in 970ms
[profile] Finished group pass check of 345 modules in 223ms

Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6319ms
[profile] Finished writing modules to disk in 37ms
[profile] Finished after compile callback in 1009ms
[profile] Finished group pass check of 345 modules in 219ms

Elixir 1.20.0-rc.5 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6767ms
[profile] Finished writing modules to disk in 58ms
[profile] Finished after compile callback in 485ms
[profile] Finished group pass check of 345 modules in 502ms

Elixir 1.20.0-rc.5 (compiled with Erlang/OTP 28)
elixirc_options: [module_definition: :interpreted]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6044ms
[profile] Finished writing modules to disk in 35ms
[profile] Finished after compile callback in 645ms
[profile] Finished group pass check of 345 modules in 463ms

Elixir 1.20.0-rc.6 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6208ms
[profile] Finished writing modules to disk in 57ms
[profile] Finished after compile callback in 655ms
[profile] Finished group pass check of 345 modules in 492ms

Elixir 1.20.0-rc.6 (compiled with Erlang/OTP 28)
elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 345 modules in 6402ms
[profile] Finished writing modules to disk in 38ms
[profile] Finished after compile callback in 433ms
[profile] Finished group pass check of 345 modules in 583ms

Application B

Elixir 1.19.5 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 11659ms
[profile] Finished writing modules to disk in 66ms
[profile] Finished after compile callback in 2273ms
[profile] Finished group pass check of 731 modules in 672ms

Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 13123ms
[profile] Finished writing modules to disk in 132ms
[profile] Finished after compile callback in 2667ms
[profile] Finished group pass check of 731 modules in 768ms

Elixir 1.20.0-rc.5 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 11565ms
[profile] Finished writing modules to disk in 83ms
[profile] Finished after compile callback in 576ms
[profile] Finished group pass check of 731 modules in 1931ms

Elixir 1.20.0-rc.5 (compiled with Erlang/OTP 28)
elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 11416ms
[profile] Finished writing modules to disk in 73ms
[profile] Finished after compile callback in 737ms
[profile] Finished group pass check of 731 modules in 1894ms

Elixir 1.20.0-rc.6 (compiled with Erlang/OTP 28)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 10993ms
[profile] Finished writing modules to disk in 60ms
[profile] Finished after compile callback in 712ms
[profile] Finished group pass check of 731 modules in 1664ms

Elixir 1.20.0-rc.6 (compiled with Erlang/OTP 28)
elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 731 modules in 11439ms
[profile] Finished writing modules to disk in 78ms
[profile] Finished after compile callback in 522ms
[profile] Finished group pass check of 731 modules in 2021ms

1 Like

RC5:

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 173 modules in 3572ms
[profile] Finished writing modules to disk in 24ms
[profile] Finished after compile callback in 174ms
[profile] Finished group pass check of 173 modules in 114ms

RC6:

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 173 modules in 3577ms
[profile] Finished writing modules to disk in 12ms
[profile] Finished after compile callback in 312ms
[profile] Finished group pass check of 173 modules in 82ms

RC6 and elixirc_options: [infer_signatures: [:elixir]]:

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 173 modules in 3601ms
[profile] Finished writing modules to disk in 27ms
[profile] Finished after compile callback in 213ms
[profile] Finished group pass check of 173 modules in 101ms

RC6 and elixirc_options: [module_definition: :interpreted]:

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 173 modules in 3550ms
[profile] Finished writing modules to disk in 13ms
[profile] Finished after compile callback in 328ms
[profile] Finished group pass check of 173 modules in 95ms
1 Like

Mostly metaprogramming.

Erlang/OTP 28 [erts-16.4] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 266 modules in 15447ms
[profile] Finished writing modules to disk in 38ms
[profile] Finished after compile callback in 240ms
[profile] Finished group pass check of 266 modules in 2397ms

for elixir 20 I had to use | grep '^\[profile\]' so many warnings :smiling_face_with_tear:

Erlang/OTP 28 [erts-16.4] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

Elixir 1.20.0-rc.6 (285c15f) (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 266 modules in 71101ms
[profile] Finished writing modules to disk in 18ms
[profile] Finished after compile callback in 100ms
[profile] Finished group pass check of 266 modules in 55919ms

elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 266 modules in 71101ms
[profile] Finished writing modules to disk in 18ms
[profile] Finished after compile callback in 100ms
[profile] Finished group pass check of 266 modules in 55919ms

elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 266 modules in 71845ms
[profile] Finished writing modules to disk in 19ms
[profile] Finished after compile callback in 98ms
[profile] Finished group pass check of 266 modules in 56070ms
1 Like

Your application is much slower to compile, we can probably make it much faster. If you are willing to grant me access to debug it further, please reach out in private!

2 Likes

Hello. My application seems to compile forever with v1.20.0-rc.6 and Erlang 29.0 (everything is fine with the previous RC). Should I submit a new issue? Submitted a new issue.

1 Like

1.19.5 - Erlang/OTP 27 [erts-15.2.7.6]

profile\] Finished cycle resolution in 0ms
profile\] Finished compilation cycle of 398 modules in 2994ms
profile\] Finished writing modules to disk in 6ms
profile\] Finished after compile callback in 235ms
profile\] Finished group pass check of 398 modules in 273ms

1.20-rc6 Erlang/OTP 27 [erts-15.2.7.6]

Finished cycle resolution in 0ms
Finished compilation cycle of 398 modules in 2800
Finished writing modules to disk in 4ms
Finished after compile callback in 98ms
Finished group pass check of 398 modules in 212ms

Worth noting that my test suite runs fine. However, when I user --cover I get the following:

** (exit) an exception was raised:
    ** (MatchError) no match of right hand side value:

    :error

        (tools 4.1.1) cover.erl:2158: :cover.do_compile_beam2/6
        (tools 4.1.1) cover.erl:2046: :cover.do_compile_beam/3
        (stdlib 6.2.2.3) lists.erl:2077: :lists.map/2
        (tools 4.1.1) cover.erl:3065: anonymous fn/2 in :cover.pmap_spawn/4
    (tools 4.1.1) cover.erl:1153: :cover.call/1
    (mix 1.20.0-rc.6) lib/mix/tasks/test.coverage.ex:222: anonymous fn/2 in Mix.Tasks.Test.Coverage.cover_compile/1
    (elixir 1.20.0-rc.6) lib/enum.ex:2622: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix 1.20.0-rc.6) lib/mix/tasks/test.coverage.ex:221: Mix.Tasks.Test.Coverage.cover_compile/1
    (mix 1.20.0-rc.6) lib/mix/tasks/test.coverage.ex:202: Mix.Tasks.Test.Coverage.start/2
    (mix 1.20.0-rc.6) lib/mix/tasks/test.ex:617: Mix.Tasks.Test.do_run/3
    (mix 1.20.0-rc.6) lib/mix/task.ex:502: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.20.0-rc.6) lib/mix/task.ex:572: Mix.Task.run_alias/6

1 Like

Tested against GitHub - nerves-hub/nerves_hub_web: Manage firmware updates for Nerves devices · GitHub

elixir 1.19.5, erlang 28.5

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 388 modules in 2652ms
[profile] Finished writing modules to disk in 31ms
[profile] Finished after compile callback in 710ms
[profile] Finished group pass check of 388 modules in 116ms

elixir 1.20.0-rc.6, erlang 28.5

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 388 modules in 3291ms
[profile] Finished writing modules to disk in 22ms
[profile] Finished after compile callback in 387ms
[profile] Finished group pass check of 388 modules in 149ms

elixir 1.20.0-rc.6, erlang 28.5, [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 388 modules in 2954ms
[profile] Finished writing modules to disk in 21ms
[profile] Finished after compile callback in 243ms
[profile] Finished group pass check of 388 modules in 166ms

elixir 1.20.0-rc.6, erlang 28.5, [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 388 modules in 3095ms
[profile] Finished writing modules to disk in 22ms
[profile] Finished after compile callback in 319ms
[profile] Finished group pass check of 388 modules in 151ms
1 Like

Elixir v1.19.5

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 458 modules in 8365ms
[profile] Finished writing modules to disk in 69ms
[profile] Finished after compile callback in 1199ms
[profile] Finished group pass check of 458 modules in 202ms

Elixir v1.20.0-rc.6

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 458 modules in 8403ms
[profile] Finished writing modules to disk in 46ms
[profile] Finished after compile callback in 314ms
[profile] Finished group pass check of 458 modules in 275ms

Elixir v1.20.0-rc.6 w/ infer_signatures: [:elixir]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 458 modules in 8280ms
[profile] Finished writing modules to disk in 44ms
[profile] Finished after compile callback in 393ms
[profile] Finished group pass check of 458 modules in 339ms

Elixir v1.20.0-rc.6 w/ [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 458 modules in 8113ms
[profile] Finished writing modules to disk in 37ms
[profile] Finished after compile callback in 315ms
[profile] Finished group pass check of 458 modules in 261ms

1 Like

Erlang/OTP 29 [erts-17.0] [source] [64-bit] [smp:11:11] [ds:11:11:10] [async-threads:1] [jit]

Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 3689 modules in 47435ms
[profile] Finished writing modules to disk in 526ms
[profile] Finished after compile callback in 7483ms
[profile] Finished group pass check of 3689 modules in 3825ms

Erlang/OTP 29 [erts-17.0] [source] [64-bit] [smp:11:11] [ds:11:11:10] [async-threads:1] [jit]

Elixir 1.20.0-rc.6 (285c15f) (compiled with Erlang/OTP 29)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 3689 modules in 59109ms
[profile] Finished writing modules to disk in 236ms
[profile] Finished after compile callback in 1285ms
[profile] Finished group pass check of 3689 modules in 13697ms

elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 1ms
[profile] Finished compilation cycle of 3690 modules in 57688ms
[profile] Finished writing modules to disk in 233ms
[profile] Finished after compile callback in 1490ms
[profile] Finished group pass check of 3690 modules in 12892ms
# Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 263 modules in 6137ms
[profile] Finished writing modules to disk in 32ms
[profile] Finished after compile callback in 606ms
[profile] Finished group pass check of 263 modules in 93ms

# Elixir 1.20.0-rc.6 (285c15f) (compiled with Erlang/OTP 29)
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 263 modules in 5640ms
[profile] Finished writing modules to disk in 17ms
[profile] Finished after compile callback in 202ms
[profile] Finished group pass check of 263 modules in 123ms

# elixirc_options: [infer_signatures: [:elixir]]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 263 modules in 6211ms
[profile] Finished writing modules to disk in 18ms
[profile] Finished after compile callback in 229ms
[profile] Finished group pass check of 263 modules in 140ms

# elixirc_options: [module_definition: :interpreted]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 263 modules in 6111ms
[profile] Finished writing modules to disk in 21ms
[profile] Finished after compile callback in 336ms
[profile] Finished group pass check of 263 modules in 169ms
# elixir  1.19.5-otp-28
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 508 modules in 14335ms
[profile] Finished writing modules to disk in 17ms
[profile] Finished after compile callback in 561ms
[profile] Finished group pass check of 508 modules in 620ms

# elixir  1.20.0-rc.6-otp-28
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 508 modules in 14739ms
[profile] Finished writing modules to disk in 18ms
[profile] Finished after compile callback in 548ms
[profile] Finished group pass check of 508 modules in 631ms

# elixir  1.20.0-rc.6-otp-28 [infer_signatures: [:elixir]]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 508 modules in 13881ms
[profile] Finished writing modules to disk in 10ms
[profile] Finished after compile callback in 217ms
[profile] Finished group pass check of 508 modules in 546ms

# elixir  1.20.0-rc.6-otp-28 [module_definition: :interpreted]
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 508 modules in 17347ms
[profile] Finished writing modules to disk in 10ms
[profile] Finished after compile callback in 191ms
[profile] Finished group pass check of 508 modules in 407ms
1 Like

At first – thanks for fixing #15410.

I do not use v1.20.0-rc.6 for the measurements because this version does not work with my project (and there is also an issue related to nimble_parsec dependency build, which seems to be already fixed), but the e17cb85 commit – I hope it is still relevant.

Elixir 1.19.5 (compiled with Erlang/OTP 28)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 523 modules in 4574ms
[profile] Finished writing modules to disk in 19ms
[profile] Finished after compile callback in 763ms
[profile] Finished group pass check of 523 modules in 377ms


Elixir 1.20.0-rc.5 (compiled with Erlang/OTP 29)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 523 modules in 2678ms
[profile] Finished writing modules to disk in 12ms
[profile] Finished after compile callback in 304ms
[profile] Finished group pass check of 523 modules in 242ms


Elixir 1.21.0-dev (compiled with Erlang/OTP 29)

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 523 modules in 2637ms
[profile] Finished writing modules to disk in 13ms
[profile] Finished after compile callback in 292ms
[profile] Finished group pass check of 523 modules in 225ms


Elixir 1.21.0-dev (compiled with Erlang/OTP 29)
elixirc_options: [infer_signatures: [:elixir]]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 523 modules in 2211ms
[profile] Finished writing modules to disk in 10ms
[profile] Finished after compile callback in 314ms
[profile] Finished group pass check of 523 modules in 167ms


Elixir 1.21.0-dev (compiled with Erlang/OTP 29)
elixirc_options: [module_definition: :interpreted]

[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 523 modules in 1508ms
[profile] Finished writing modules to disk in 11ms
[profile] Finished after compile callback in 276ms
[profile] Finished group pass check of 523 modules in 139ms
1 Like