Commit graph

385 commits

Author SHA1 Message Date
Orion Henry
2d31ed09cc canonical BinChange wip 2020-05-21 18:53:07 -04:00
Orion Henry
6654bb2fed ideas file for cli 2020-05-18 13:41:29 -04:00
Alex Good
0e5ce40cff Fix tests 2020-05-16 02:20:52 +01:00
Alex Good
9bb374b492 Run rustfmt 2020-05-14 01:05:01 +01:00
Alex Good
f8fe19ef08 run clippy 2020-05-14 00:54:06 +01:00
Orion Henry
df3f4f2eba c interface v2 2020-05-13 15:37:46 -04:00
Orion Henry
587ee83187 update readme 2020-05-13 12:13:42 -04:00
Orion Henry
50655c3b82 insert field in undo_ops 2020-05-13 11:47:10 -04:00
Orion Henry
200233c9a0 resolve time to second 2020-05-13 11:46:25 -04:00
Alex Good
f91aa3375b Remove From<&[u8]> for ChangeHash and add TryFrom<&[u8]> 2020-05-10 14:32:13 +01:00
Alex Good
49f69d741a Move ChangeHash into protocol/lib.rs and rename new -> zero 2020-05-10 14:16:48 +01:00
Alex Good
1e6038c3d7 Change ActorID::to_string -> ActorID::to_hex_string to avoid clashes with Display 2020-05-10 14:06:55 +01:00
Alex Good
1839348109 Remove pub export automerge_protocol:{..} from automerge-backend 2020-05-10 14:00:38 +01:00
Alex Good
8e8bee7fa1 Move Patch,Diff etc 2020-05-10 13:57:51 +01:00
Alex Good
f910845def Move Operation 2020-05-10 13:42:23 +01:00
Alex Good
21f3bec8ba Move Operation 2020-05-10 13:35:33 +01:00
Alex Good
45346d9617 Move Operation::{generate_redos, can_merge, and merge} to to backend.rs 2020-05-10 13:29:18 +01:00
Alex Good
4bd3f912c4 Move OpType 2020-05-10 13:17:46 +01:00
Alex Good
12c3ade5ab Move OpRequest, ReqOpType, and RequestKey 2020-05-10 13:12:30 +01:00
Alex Good
873c9791a1 Move resolve_key to backend.rs 2020-05-10 12:59:57 +01:00
Alex Good
fdc044d284 Move DataType and Value 2020-05-10 12:50:57 +01:00
Alex Good
7ee984a80d Move ElementID and Key 2020-05-10 02:03:16 +01:00
Alex Good
d37617b9a1 Move object ID 2020-05-10 01:46:43 +01:00
Alex Good
de0b05540e Move opid 2020-05-10 01:37:40 +01:00
Alex Good
2e28e2c01e Move ObjType 2020-05-10 01:22:04 +01:00
Alex Good
a8c1fb7ba1 Move ChangeHash to protocol crate 2020-05-10 01:08:04 +01:00
Alex Good
7b8a0ec6c9 Move ActorID 2020-05-09 20:03:45 +01:00
Orion Henry
c45351b121 first cut of the C api 2020-05-07 07:57:34 -07:00
Orion Henry
c6b6d59aa1 bugfix in RLE encode/decode 2020-05-06 10:31:50 -07:00
Orion Henry
bddccbe8fd tests passing for the new deps/hash api 2020-05-05 10:34:18 -07:00
Orion Henry
eebcee91dc patch refactor 2020-05-02 20:09:04 -07:00
Orion Henry
a5b0492c36 key/value/diff refactor 2020-04-29 14:49:53 -07:00
Orion Henry
bb881a373d added all the number types 2020-04-27 18:52:45 -07:00
Orion Henry
2c599d49d6 get tests working again 2020-04-27 14:22:04 -07:00
Orion Henry
74b9ecbcfe fmt 2020-04-27 10:53:18 -07:00
Orion Henry
c7874cc849 encoding in - tests passing 2020-04-27 09:18:48 -07:00
Orion Henry
ba44d3a717 set_stdio 2020-04-21 20:15:56 -07:00
Orion Henry
f58e2ffb4f clean up decoder trait 2020-04-21 17:32:10 -07:00
Orion Henry
e601f8c7d1 light cleanup 2020-04-21 13:20:25 -07:00
Orion Henry
fa125e94c5 clean up js errors 2020-04-21 13:08:00 -07:00
Orion Henry
eaa023e219 now taking arrays of binary changes as intended 2020-04-21 11:58:07 -07:00
Orion Henry
d855ab9283 decode binary changes 2020-04-21 10:54:25 -07:00
Orion Henry
13e8e01a79 use dynamic key resolver 2020-04-18 08:05:05 -07:00
Orion Henry
dbbf53cc55 reduce cloning with versions 2020-04-17 15:06:05 -07:00
Orion Henry
4f11bb8baa lots of little cleanup and micro ops in skip list 2020-04-17 10:06:10 -07:00
Orion Henry
6c70182ecd light cleanup 2020-04-17 08:50:24 -07:00
Orion Henry
bef7a9d4cc fix tests 2020-04-17 08:26:47 -07:00
Orion Henry
b2a2394647 orderedmap to orderedset 2020-04-17 08:20:01 -07:00
Orion Henry
586a7e179e performance experiment with ord deltas 2020-04-17 07:50:23 -07:00
Orion Henry
fe38f41569 integrate skiplist into backend 2020-04-16 06:07:40 -07:00
Orion Henry
2180f4ac46 cleanup 2020-04-13 21:27:32 -07:00
Orion Henry
f6da533b99 cleanup 2020-04-13 21:14:36 -07:00
Orion Henry
50ec30bdba added skip list - not used yet 2020-04-13 20:21:50 -07:00
Alex Good
1fefbd029e Run clippy 2020-04-13 19:23:32 +01:00
Alex Good
d173aa3b1b Remove ObjectID::Str and add some standard trait impls 2020-04-13 19:13:24 +01:00
Alex Good
bcbff29c0a
Run cargo fmt 2020-04-10 19:12:42 +01:00
Alex Good
02de5f6c8a
Run clippy 2020-04-10 19:07:51 +01:00
Alex Good
948ca78a8b Run cargo fmt 2020-04-10 14:36:26 +01:00
Alex Good
5fbc23fd75 Cleanup, add deserialization for DiffLink 2020-04-10 14:36:12 +01:00
Orion Henry
7233b23d86 Merge branch 'wip' of github.com:automerge/automerge-rs into wip 2020-04-02 09:41:27 -07:00
Orion Henry
95cb760f79 added clock to patch, some packaging cleanup 2020-04-02 09:39:41 -07:00
Martin Kleppmann
80a2e75e86 Add clock to all patches
Corresponds to automerge/automerge@29f307d2f2
2020-04-02 17:12:35 +01:00
Orion Henry
a85798cb8e try immutable data structures - move serde to its own file 2020-03-31 19:16:46 -07:00
Orion Henry
3642e990e3 some simple optimizations 2020-03-31 15:54:41 -07:00
Orion Henry
af34d7ef36 move undo stack and clock out of opset 2020-03-31 06:49:47 -07:00
Orion Henry
461c970e30 light edits 2020-03-30 16:45:28 -07:00
Orion Henry
f8aa3e2fd5 Reduce memory overhead for versions 2020-03-30 16:04:24 -07:00
Orion Henry
ccd90c1e61 version.rc<op_set> 2020-03-30 15:27:09 -07:00
Orion Henry
fca6e1c09e move things out of op_set that are not needed 2020-03-30 15:15:30 -07:00
Orion Henry
9eed955d18 keep a cache of elemids in the object 2020-03-30 14:32:38 -07:00
Orion Henry
f7b3a57d20 handle insert remove properly in diffs - preserve undo stack 2020-03-30 08:42:25 -07:00
Orion Henry
f97e36f770 linked diffs dont need to be remapped 2020-03-29 23:58:23 -07:00
Orion Henry
9ffb4624c1 Noop when deleteing a delete 2020-03-29 23:22:10 -07:00
Orion Henry
7e9b49f4bd Refactor the undo and diffs to be return args instead of pass by mut ref 2020-03-29 23:14:48 -07:00
Orion Henry
09f4e09030 fixed a bug where detached objects would error on diff generation 2020-03-29 22:55:26 -07:00
Orion Henry
319993cd6a add links 2020-03-29 18:35:39 -07:00
Orion Henry
6c0f21e47e elemids not properly deleting 2020-03-29 16:42:15 -07:00
Orion Henry
e24e073c10 code cleanup around diff generation 2020-03-29 15:58:24 -07:00
Orion Henry
853a5223b4 special case to serialize empty diffs 2020-03-29 13:24:24 -07:00
Orion Henry
1c92dc6d24 undo/redo 2020-03-29 10:12:55 -07:00
Orion Henry
8380c6a451 merge cleanup 2020-03-29 07:33:52 -07:00
Orion Henry
058a0f6b3e move op_handle into its own file 2020-03-28 23:42:01 -07:00
Orion Henry
7aa7ebe968 light cleanup 2020-03-28 22:44:11 -07:00
Orion Henry
bd338e9ee2 bug in the command compressing code 2020-03-28 21:33:42 -07:00
Orion Henry
d13a859039 light cleanup 2020-03-28 20:19:58 -07:00
Orion Henry
6e76450f5a error on set=null 2020-03-28 18:49:31 -07:00
Orion Henry
b9d003d13d bug in my element iterator 2020-03-28 18:34:06 -07:00
Orion Henry
45ecce648d some light cleanup 2020-03-28 16:02:58 -07:00
Orion Henry
9fa6ea8520 combile similar ops when generating a change 2020-03-28 15:48:31 -07:00
Orion Henry
5609c1a3e8 big operation refactor 2020-03-28 14:46:31 -07:00
Orion Henry
899feaefb1 simple refactor - apply_ops 2020-03-28 08:27:11 -07:00
Orion Henry
923b767d0a columner encoding 2020-03-27 08:15:57 -07:00
Orion Henry
1152b6006c break out ObjectID from OpID - implement table obj_id hack 2020-03-26 16:50:26 -07:00
Orion Henry
8ee72ba1e2 flatten out oprequest struct 2020-03-26 07:31:48 -07:00
Orion Henry
a0ece5c413 forgot to add helpers 2020-03-25 15:18:22 -07:00
Orion Henry
8139f83dfd fixed increment 2020-03-25 15:09:24 -07:00
Orion Henry
771c6bee18 all backend tests passing 2020-03-25 14:15:23 -07:00
Orion Henry
0a4e28a52d fix deps/pred/insert bugs 2020-03-25 13:13:36 -07:00
Orion Henry
d016278107 make child optional 2020-03-24 13:07:48 -07:00
Orion Henry
22f06f79c6 get_patch() works 2020-03-24 12:12:51 -07:00
Orion Henry
76491bc07d wip 2020-03-23 21:21:01 -07:00
Orion Henry
2e80b5b3a2 wip 2020-03-23 11:20:10 -07:00
Orion Henry
2aaeb4788c wip 2020-03-22 14:36:15 -04:00
Orion Henry
3ec6991b40 wip 2020-03-20 15:17:44 -04:00
Orion Henry
5ce3a177b1 wip 2020-03-19 14:14:08 -04:00
Orion Henry
7b866b98b9 wip - 7 tests passing 2020-03-17 12:59:08 -04:00
Orion Henry
ce21167174 wip 2020-03-16 15:12:27 -04:00
Orion Henry
d25137875b dont dupe change 2020-03-11 13:45:52 -04:00
Orion Henry
8f3e664d2d empty clock comment 2020-03-11 12:28:47 -04:00
Orion Henry
6e0933099f pr feedback cleanup 2020-03-11 12:19:27 -04:00
Orion Henry
9c5186b3d2 panic if wrong sized 2020-03-11 11:29:25 -04:00
Orion Henry
bae6c2fcb6 cleanup 2020-03-11 11:09:33 -04:00
Orion Henry
355f1cd5e2 fix transitive deps bug, refactor actor_histories, remove root_value 2020-03-11 11:04:43 -04:00
Orion Henry
00d00f56a9 cleanup Clock 2020-03-05 19:35:19 -05:00
Orion Henry
320e51bfd8 get_missing_changes rewrite 2020-03-05 15:04:29 -05:00
Orion Henry
5309b44194 lazy fork, op.cmp(fix) 2020-03-05 14:42:34 -05:00
Orion Henry
30a132f529 dont report 0 in deps 2020-03-05 11:53:13 -05:00
Orion Henry
f3070c0a8c get_missing_deps needs self.actor/seq too 2020-03-05 11:48:32 -05:00
Orion Henry
68048b801c diverge doc, less_or_equal fix 2020-03-05 11:20:12 -05:00
Alex Good
021ba56464 Fix concurrent increment operations 2020-03-05 15:43:53 +00:00
Alex Good
79f49969f4 Fix ordering of concurrent inserts in lists 2020-03-05 13:42:22 +00:00
Alex Good
7a532e02f3 Fix tests, formatting, clippy 2020-03-05 11:15:01 +00:00
Orion Henry
41012d2853 undo/redo stack 2020-03-04 22:21:06 -05:00
Orion Henry
8e63bc798a fix undoable bug, transit-js bug 2020-03-04 20:54:49 -05:00
Orion Henry
0e6f3ab027 replace is_applied 2020-03-04 15:07:18 -05:00
Orion Henry
5ca6f9c9a8 is_applied fix 2020-03-04 14:31:47 -05:00
Alex Good
08bc51ad28 Fix get_missing_changes 2020-03-04 17:19:13 +00:00
Orion Henry
1a3d3af655 adding history 2020-03-04 12:10:35 -05:00
Alex Good
3d6a8607fd Add tweaks to WASm interface 2020-03-04 14:38:50 +00:00
Alex Good
2078a59e06 Merge branch 'master' into final-impls 2020-03-02 12:05:25 +00:00
Alex Good
ff79872af3 Run cargo fmt on tests too 2020-03-02 12:05:11 +00:00
Alex Good
10de85993b Merge branch 'master' into final-impls 2020-03-02 12:03:50 +00:00
Alex Good
2ef5d782e3 Run clippy on tests too 2020-03-02 12:03:39 +00:00
Alex Good
2c2fb9704d Implement remaining methods on backend 2020-03-02 11:35:51 +00:00
Alex Good
aada808bc8 Run rustfmt and clippy 2020-02-29 15:26:38 +00:00
Alex Good
57a93e8db8 Consolidate ObjectState impls 2020-02-29 15:21:03 +00:00
Alex Good
f9c6aa5073 Correctly support multiple undo/redo operations 2020-02-29 14:59:03 +00:00
Alex Good
78855be049 Run clippy 2020-02-28 17:46:20 +00:00
Alex Good
3fcf08480d Merge branch 'master' into undo 2020-02-28 17:40:45 +00:00
Alex Good
cdbb339920 Redo implemented 2020-02-28 17:26:41 +00:00
Orion Henry
9752c7d512 fix bug with list patch after numbers not counting for deleted fields 2020-02-28 11:45:43 -05:00
Alex Good
84929b3620 Undo implemented 2020-02-28 16:18:50 +00:00
Orion Henry
d15d6da00c code cleanup 2020-02-28 11:16:00 -05:00
Orion Henry
072010de6d rustfmt 2020-02-28 09:35:40 -05:00
Alex Good
4e0d0c9ef3 WIP 2020-02-28 13:51:05 +00:00
Alex Good
eb2a8aaee7 First stab at undo support 2020-02-28 12:39:03 +00:00
Orion Henry
0fbae3ce81 all get_patch tests passing 2020-02-28 01:12:02 -05:00
Orion Henry
17f886936d unbreak tests 2020-02-27 16:15:54 -05:00
Orion Henry
8f47b8e0cf migrate to new changerequest format 2020-02-27 14:40:55 -05:00
Orion Henry
db9498c91c thorw error on duplicate change 2020-02-27 14:23:22 -05:00
Alex Good
5063335b86 Modify WASM interface to use ChangeRequest for applyLocalChange 2020-02-27 19:19:34 +00:00
Alex Good
f4bd5d1984 Add ChangeRequest and associated serialization logic 2020-02-27 19:17:58 +00:00
Orion Henry
ba937eab6d Merge branch 'master' of github.com:alexjg/automerge-rs 2020-02-27 13:41:16 -05:00
Orion Henry
d79ee1a06c applyLocalChange() v1 2020-02-27 13:41:08 -05:00
Alex Good
39b43477a9 Rename ObjectHistory -> ObjectState 2020-02-27 18:07:50 +00:00
Alex Good
79a6240cbc Remove commented out js in tests 2020-02-27 18:05:20 +00:00
Alex Good
2f0ed3ed09 Fix buggy simplifyDiffs, completing applyChanges implementation 2020-02-27 18:03:48 +00:00
Alex Good
952c4b4030 Add diff simplification 2020-02-27 17:46:18 +00:00
Alex Good
a0807bc2f8 Add delete sequence element test 2020-02-27 17:14:23 +00:00
Alex Good
6ae761d299 Fix list patch generation 2020-02-27 16:42:32 +00:00
Alex Good
da8e23dd7e Merge branch 'master' into more-diffs 2020-02-26 18:16:36 +00:00
Alex Good
eccc907cf2 WIP 2020-02-26 18:07:45 +00:00
Orion Henry
0c2152ba57 migrated back to jsvalue::serde - fixed conflicts:[] 2020-02-26 12:29:34 -05:00
Alex Good
f1afb83f7d List insert tests passing 2020-02-26 14:23:57 +00:00
Alex Good
a16c5e02b6 Add elemId to InsertSequenceElement 2020-02-26 13:45:25 +00:00
Alex Good
1b73a2a4ac Add some diff generation tests 2020-02-25 19:36:53 +00:00
Alex Good
f45edb3dbe Add conflict generation 2020-02-25 18:53:52 +00:00
Alex Good
cd8af1a10a Run clippy 2020-02-25 18:13:41 +00:00
Alex Good
fe862a9fe6 Some very simple diffs being generated 2020-02-25 17:54:13 +00:00
Alex Good
bfc89cf0d4 Broken WIP 2020-02-21 14:56:03 +00:00
Alex Good
28cf791aa7 Add error to backend type signatures 2020-02-15 12:53:04 +00:00
Alex Good
5e5747cc1e First diff generation working 2020-02-15 12:45:18 +00:00
Alex Good
194732d910 Run rustfmt 2020-02-15 11:28:08 +00:00
Alex Good
ca9e2ce429 Move backend into it's own module 2020-02-15 11:27:42 +00:00
Alex Good
cdbb98e080 Move patch into it's own module 2020-02-15 11:25:45 +00:00
Alex Good
79cc50b55e Move core logic into backend crate 2020-02-15 11:22:00 +00:00
Alex Good
ff505e1468 Add deserialization, fixes #2 2020-02-14 19:35:28 +00:00
Alex Good
47904467cd Add serialization tests for diffs 2020-02-14 14:19:19 +00:00
Alex Good
a328b91a18 Move custom serde to separate module 2020-02-14 13:04:54 +00:00
Alex Good
1ae9a70109 WIP 2020-02-14 12:50:03 +00:00
Alex Good
3f5dae3249 Merge branch 'master' into diffs 2020-02-14 12:21:55 +00:00
Alex Good
b3e6551355 Add patch and diff details 2020-02-13 17:01:05 +00:00
Orion Henry
f07c0bfe6d importing first pass at wasm-bindgen interface 2020-02-13 11:34:30 -05:00
Alex Good
2afcd1bbb6 Stub out backend interface 2020-02-13 13:28:44 +00:00
Alex Good
4c428702f6 Create automerge-backend and automerge-wasm crates 2020-02-13 11:45:32 +00:00