Tests won't run on OTP 24
Closed this issue · 5 comments
Maybe it's intended for the lib. to not be tested/testable, at that time, but I guess we can try to preemptively fix these warnings.
Warning: erlang:get_stacktrace/0 is deprecated and will be removed in OTP 24; use use the new try/catch syntax for retrieving the stack backtrace
(obtained with rebar3 ct
on OTP 23).
The tests should run without issues - those warnings have no effect (the actual test code invokes the compiler on its own, outside of rebar3, in order to ensure that the parse transform does what it's supposed to do.)
But I think we can avoid the warnings by moving the test module away from rebar3's source paths. I'll give it a try.
I think we can avoid the warnings by moving the test module away from rebar3's source paths.
Easier said than done - rebar3 looks recursively for .erl
files within test/
, so a subdirectory is not an option. Changing the extension of test_module.erl
doesn't cut it, either, since it breaks the compiler invocation within the test suite.
I think I'll just apply some ifdef
s and duct tape and be done with it; that should be enough to make rebar3 ignore the code that produces the warnings.
Found it. You can disable the warnings with nowarn_deprecated_function
is profile test
's erl_opts
.
You can disable the warnings with nowarn_deprecated_function is profile test's erl_opts.
Thanks! (Perhaps my twin in a parallel universe where this issue still needs fixing will make good use of your solution.)