Open kurze opened 4 years ago
Hey,
I'm not massively familiar with your usecase and how apply/patch and reverse patch works, would you be able to provide an example of how it works?
I'm very much open to accepting new functionality, as long as it doesn't overly complicate the library.
If you're able to give some examples of usage, that would be a massive help.
Our use case is to keep changes history on a big structures. To avoid storing a big json at each change, we only want to store the diff on json format. Your lib handle this wonderfully. But we need to be able to advance or rollback at state for a given time, so take a version of the full struct then apply/revert a changelog.
In our case: The structure is a snapshot of direct and related user data taken at each writing action, that will be used for audit.
We already have a working version for our specific struct and we can probably generalized that.
Thanks for clarifying. That sounds like a very worthwhile feature and seems like a good fit for the library.
If you need any assistance in the implementation, let me know!
I to wanted to see Patch / Merge implemented for this however it appears that nobody took the initiative so I did. I forked the main repo and just finished an implementation.
I've also added a PR (#40) should you wish to consider this as an addition to the upstream library.
Hi, sorry for the latency about this issue, moving priority on the roadmap, I hope I will be able to go back on this subject during September. Thank you @kyenos, your pull request looks promising.
Hi there, awesome lib, thank you, but sadly it only fill half our need. We are currently implementing patch and reverse patch method for our internal need on known structures, but it seems more logical to be handle by the diff lib. Do you have support, plan to support or the willingness to accept a PR about apply/patch and revert diff on arbitrary structures ?