Skip to content

Commit

Permalink
Merge pull request #300 from basho/features/lrb/otp-19-gh-299
Browse files Browse the repository at this point in the history
OTP 19 support
  • Loading branch information
lukebakken authored Jul 11, 2016
2 parents 2bf4a90 + f4028ba commit 261df63
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion RELNOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Release Notes
=============

* [2.4.1](https://github.com/basho/riak-erlang-client/issues?q=milestone%3Ariak-erlang-client-2.4.1)
* OTP 19 support via updated dependencies and a few platform defines
* [2.4.0](https://github.com/basho/riak-erlang-client/issues?q=milestone%3Ariak-erlang-client-2.4.0)
* This release merges in the Riak timeseries code base from the `2.3.1-timeseries` and `2.3.2-timeseries` releases.
* [2.1.2](https://github.com/basho/riak-erlang-client/issues?q=milestone%3Ariak-erlang-client-2.1.2)
* OTP 18 / 19 support
* OTP 18 support
* Fix processing of response from Riak when Riak generates an object's key [PR](https://github.com/basho/riak-erlang-client/pull/289)
Binary file modified rebar
Binary file not shown.
5 changes: 3 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
debug_info,
warnings_as_errors,
{platform_define, "^[0-9]+", namespaced_types},
{platform_define, "(?=^[0-9]+)(?!^17)", deprecated_now}
{platform_define, "(?=^[0-9]+)(?!^17)", deprecated_now},
{platform_define, "^19", deprecated_19}
]}.

{deps, [
{riak_pb, "2.1.*", {git, "git://github.com/basho/riak_pb", {tag, "2.1.4.0"}}}
{riak_pb, "2.1.*", {git, "https://github.com/basho/riak_pb", {tag, "2.1.4.1"}}}
]}.

{edoc_opts, [
Expand Down
9 changes: 5 additions & 4 deletions src/riakc_obj.erl
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,18 @@
%% ====================================================================

%% @doc Constructor for new riak client objects.
-spec new(bucket(), key()) -> riakc_obj().
-spec new(bucket(), key()) -> riakc_obj() | {error, atom()}.
new(Bucket, Key) ->
build_client_object(Bucket, Key, undefined).

%% @doc Constructor for new riak client objects with an update value.
-spec new(bucket(), key(), value()) -> riakc_obj().
-spec new(bucket(), key(), value()) -> riakc_obj() | {error, atom()}.
new(Bucket, Key, Value) ->
build_client_object(Bucket, Key, Value).

%% @doc Constructor for new riak client objects with an update value and content type.
-spec new(bucket(), key(), value(), content_type()) -> riakc_obj().
-spec new(bucket(), key(), value(), content_type()) ->
riakc_obj() | {error, atom()}.
new(Bucket, Key, Value, ContentType) ->
case build_client_object(Bucket, Key, Value) of
{error, Reason} ->
Expand All @@ -144,7 +145,7 @@ new(Bucket, Key, Value, ContentType) ->

%% @doc Build a new riak client object with non-empty key
-spec build_client_object(bucket(), key(), undefined | value()) ->
riakc_obj() | {error, atom()}.
riakc_obj() | {error, atom()}.
build_client_object(<<>>, K, _) when is_binary(K) ->
{error, zero_length_bucket};
build_client_object(B, <<>>, _) when is_binary(B) ->
Expand Down
4 changes: 4 additions & 0 deletions src/riakc_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,11 @@ remove_queued_request(Ref, State) ->
end.

%% @private
-ifdef(deprecated_19).
mk_reqid() -> erlang:phash2(crypto:strong_rand_bytes(10)). % only has to be unique per-pid
-else.
mk_reqid() -> erlang:phash2(crypto:rand_bytes(10)). % only has to be unique per-pid
-endif.

%% @private
wait_for_list(ReqId) ->
Expand Down

0 comments on commit 261df63

Please sign in to comment.