I have a simple, stand alone module that yields:
elixir impl_bad.ex ** (ArgumentError) argument error
In iex:
=> iex Erlang/OTP 23 [erts-11.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] Interactive Elixir (1.9.4) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> c "impl_bad.ex" == Compilation error in file impl_bad.ex == ** (ArgumentError) argument error ** (ArgumentError) argument error
The code:
defmodule ImplBad do
def run_addition_problems(aconfig) do
do_addition_problems(aconfig)
end
end
Place this 5 line code in a file by itself.
I know do_addition_problems() does not exist but I would expect an undefined error with a line number.
I extracted this code from a project file where do_addition_problems() does exists.
I would expect a bit more information from the compiler. I had to perform a "binary search" from a module about 1k LOC to pinpoint this problem.
Is this a problem with elixir 1.9.4?
1.9.2, it gives meArgumentErrorjust like yours. When I try1.9.4-opt-21, it gives a nice(CompileError) t.ex:3: undefined function do_addition_problems/1. I useasdftool to switch between the versions of elixir. So it must be something that was fixed in the compiler between 1.9.2 and 1.9.4. - DNNXdocker run -it --rm -v "$PWD"/t.ex:/tmp/t.ex elixir:1.9.2-slim elixir /tmp/t.ex, I am getting a good error message, same aselixir:1.9.4-slim. Maybe it's about OTP version rather than Elixir. - DNNX