Hi! I’m working on this small lib that provides a structure to better organize components on top of Phoenix’s views (influenced by AspNet’s and Ruby’s ViewComponents)…
I was testing some use-cases today and got this compile error that only happens when I use EEx templates. I have some unit tests for function calls that do not break, but when the code goes to an actual template it does break. I have a separate branch with a commit that contains a test case that better shows the problem:
The error I get is:
== Compilation error in file test/support/page_view.ex ==
** (CompileError) test/support/page.html.eex:1: undefined function arg0/0
(elixir 1.10.4) src/elixir_locals.erl:114: anonymous fn/3 in :elixir_locals.ensure_no_undefined_local/3
(stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
Also, while testing the lib in a Phoenix application, I got:
variable "arg0" does not exist and is being expanded to "arg0()", please use parentheses to remove the ambiguity or change the variable name