editscript
editscript copied to clipboard
A library to diff and patch Clojure/ClojureScript data structures
Hey, great library, thanks for your work! I'd like to create edit scripts for Clojure code patches. Would it be feasible to add operations for structural editing? I'm thinking mainly...
If you are using Editscript, please comment on this issue.
This contains an update path: ```clojure (e/diff [1 [2 [3 4]]] [1 [2 [3 "🤔🤔🤔"]]]) => [[[1 1 1] :r "🤔🤔🤔"]] ``` This replaces the top level MapEntry: ```clojure (ns...
I want to implement a function `(diff3 a o b)` where `o` is common ancestor of `a` and `b`. The straightforward solution is combining editscripts of two diffs: `(patch o...
Right now, the sets are handled as maps, i.e. a map of keys to themselves. This will induce non-optimal edits, where a compound set element with slight change will be...
It is quite common to have a few atoms in the Clojure data structure. We should be able to handle them. e.g. maybe include a `:deref` step in the path.
Sometimes we do not need the detailed differences that are lower than certain level of depth, and it is sufficient to report the differences above the level.
First, I think this library is pretty interesting. I was wondering about one use case though: let's say you have entity `A_t0` (where t is analogous to a time step)...
Some use cases want to disallow replacement, so one can disable it in config.