Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile using Erlang 21. #141

Open
hickscorp opened this issue Jul 12, 2018 · 5 comments
Open

Cannot compile using Erlang 21. #141

hickscorp opened this issue Jul 12, 2018 · 5 comments
Milestone

Comments

@hickscorp
Copy link

Issue raised on jsone as well.

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"
@gomoripeti
Copy link
Collaborator

thank you for this ticket - btw what version of xprof do you use?

this deprecation notice is only a warning (many erlang libraries are hit by this) but specifically jsone sets the compile flag warnings_as_errors so this warning actually blocks the build. As I see there is already a PR in progress to fix this in jsone (sile/jsone#34)

  • when a new version of jsone is published with this fix you can specify that version in your top mix file (to override version specified by xprof) and that should help
  • until then you can probably override jsone with {erl_opts, [inline]} to remove the warnings_as_errors directive - I am not sure about the exact syntax of override in a mix file

This should help to address this particular issue, but tbh we haven't thoroughly tested with Erlang 21 (and we still need to support Erlang 16 so that puts some limitation on how fast we can go) so there might be some other issues coming up. Please keep us posted.

@DianaOlympos
Copy link

Hi, this has been fixed since jsone 1.4.6, see here sile/jsone#35 (comment)

Of course it is not a small bump, so it may needs a lot of testing for your depth of versions ...

@gomoripeti
Copy link
Collaborator

Thanks for the heads up @DianaOlympos.
I bumped jsone version to 1.4.7 on the release_2.0 branch (PR #143) and it will be included in the next 2.0.0 rc.
Let me know if someone would need this change backported to 1.x

@Santiniis
Copy link

@gomoripeti Are you sure that jsone was the only dependency that needs a bump? I believe that the stack traces warning for OTP21 were only addressed in Cowboy 2.5.0.

@gomoripeti
Copy link
Collaborator

@Santiniis you are absolutely right, thanks for the heads up. (I probably had cowboy already compiled with some older OTP and forgot to recompile.)
I did not put too much emphasis on cowboy versions as XProf itself can use any cowboy, it hardly uses a few HTTP GETs. So the parent project can decide which cowboy to use (Or if it does not use cowboy for other things do a rebar3 override on xprof_gui) Unfortunately (back when I last tried 1-2 years ago) rebar3 did not support the "~2.0.0" or "at least" notation.
Anyway I don't see any reason why not to bump also the default cowboy version of xprof.

@gomoripeti gomoripeti added this to the 2.0 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants