CrowdHailer / eex_html

Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.
https://hex.pm/packages/eex_html
Apache License 2.0
3 stars 5 forks source link

Library fails to compile: no function clause matching in EExHTML.sigil_E/2 #8

Open SachsKaylee opened 3 years ago

SachsKaylee commented 3 years ago

After an Elixir & OTP update this library fails to compile with the following reason:

==> eex_html
Compiling 3 files (.ex)

== Compilation error in file lib/eex_html.ex ==
** (FunctionClauseError) no function clause matching in EExHTML.sigil_E/2    
    expanding macro: EExHTML.sigil_E/2
    lib/eex_html.ex:255: EExHTML.javascript_variables/1
    (elixir 1.11.3) lib/kernel/parallel_compiler.ex:314: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

My elixir version:

└──╼ elixir -v
Erlang/OTP 23 [erts-11.1.6] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.11.3 (compiled with Erlang/OTP 23)

Opening this repo in my IDE it looks like the javascript_variables function doesn't know the ~E sigil. Maybe Elixir no longer allows using sigils in the same file that declared them? The same error also occurs on the Elixir master 0.12 development branch.

ejc123 commented 2 years ago

PR #9 fixes this issue.