I tried to compile some deps today using Elixir 1.8.1 and I got an undefined function error. This is very strange because up until Elixir 1.7.3 everything compiles well without any warnings relevant to the problem.
If you look at this line in ueberauth_instagram you can see where the error is (query_params(conn, :profile)
):
defp user_query(conn) do
conn
|> Map.merge(query_params(conn, :profile))
|> URI.encode_query
end
I opened up the lib and all its dependencies and could not find any function called query_params
with arity /2
.
So why would this compile normally in 1.7.3 but not in 1.8.1? Is this a hidden bug that has always been there, and 1.8.1 is more fussy about compiling?
It looks like the function is not being used anywhere, so that might explain it.
Here is the error:
== Compilation error in file lib/ueberauth/strategy/instagram.ex ==
** (CompileError) lib/ueberauth/strategy/instagram.ex:131: undefined function query_params/2
(elixir) src/elixir_locals.erl:107: :elixir_locals."-ensure_no_undefined_local/3-lc$^0/1-0-"/2
(elixir) src/elixir_locals.erl:108: anonymous fn/3 in :elixir_locals.ensure_no_undefined_local/3
(stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
could not compile dependency :ueberauth_instagram, "mix compile" failed. You can recompile this dependency with "mix deps.compile ueberauth_instagram", update it with "mix deps.update ueberauth_instagram" or clean it with "mix deps.cl