Open Morningstar88 opened 5 years ago
In Elixir 1.8 the internals of the EEx engine have been changed in a way that was meant to be backwards compatible (since downstream projects shouldn't be relying on the internals). I am highlighting this issue in the hope that there is some way to improve the error message in Elixir itself. I've written a longer write-up in the phoenix_html project: phoenixframework/phoenix_html#247
https://elixirforum.com/t/how-to-get-the-call-stack-stack-trace-at-any-point-in-code/2787/3
Process.info(self(), :current_stacktrace)
:erlang.get_stacktrace/0.
https://elixir-lang.org/getting-started/debugging.html
def some_fun(a, b, c) do
require IEx; IEx.pry
...
end
rm -rf _build
returns:
** (BadMapError) expected a map, got: {:safe, [{:|, [], ["", "
https://stackoverflow.com/questions/31720200/compilation-error-on-file-lib-phoenix-ecto-html-ex
== Compilation error in file web/views/document_view.ex == ** (BadMapError) expected a map, got: {:safe, ""} (eex) lib/eex/engine.ex:161: EEx.Engine.handle_begin/1 (eex) lib/eex/compiler.ex:54: EEx.Compiler.generate_buffer/4 (phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2 (phoenix) lib/phoenix/template.ex:186: anonymous fn/3 in Phoenix.Template."MACRO-before_compile"/2 (elixir) lib/enum.ex:1940: Enum."-reduce/3-lists^foldl/2-0-"/3 (phoenix) expanding macro: Phoenix.Template.before_compile/1 web/views/document_view.ex:1: AlchemyBook.DocumentView (module) (elixir) lib/kernel/parallel_compiler.ex:208: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
*
Could be caused by an Elixir version conflict, May also be an error with cloud9 IDE.
Possible solutions:
https://elixirforum.com/t/update-elixir-from-1-7-4-to-1-8-0/19589/3
https://elixirforum.com/t/how-to-get-the-call-stack-stack-trace-at-any-point-in-code/2787
https://github.com/elixir-lang/elixir/ssiues/8790