Does not compile with Elixir 1.7 and OTP 21
nifoc opened this issue · comments
Daniel Kempkens commented
$ elixir -v
Erlang/OTP 21 [erts-10.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Elixir 1.7.1 (compiled with Erlang/OTP 21)
cpg
is at version 1.7.3.
Running env DEBUG=1 mix deps.compile cpg
yields the following result:
===> Expanded command sequence to be run: []
===> Provider: {default,do}
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Provider: {default,app_discovery}
===> Provider: {bare,compile}
===> Compiling cpg
===> run_hooks("/Users/daniel/Documents/Work/foobar/project/deps/cpg", pre_hooks, compile) -> no hooks defined
===> run_hooks("/Users/daniel/Documents/Work/foobar/project/deps/cpg", pre_hooks, erlc_compile) -> no hooks defined
===> erlopts [debug_info,
{d,'ERLANG_OTP_VERSION_21'},
warnings_as_errors,strict_validation,warn_bif_clash,
warn_deprecated_function,warn_export_all,warn_export_vars,
warn_exported_vars,warn_obsolete_guard,warn_shadow_vars,
warn_unused_import,warn_unused_function,warn_unused_record,
warn_unused_vars]
===> files to compile ["/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg_data.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg_node_monitor.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/supervisor_cpg_sup.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg_callbacks.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg_app.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/cpg_sup.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/supervisor_cpg_spawn.erl",
"/Users/daniel/Documents/Work/foobar/project/deps/cpg/src/supervisor_cpg.erl"]
===> Compiled cpg_data.erl
===> Compiled cpg_node_monitor.erl
===> Compiled cpg.erl
===> Compiled supervisor_cpg_sup.erl
===> Compiling src/cpg_callbacks.erl failed
src/cpg_callbacks.erl:186: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
===> Compilation failed: {error,[],
[["src/cpg_callbacks.erl:186: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace\n"]]}
** (Mix) Could not compile dependency :cpg, "/Users/daniel/.asdf/installs/elixir/1.7.1-otp-21/.mix/rebar3 bare compile --paths "/Users/daniel/Documents/Work/foobar/project/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile cpg", update it with "mix deps.update cpg" or clean it with "mix deps.clean cpg"
I think this is happening because ERLANG_OTP_VERSION_21_FEATURES
isn't being defined correctly, which is weird because it looks like ERLANG_OTP_VERSION_21
is being set correctly.
Michael Truog commented
@nifoc Use the new version 1.7.4-rc1
to get Erlang/OTP 21.0 support. It has been published to hex along with the dependencies at the same version.