You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/01 22:02:03 UTC

[GitHub] iilyak opened a new pull request #1190: Fix dialyzer warning for couch_att:from_disk_term

iilyak opened a new pull request #1190: Fix dialyzer warning for couch_att:from_disk_term
URL: https://github.com/apache/couchdb/pull/1190
 
 
   ## Overview
   
   The `couch_att:from_disk_term` function is responible for conversion of
   a disk format to #att{} record. However the way it is called
   produces a dialyzer complaint.
   Because `couch_att:from_disk_term` is always called as
   `[couch_att:from_disk_term(Db, T) || T <- Doc1#doc.atts]`.
   
   The `atts` field of `#doc{}` record is defined as
   `[couch_att:att()] | binary()`
   
   This is problematic because `att()` definition doesn't include disk
   format representation. This commit adds disk format to the spec.
   
   
   ## Testing recommendations
   
   Run dialyzer tool and make sure there are no complains about `couch_att:from_disk_term`
   1. Prepare for analysis:
     ```
   make build-plt
     ```
   2. Run analysis 
     ```
   make dialyze apps=couch
     ```
   The dialyzer might fail but it shouldn't fail in analysis of couch_att.
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services