chewbranca commented on code in PR #5491:
URL: https://github.com/apache/couchdb/pull/5491#discussion_r2155904960


##########
src/config/src/config_listener_mon.erl:
##########
@@ -13,6 +13,8 @@
 -module(config_listener_mon).
 -behaviour(gen_server).
 
+-dialyzer({nowarn_function, init/1}).

Review Comment:
   Heh... the `config` app has a Dialyzer warning on `init/1` which causes 
`make dialyze` to fail when processing `config`:
   
   ```
   ==> weatherreport (build-plt)
   ==> couch_prometheus (build-plt)
   ==> couch_scanner (build-plt)
   WARN:  ''build-plt'' command does not apply to directory 
/Users/chewbranca/src/couchdb_csrt_v3/rel
   WARN:  ''build-plt'' command does not apply to directory 
/Users/chewbranca/src/couchdb_csrt_v3
   ==> jiffy (dialyze)
   ==> recon (dialyze)
   ==> couch_epi (dialyze)
   ==> config (dialyze)
   src/config_listener_mon.erl:44:1: The inferred return type of init/1
            ('ok') has nothing in common with
             'ignore' |
             {'ok', _} |
             {'stop', _} |
             {'ok', _,
              'hibernate' | 'infinity' |
              non_neg_integer() |
              {'continue', _}}, which is the expected return type for the 
callback of the gen_server behaviour
   ERROR: dialyze failed while processing 
/Users/chewbranca/src/couchdb_csrt_v3/src/config: rebar_abort
   make: *** [dialyze] Error 1
   
   real    12m12.084s
   user    42m46.475s
   sys     1m38.891s
   ```
   
   but then even with `config` the `couch` app causes the next round of 
failures before we can get to the `couch_stats` app:
   
   ```
   src/couch_query_servers.erl:695:1: Function proc_stop/1 will never be called
   src/couch_query_servers.erl:699:1: Function proc_set_timeout/2 will never be 
called
   src/couch_query_servers.erl:703:1: Function get_ddoc_process/3 has no local 
return
   src/couch_query_servers.erl:720:1: Function get_os_process/1 has no local 
return
   src/couch_server.erl:109:9: The pattern
             'true' can never match the type
             'false'
   ERROR: dialyze failed while processing 
/Users/chewbranca/src/couchdb_csrt_v3/src/couch: rebar_abort
   make: *** [dialyze] Error 1
   
   real    0m29.667s
   user    1m41.333s
   sys     0m5.706s
   ```
   
   so I switched to just running `make && time make dialyze apps=couch_stats` 
as my goto workflow for Dialyze'ing CSRT, and then forgot about the 
`config_listener_mon`. I'll drop it as it's unrelated and far from fixing the 
issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to