erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

OTP20 brings a new warning, breaking the build of yaws #309

Closed srenatus closed 7 years ago

srenatus commented 7 years ago

Just a heads-up -- trying to build yaws under OTP20-rc2 breaks:

Making all in src
make[1]: Entering directory '/tmp/yaws-2.0.4/src'
  GEN      ../ebin/yaws.app
  GEN      ../ebin/yaws.appup
  ERLC     ../ebin/yaws.beam
  ERLC     ../ebin/yaws_app.beam
  ERLC     ../ebin/yaws_ticker.beam
  ERLC     ../ebin/yaws_config.beam
  ERLC     ../ebin/yaws_server.beam
compile: warnings being treated as errors
yaws_server.erl:2129: erlang:get_stacktrace/0 used following an old-style 'catch' may stop working in a future release. (Use it inside 'try'.)
Makefile:651: recipe for target '../ebin/yaws_server.beam' failed
make[1]: *** [../ebin/yaws_server.beam] Error 1

This is

$ erl --version
Erlang/OTP 20 [RELEASE CANDIDATE 2] [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

I'll switch back to 19.3 there, just wanted to share this. 😃

vinoski commented 7 years ago

Thanks! We tend to wait until the official Erlang/OTP release comes out before making any necessary changes, but this is helpful and is good information.

goncalotomas commented 7 years ago

@vinoski Hey! OTP 20 is out and I'm trying to add it to homebrew formulas. Just wanted to know if there's a plan to fix this other than removing the warnings_as_errors flag. :)

To keep this thread self-contained, here's the relevant information included in the readme document for OTP 20:

           Application(s): compiler
           In a future release, erlang:get_stacktrace/0 will
           probably only work when called from within a 'try'
           expression (otherwise it will return [].

           To help prepare for that change, the compiler will now
           by default warn if 'get_stacktrace/0' is used in a way
           that will not work in the future. Note that the warning
           will not be issued if 'get_stacktrace/0' is used in a
           function that uses neither 'catch' nor 'try' (because
           that could be a legal use if the function is called
           from within a 'try'.
vinoski commented 7 years ago

The fix for the erlang:get_stacktrace/0 issue is trivial, but beyond that there are some deflate-related test failures under Erlang/OTP 20 that I'm still investigating.

goncalotomas commented 7 years ago

I thought that get_stacktrace was the only problem with OTP 20. Thanks for the update!

vinoski commented 7 years ago

We figured out the deflate problem a few days ago but we have some SSL-related problems we're still looking into.

vinoski commented 7 years ago

See the erlang-otp-20 branch. Assuming Travis is happy with it, we'll merge it.

capflam commented 7 years ago

@vinoski, I pushed a fix for R16B0{1,2,3}. Now, all Travis builds succeeded. I'll merge it in master