Giter Club home page Giter Club logo

Comments (7)

marsleezm avatar marsleezm commented on August 28, 2024

The implementation is done and I have added several unit tests to try to make sure that it is properly working. I also manually tested it in console of floppystore and seems it is working.
Please feel free to check and tell me if you agree with the implementation/naming or not. The link is
https://github.com/SyncFree/floppystore/blob/extra_crdt/src/riak_dt_mvreg.erl
I still have two doubts:

  1. Where should I put the file? I am putting it in src of floppystore and it can compile with unit test working, but I can not use it when running floppystore. Then I copied it to deps/riak_dt/src and I can use it in floppystore. But it does not seem a good idea to put it in that folder, as it could be easily overwritten...
  2. I didn't add any riak_test for it and I am not sure about what is supposed to test. Unit tests seem to be sufficient for it already.

from antidote.

cmeiklejohn avatar cmeiklejohn commented on August 28, 2024

Why did this get merged? According to dialyzer, it looks like this code has quite a few problems:

riak_dt_mvreg.erl:72: Invalid type specification for function riak_dt_mvreg:value/2. The success typing is ('timestamp',[any()]) -> [any()]
riak_dt_mvreg.erl:78: Invalid type specification for function riak_dt_mvreg:update/3. The success typing is ({'assign',_} | {'assign',_,_} | {'propagate',_,_},_,[any()]) -> {'ok',[any()] | {_,_}}
riak_dt_mvreg.erl:100: Call to missing or unexported function riak_dt_vclock:dominate/2
riak_dt_mvreg.erl:132: Call to missing or unexported function riak_dt_vclock:merge/2
riak_dt_mvreg.erl:146: The specification for riak_dt_mvreg:equal/2 states that the function might also return 'false' but the inferred return is 'true'
riak_dt_mvreg.erl:152: Type specification riak_dt_mvreg:stats(mvreg()) -> [{atom(),number()}] is a supertype of the success typing: riak_dt_mvreg:stats(riak_dt_mvreg:mvreg()) -> [{'value_size',non_neg_integer()},...]
riak_dt_mvreg.erl:156: The specification for riak_dt_mvreg:stat/2 states that the function might also return 'undefined' | float() but the inferred return is non_neg_integer()
riak_dt_mvreg.erl:159: The call riak_dt_mvreg:value('timestamp',MVReg::riak_dt_mvreg:mvreg()) contains an opaque term as 2nd argument when terms of different types are expected in these positions

from antidote.

bieniusa avatar bieniusa commented on August 28, 2024

I don't think that this merged?! But maybe I am reading the branch graph wrongly...
My email on the current status says: "Branch mvreg needs check and polishing! But it is not very urgent."

So, your check says: lots of things to fix!
@marsleezm: Can you fix these issues?

from antidote.

marsleezm avatar marsleezm commented on August 28, 2024

I have fixed most of these warning. I pushed it so you can check.

However still there are two left, which are the 161 and 163 line of the code. Dialyzer complains that doing pattern matching to mvreg will break its opaqueness, however I did that for many times in the code and only these two have warning. @cmeiklejohn , can you help?

from antidote.

cmeiklejohn avatar cmeiklejohn commented on August 28, 2024

We need to remove the unrelated QuickCheck code.

from antidote.

marsleezm avatar marsleezm commented on August 28, 2024

I deleted EQC code and made a pull request. Please check it if you have time.

from antidote.

cmeiklejohn avatar cmeiklejohn commented on August 28, 2024

Completed.

from antidote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.