Elixir v1.10.0-rc.0 released

@josevalim can you look into this stacktrace I am getting from elixir-ls dialyzer tests?

19:59:23.538 [error] Task #PID<0.344.0> started from #PID<0.381.0> terminating
** (MatchError) no match of right hand side value: false
    (elixir 1.10.0-rc.0) src/elixir_erl_var.erl:14: :elixir_erl_var.translate/4
    (stdlib 3.11) lists.erl:1354: :lists.mapfoldl/3
    (elixir 1.10.0-rc.0) src/elixir_erl_clauses.erl:20: :elixir_erl_clauses.match/3
    (elixir 1.10.0-rc.0) src/elixir_erl_clauses.erl:28: :elixir_erl_clauses.clause/6
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:230: :elixir_erl.translate_clause/3
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:220: :elixir_erl."-translate_definition/4-lc$^0/1-0-"/2
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:220: :elixir_erl.translate_definition/4
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:183: :elixir_erl.split_definition/11
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:155: :elixir_erl.dynamic_form/1
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:126: :elixir_erl.consolidate/3
    (elixir 1.10.0-rc.0) lib/protocol.ex:668: Protocol.compile/3
    (mix 1.10.0-rc.0) lib/mix/tasks/compile.protocols.ex:141: Mix.Tasks.Compile.Protocols.consolidate/4
    (elixir 1.10.0-rc.0) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir 1.10.0-rc.0) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib 3.11) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Function: #Function<9.64842280/0 in Mix.Tasks.Compile.Protocols.consolidate/6>
    Args: []

I’m not sure if this is an error or is elixir-ls doing something bad.

The ls is currently not compatible with elixir 1.10 as it used “private” API that has been removed.

I know that, see https://github.com/elixir-lsp/elixir-ls/issues/92

1 Like

Yeah, but that’s not Jose’s fault.

1 Like

It looks like a bug but I need a mechanism that reproduces it to be sure. :slight_smile: Thanks for looking into these issues btw!

Thank you for the new release!

I have some feedback about the changes to Enum.min

Dialyzer now complains when I use Enum.min with an empty_fallback function but no sorter function. When I checked the typespec in the code, I noticed that this pattern of usage is planned to be deprecated.

So instead of Enum.min([values], fn -> 0 end) to get a minimum value (defaulting to 0 for an empty list), I would have to use Enum.min([values], &<=/2, fn -> 0 end).

I don’t find that to be as user-friendly as the current usage.

1 Like

@Ryzey that’s a good point. It will be fixed on Elixir v1.10 and we will remove the plans to deprecate.

5 Likes