Giter VIP home page Giter VIP logo

Comments (13)

paxos avatar paxos commented on September 27, 2024 1

Update: 50K look good as well ✅

from differencekit.

paxos avatar paxos commented on September 27, 2024

I found another sequence that does not produce the correct results:

StagedChangeset(source: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], target: ["5", "1", "7", "4", "2", "10"])

If this gets applied via AppKit extension tableView.reload, the result is as follow:

Should be: ["5", "1", "7", "4", "2", "10"]
But is: ["5", "1", "2", "7", "4", "10"]

from differencekit.

paxos avatar paxos commented on September 27, 2024

I dont think any of the unit tests will capture this, as none of them check what the actual state is that AppKit ends up in. Any advice how this could be fixed?

Unfortunately, this is a serious issue and produces wrong results in some scenarios.

from differencekit.

paxos avatar paxos commented on September 27, 2024

I added some code that compares data vs AppKit state and demonstrates the mentioned error sequence:

paxos#2

from differencekit.

martindufort avatar martindufort commented on September 27, 2024

Any resolution on this as I'm seeing the same issue in the Appkit extension.

from differencekit.

ra1028 avatar ra1028 commented on September 27, 2024

I actually am not quite familiar with AppKit and the AppKit extension was added by another developer in this PR. So I won't give you any good resolution on the issue but if the proposed way works in any cases including edge cases and it's proved somehow, I would accept it to merge.

from differencekit.

paxos avatar paxos commented on September 27, 2024

The only working solution that I could find in the whole internet that is working reliably for AppKit was written by @GilesHammond and a version of it can be found here: paxos/NSOutlineViewPatchTestSuite#1

We added a test suite with randomized tests to verify this, and so far it has been working flawlessly.

from differencekit.

ra1028 avatar ra1028 commented on September 27, 2024

Interesting. It must be worth trying to incorporate into DifferenceKit if it really did pass 50k randomized test cases. Can you create a PR for it?

from differencekit.

paxos avatar paxos commented on September 27, 2024

I am not sure. The solution is based on native Swift CollectionDifference.
I believe the steps returned by DifferenceKit are not 100% compatible with the Sequence that AppKit expects each step to get applied.

from differencekit.

tobiasjordan avatar tobiasjordan commented on September 27, 2024

Can anyone run the 50k randomized test cases for my PR #144? Would be really great as I haven't found the time yet to implement some tests for my proposed solution.

from differencekit.

paxos avatar paxos commented on September 27, 2024

@tobiasjordan I have updated the testsuite to use differencekit here:
https://github.com/paxos/NSOutlineViewPatchTestSuite/tree/use-differencekit

Your fix is used starting in 6a31c8ab9dfa3f0d84e90653ba6906bd8345cc19 and so far it looks promising. 10K run successfully, 50K is still running.

from differencekit.

GilesHammond avatar GilesHammond commented on September 27, 2024

from differencekit.

paxos avatar paxos commented on September 27, 2024

Sorry Patrick. I’ve been slack on sharing this as a package! Would that be helpful in this case? Giles

On 27 May 2022, at 19:28, Patrick Dinger @.***> wrote:  I am not sure. The solution is based on native Swift CollectionDifference. I believe the steps returned by DifferenceKit are not 100% compatible with the Sequence that AppKit expects each step to get applied. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

no worries, i am good for now! thanks

from differencekit.

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.