nitrogen / simple_bridge

A simple, standardized interface library to Erlang HTTP Servers.
MIT License
112 stars 76 forks source link

replaced get_stacktrace with new catch semantics #64

Closed bunnylushington closed 6 years ago

bunnylushington commented 6 years ago

Hi! With warnings_as_errors set, the depreciation warning for erlang:get_stacktrace/0 prevents compilation with Erlang 21. I think this patch resolves that issue correctly. (make test returns the same results, which is to say "14 ok, 1 failed, 1 skipped of 16 test cases."

choptastic commented 6 years ago

Thank you so much for the pull request!

Unfortunately, due to this being a backwards incompatible pull request, this particular change would have to wait.

The backwards compatible fix would be to make SimpleBridge use this: https://github.com/g-andrade/stacktrace_compat

This is a simple parse_transform that fixes the use of get_stacktrace for Erlang 21+, and leaves it in place for Erlang <21.

If you would make that change, I'd be happy to merge it, otherwise, it's something on my list of things to do.

choptastic commented 6 years ago

Thank you for the pull request. While I did not incorporate your submitted changes, I've updated it to use the stacktrace compat parse transform. Eventually, once Erlang 21 is old enough, I'll incorporate the new semantics. Thanks again!