andrewjstone / rafter

An Erlang library application which implements the Raft consensus protocol
269 stars 32 forks source link

Fixed compile warnings that prevented build on R17 #28

Closed bryanhunter closed 10 years ago

bryanhunter commented 10 years ago

Fixed 'type dict/0 is deprecated and will be removed in OTP 18.0' warnings that prevented build on R17.

To reproduce problem on a box running R17...

$ git clone git@github.com:andrewjstone/rafter.git $ cd rafter $ make deps $ make ... ==> rafter (compile) Compiled src/rafter_backend.erl Compiled src/rafter_app.erl compile: warnings being treated as errors include/rafter_consensus_fsm.hrl:22: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 include/rafter_consensus_fsm.hrl:27: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 include/rafter_consensus_fsm.hrl:35: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 make: *\ [rafter] Error 1

...fixed these...

$ make ... ==> rafter (compile) Compiled src/rafter_backend_echo.erl Compiled src/rafter.erl Compiled src/rafter_backend_ets.erl Compiled src/rafter_consensus_sup.erl compile: warnings being treated as errors src/rafter_config.erl:13: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_config.erl:37: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_config.erl:115: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_config.erl:128: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 make: *\ [rafter] Error 1

...fixed these...

$ make ... ==> rafter (compile) Compiled src/rafter_config.erl Compiled src/rafter_log.erl compile: warnings being treated as errors src/rafter_consensus_fsm.erl:475: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_consensus_fsm.erl:475: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_consensus_fsm.erl:487: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_consensus_fsm.erl:487: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_consensus_fsm.erl:493: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 src/rafter_consensus_fsm.erl:493: type dict/0 is deprecated and will be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2 make: *\ [rafter] Error 1

$ make ... All good. :)

bryanhunter commented 10 years ago

My, my! The pull request l sent was cotton-headed. Went to bed and woke up thinking "wait... did I put dict:new or dict:dict()"

I'll resubmit with specs that say dict:dict() instead of dict:new().