Skip to content

Problem with compile sample app on MacOS #9932

Closed

Description

@es1o

I have a problem with creating very basic mix application with mix and elixir 1.10.2 on MacOS...

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 22 [erts-10.7.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.10.2 (compiled with Erlang/OTP 22)
  • Operating system: MacOS 10.15.3

Current behavior

Steps to reproduce:

  1. mix new kv --module KV
  2. cd kv
  3. mix test

Result:

Compiling 1 file (.ex)
Generated kv app

20:01:25.912 [error] Task #PID<0.93.0> started from #PID<0.127.0> terminating
** (MatchError) no match of right hand side value: false
    (elixir 1.10.2) src/elixir_erl_var.erl:14: :elixir_erl_var.translate/4
    (stdlib 3.12.1) lists.erl:1354: :lists.mapfoldl/3
    (elixir 1.10.2) src/elixir_erl_clauses.erl:20: :elixir_erl_clauses.match/3
    (elixir 1.10.2) src/elixir_erl_clauses.erl:28: :elixir_erl_clauses.clause/6
    (elixir 1.10.2) src/elixir_erl.erl:225: :elixir_erl.translate_clause/3
    (elixir 1.10.2) src/elixir_erl.erl:215: :elixir_erl."-translate_definition/4-lc$^0/1-0-"/2
    (elixir 1.10.2) src/elixir_erl.erl:215: :elixir_erl.translate_definition/4
    (elixir 1.10.2) src/elixir_erl.erl:178: :elixir_erl.split_definition/11
Function: #Function<9.77916582/0 in Mix.Tasks.Compile.Protocols.consolidate/6>
    Args: []
** (EXIT from #PID<0.93.0>) an exception was raised:
    ** (MatchError) no match of right hand side value: false
        (elixir 1.10.2) src/elixir_erl_var.erl:14: :elixir_erl_var.translate/4
        (stdlib 3.12.1) lists.erl:1354: :lists.mapfoldl/3
        (elixir 1.10.2) src/elixir_erl_clauses.erl:20: :elixir_erl_clauses.match/3
        (elixir 1.10.2) src/elixir_erl_clauses.erl:28: :elixir_erl_clauses.clause/6
        (elixir 1.10.2) src/elixir_erl.erl:225: :elixir_erl.translate_clause/3
        (elixir 1.10.2) src/elixir_erl.erl:215: :elixir_erl."-translate_definition/4-lc$^0/1-0-"/2
        (elixir 1.10.2) src/elixir_erl.erl:215: :elixir_erl.translate_definition/4
        (elixir 1.10.2) src/elixir_erl.erl:178: :elixir_erl.split_definition/11

Expected behavior

Elixir should run test without problems.

Activity

  1. josevalim commented on Apr 12, 2020

    @josevalim
    Member

    Thanks for the report. How did you install Elixir and Erlang?

  2. josevalim commented on Apr 12, 2020

    @josevalim
    Member

    Btw, the error is happening on protocol consolidation. This most likely means an issue with how Elixir itself was compiled. Trying something like asdf to install and compile different Elixir versions may be helpful.

  3. es1o commented on Apr 13, 2020

    @es1o
    Author

    I used homebrew. On my other mac is works fine.

  4. es1o commented on Apr 13, 2020

    @es1o
    Author

    I've fixed this by removing my ~/.mix directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions