basho / riak_dt

Convergent replicated datatypes in Erlang
Apache License 2.0
353 stars 70 forks source link

Mas 3.0 update #137

Closed martinsumner closed 4 years ago

martinsumner commented 4 years ago

There are two parts tot his PR. First the gset code which was missing from develop-3.0 is re-added in.

The second change is restricted to the dialyzer specs in riak_dt_map. This was previously leading to dialyzer failures. Looking at the code there were types:

field_name() :: {binary(), crdt_mod()} field() :: {field_name(), field_value()}

There were many function specs that expected field(), but looking at the actual functions they appeared to want field_name() instead. So I removed the definition of field(), and used field_name() throughout - and that pleased dialyzer. However, I'm not clear on map nomenclature - should this be called field() and not field_name()? Is this more than a labelling issue, have I misunderstood the problem?

@russelldb appreciate you might not have the time, but if you do have the chance let me know if I've done the right thing with regards to the riak_dt_map specs for field()/field_name().

martinsumner commented 4 years ago

The field_name()/field() switch was also in another open PR - https://github.com/basho/riak_dt/pull/132/files