Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 7, 2017

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 with kerl erlang versions:

  • 16b02-basho10
  • 17.5
  • 18.3
  • 19.3
  • 20.1

Tested with:

rm -rf .eunit ebin deps && ./rebar get-deps && ./rebar compile && ./rebar eunit 

Eunit tests passed.

@russelldb
Copy link
Contributor

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

@ghost
Copy link
Author

ghost commented Dec 11, 2017

@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.

@russelldb
Copy link
Contributor

Not going to argue best practice wrt export_all, but if this the best way to get around the warning, then +1 from me.

@russelldb russelldb merged commit e4efcb7 into basho:develop Dec 11, 2017
@ghost
Copy link
Author

ghost commented Dec 11, 2017

@ghost ghost deleted the feature/erlang-20-bryan-enhanced branch December 11, 2017 12:51
@martincox
Copy link
Contributor

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.

@ghost
Copy link
Author

ghost commented Dec 29, 2017 via email

@martincox
Copy link
Contributor

Definitely stick with what we've got I guess. Was just mentioning as I was looking into making another repo support OTP20.

@ghost ghost mentioned this pull request Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants