small medium large xlarge

10 Aug 2014, 00:26
Bill Christian (5 posts)

Using Elixir 0.15, the example code given for project/5/issues/lib/issues/cli.ex fails to resolve the import of Issues.TableFormatter.

Error received:

Compiled lib/issues/table_formatter.ex

== Compilation error on file lib/issues/cli.ex ==
** (CompileError) lib/issues/cli.ex:19: module Issues.TableFormatter is not loaded and could not be found
(elixir) src/elixir_exp.erl:121: :elixir_exp.expand/2
(stdlib) lists.erl:1352: :lists.mapfoldl/3
(stdlib) lists.erl:1353: :lists.mapfoldl/3
(elixir) src/elixir_exp.erl:49: :elixir_exp.expand/2
(elixir) src/elixir.erl:201: :elixir.quoted_to_erl/3
(elixir) src/elixir.erl:170: :elixir.erl_eval/3

Vader:issues billc$ ls ./lib/issues
cli.ex			github_issues.ex	table_formatter.ex

TableFormatter code copied from book link. Is there any particular reason the import would fail to resolve. No other problems if I remove the import and prefix the print method call with fully qualified name.

10 Aug 2014, 03:53
Bill Christian (5 posts)

I retrieved the complete source from the site. I was able to compile and execute. From my source compare, the built version matches the official repo. So, I am not sure why the issue. Perhaps an environment problem, but I am unclear on what could cause the table_formatter.ex file to be not referenced correctly.

You must be logged in to comment