sile / jsone

Erlang JSON library
MIT License
291 stars 72 forks source link

jsone fails to compile when using Erlang 21. #35

Closed hickscorp closed 6 years ago

hickscorp commented 6 years ago

I'm not too sure which one of my dependencies is relying on jsone (Might be the version required by the latest xprof as it compiles when removing xprof from my deps) - I noticed that it cannot be compiled using Erlang OTP 21 as part of an Elixir project. Tried using both Elixir 1.6.4, 1.6.5 and 1.6.6.

Compilation error:

===> Compiling jsone
===> Compiling src/jsone.erl failed
src/jsone.erl:261: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
src/jsone.erl:310: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

** (Mix) Could not compile dependency :jsone, "/home/doodloo/.mix/rebar3 bare compile --paths "/home/doodloo/Documents/Professional/TML/linky-api/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile jsone", update it with "mix deps.update jsone" or clean it with "mix deps.clean jsone"
pichi commented 6 years ago

It's only warning. Turn off the strict compilation.

sile commented 6 years ago

Since v1.4.6, jsone can be compiled in OTP-21 without compiler warnings. So if you can update jsone to the up-to-date version, the problem will be fixed.

hickscorp commented 6 years ago

@sile Confirmed - I'll notify xprof maintainers that they might want to update the dependency. Thanks!