Closed guiloyins closed 10 years ago
Hi, It seems you can get weber to compile with Elixir v0.14.3 by adding a function head to the def tag/3 function in the file "lib/weber/helper/html_helper.ex" and removing the default value. Just did that this evening and it compiles successfully and runs. However please remember to also make the change in the weber that is downloaded as part of the dependencies when you create a new app.
the changes are below
------Original ----- def tag(html_tag, input_html, clauses \ []) when is_list(input_html) do do_clause = Keyword.get(clauses, :do, "") tag(html_tag, do_clause, input_html) end
-----After change ----
def tag(html_tag, input_html, clauses \ []) def tag(html_tag, input_html, clauses ) when is_list(input_html) do do_clause = Keyword.get(clauses, :do, "") tag(html_tag, do_clause, input_html) end
See #205.
Awesome. :+1:
Hi. I tried to compile today with the Elixir version 0.14.3 and got a compile error:
== Compilation error on file lib/weber/helper/html_helper.ex == \ (CompileError) lib/weber/helper/html_helper.ex:47: def tag/3 has default values and multiple clauses, define a function head with the defaults (elixir) src/elixir_def.erl:336: :elixir_def.store_each/8 (elixir) src/elixir_def.erl:107: :elixir_def.store_definition/9 lib/weber/helper/html_helper.ex:47: (module) (stdlib) erl_eval.erl:657: :erl_eval.do_apply/6 (elixir) src/elixir.erl:170: :elixir.erl_eval/3
make: \ [build] Erro 1
Any ideas what I did wrong?