Generated Erlang fails to compile #1527
Replies: 2 comments
-
Hi @David00154 ! This looks like a situation where Gleam compilation "succeeded" but resulting Erlang code is invalid or can't be compiled by your Erlang version. What's your Gleam compiler version? With current Gleam my resulting What's your Erlang version (what did you use to install it on Ubuntu 18.04)? Does it succeed on a clean compile (after running If it will still be an issue, can you provide your |
Beta Was this translation helpful? Give feedback.
-
Line 13 of that file is this Class:Reason:StackTrace ->
print_error(Class, Reason, StackTrace),
erlang:halt(127, [{flush, true}]) That makes me think this is an older version of Erlang that didn't have the stacktrace variable in try/catch yet. That would fit with it being the one packaged for Ubuntu 18.04. Could you try a newer version of Erlang? I think that will fix the problem. I'll convert this to a discussion as I think there is nothing for us to fix in the compiler here, but do let me know if I am wrong. |
Beta Was this translation helpful? Give feedback.
-
I'm on an ubuntu18 machine with erlang and gleam properly installed. Any time i run gleam run in my project folder i get an error
vagrant@ubuntu-18:/home/gleam/gleam_project$ gleam run
Compiling gleam_stdlib
Compiling gleeunit
Compiling gleam_project
build/dev/erlang/gleam_project/gleam@@main.erl:13: illegal pattern
build/dev/erlang/gleam_project/gleam@@main.erl:14: variable 'Reason' is unbound
build/dev/erlang/gleam_project/gleam@@main.erl:14: variable 'StackTrace' is unbound
error: Shell command failure
There was a problem when running the shell command
erlc
.Beta Was this translation helpful? Give feedback.
All reactions