Closed bryanhuntesl closed 6 years ago
WFM, but before I +1, can I ask if there is a way to ignore this warning as a compiler option, since it is used often in Riak code, especially in ifdef(test)
blocks
@russelldb - I could not find a way to do so, short of removing the rebar configuration which makes warnings as build errors. Probably best practice to not use export_all
anyway.
Not going to argue best practice wrt export_all
, but if this the best way to get around the warning, then +1 from me.
Ta @russelldb
Stumbled across this whilst looking into something else related. Can specify -compile(nowarn_export_all)
to suppress compiler errors. Bit quicker than exporting all functions, which I guess is fine for test modules.
What do you want to pass this test case? Make all public by default and ignore error on newer erlang version? Or stick with what we've got?
On Thu, 28 Dec 2017 5:21 AM Martin Cox, notifications@github.com wrote:
Stumbled across this whilst looking into something else related. Can specify -compile(nowarn_export_all) to suppress compiler errors. Bit quicker than exporting all functions, which I guess is fine for test modules.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/basho/riak-erlang-client/pull/367#issuecomment-354287497, or mute the thread https://github.com/notifications/unsubscribe-auth/Aego9kNMP9_I-DZGa5ubd8yDDqhPzFREks5tE5XNgaJpZM4QVT8J .
Definitely stick with what we've got I guess. Was just mentioning as I was looking into making another repo support OTP20.
So @manifest modified the rebar.config to make it work with Erlang 20. On my system it wouldn't run the eunit because in Erlang 20
-compiler(export_all)
produces warnings, and rebar.config defines warnings as build errors. So I've explicitly exported the necessary functions. I've tested this withkerl
erlang versions:Tested with:
Eunit tests passed.