Erlang 19 Compilation Error
veverkap opened this issue · 4 comments
veverkap commented
I'm getting a compilation error with a project that uses combine.
Elixir 1.2.6
Erlang 19
== Compilation error on file lib/combine/parsers/text.ex ==
** (FunctionClauseError) no function clause matching in :elixir_errors.handle_file_error/2
(elixir) src/elixir_errors.erl:186: :elixir_errors.handle_file_error("Elixir.Combine.Parsers.Text", {:beam_validator, {{Combine.Parsers.Text, :float_impl, 1}, {{:call, 4, {:f, 50}}, 43, {:multiple_match_contexts, [{:x, 0}, 1]}}}})
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
could not compile dependency :combine, "mix compile" failed. You can recompile this dependency with "mix deps.compile combine", update it with "mix deps.update combine" or clean it with "mix deps.clean combine"
veverkap commented
Doing it outside the project kills things too :(
threatsim@trophoblastprecantation-i-557634c9:/srv/workers$ git clone git@github.com:bitwalker/combine.git
Cloning into 'combine'...
remote: Counting objects: 520, done.
remote: Total 520 (delta 0), reused 0 (delta 0), pack-reused 520
Receiving objects: 100% (520/520), 189.11 KiB | 0 bytes/s, done.
Resolving deltas: 100% (257/257), done.
Checking connectivity... done.
threatsim@trophoblastprecantation-i-557634c9:/srv/workers$ cd combine/
threatsim@trophoblastprecantation-i-557634c9:/srv/workers/combine$ mix deps.get
Running dependency resolution
* Getting ex_doc (Hex package)
Checking package (https://repo.hex.pm/tarballs/ex_doc-0.11.5.tar)
Fetched package
* Getting earmark (Hex package)
Checking package (https://repo.hex.pm/tarballs/earmark-0.2.1.tar)
Fetched package
* Getting benchfella (Hex package)
Checking package (https://repo.hex.pm/tarballs/benchfella-0.3.2.tar)
Fetched package
* Getting dialyze (Hex package)
Checking package (https://repo.hex.pm/tarballs/dialyze-0.2.1.tar)
Fetched package
threatsim@trophoblastprecantation-i-557634c9:/srv/workers/combine$ mix test
Compiled lib/combine/parser_state.ex
Compiled lib/combine.ex
Compiled lib/combine/helpers.ex
Compiled lib/combine/parsers/binary.ex
Compiled lib/combine/parsers/base.ex
== Compilation error on file lib/combine/parsers/text.ex ==
** (FunctionClauseError) no function clause matching in :elixir_errors.handle_file_error/2
(elixir) src/elixir_errors.erl:186: :elixir_errors.handle_file_error("Elixir.Combine.Parsers.Text", {:beam_validator, {{Combine.Parsers.Text, :float_impl, 1}, {{:call, 4, {:f, 388}}, 43, {:multiple_match_contexts, [{:x, 0}, 1]}}}})
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
threatsim@trophoblastprecantation-i-557634c9:/srv/workers/combine$
adamkittelson commented
I cloned this and played around with it a bit.
On Elixir 1.3.0 and Erlang 19.0 I get
== Compilation error on file lib/combine/parsers/text.ex ==
** (CompileError) Elixir.Combine.Parsers.Text: function float_impl/1+43:
Internal consistency check failed - please report this bug.
Instruction: {call,4,{f,137}}
Error: {multiple_match_contexts,[{x,0},1]}:
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
but if I change the #{line}
at
combine/lib/combine/parsers/text.ex
Line 574 in f5d1169
#{state.line}
it compiles.bitwalker commented
Damn, this is an interesting one. @adamkittelson can you make a PR with your fix so I can merge it and release a fix? I'll get it done tonight one way or the other.