Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type specs are wrong but don't run due to deprecated format [JIRA: RIAK-2811] #865

Open
paulhenrich opened this issue Oct 10, 2016 · 0 comments

Comments

@paulhenrich
Copy link

@jvoegele and I found this while looking into the crash reported against riak_kv.

In riak_core_bucket, the type spec uses the old comment format and doesn't run. Additionally it doesn't reflect the actual behavior. In particular, the ok case doesn't return a tuple it just returns the Bucket Props. Also, the type definition for riak_core_bucket_props is out of date.

%% @spec get_bucket(riak_object:bucket()) ->
%%         {ok, BucketProps :: riak_core_bucketprops()} | {error,  no_type}

It should be something like:

-spec get_bucket(riak_object:bucket()) -> BucketProps :: riak_core_bucketprops() | {error,  no_type}.

which exits with a blank/unhelpful error when we run make dialyzer and we need to figure out what's actually going here.

@Basho-JIRA Basho-JIRA changed the title Type specs are wrong but don't run due to deprecated format Type specs are wrong but don't run due to deprecated format [JIRA: RIAK-2811] Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants