Skip to content

Commit

Permalink
Dialyzer fixes and adjustments for EC
Browse files Browse the repository at this point in the history
* Add EC types oc_chef_container and oc_chef_group. This is a work
around and one which I'd like to see us solve in a more elegant
fashion. It's useful to have a type spec that provides the list of
known chef-world object types. But we need a way for other projects to
extend this list and make it sort of pluggable. For now, we're
hard-coding the addition of oc_chef_container and oc_chef_group as
used in EC.

* Relax the chef_updatable_object() type spec to just require a tuple.
Forcing a match on known record types makes it impossible to add in
custom records for EC. If we can find a way to make this pluggable in
future, great. For now this will do.
  • Loading branch information
Seth Falcon committed Nov 1, 2013
1 parent a10a8cf commit b8c8ce2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/chef_types.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
'chef_client' |
'chef_role' |
'chef_node'|
'chef_user'.
'chef_user' |
%% these belong to EC and should
%% eventually be included in a pluggable
%% fashion.
'oc_chef_container' |
'oc_chef_group'.

-type chef_type() :: 'data_bag' |
'data_bag_item' |
Expand Down Expand Up @@ -208,9 +213,4 @@
#chef_role{} |
#chef_node{}.

-type chef_updatable_object() :: #chef_cookbook_version{} |
#chef_data_bag_item{} |
#chef_environment{} |
#chef_client{} |
#chef_node{} |
#chef_role{}.
-type chef_updatable_object() :: tuple().

0 comments on commit b8c8ce2

Please sign in to comment.