Commit graph

403 commits

Author SHA1 Message Date
Alex Good
33328796cd Remove mutable reference to actors in OpSet::finalize_diffs 2021-02-12 12:03:10 -05:00
Alex Good
08f324f7e6 Merge ref encoding/decoding and value encoding/decoding 2021-02-12 12:03:10 -05:00
Alex Good
26dfc7ea40 Implement cursor logic in backend 2021-02-12 12:03:10 -05:00
Alex Good
2d31952d77 Implement encoding and decoding of cursor operations 2021-02-12 12:03:10 -05:00
Orion Henry
ef38e6d7da getting some WASM errors trying to access crypto in the browser - switching to SmallRng with a 0 seed for now - deterministic distribution of nodes in the skip list should be fine 2021-02-12 11:49:06 -05:00
Matt Ho
0c44edd919
fixed typos (#43) 2021-02-01 10:57:11 +00:00
Alex Good
a28ae6edb6 Fix dependency encoding in document format 2021-01-31 15:59:51 +00:00
Orion Henry
db2d540cae zero length error 2021-01-29 17:59:57 -05:00
Orion Henry
c135b02a48 full document compression 2021-01-29 17:55:59 -05:00
Alex Good
ae4b9f8f94 Add some benchmarks and make some performance related tweaks 2021-01-25 13:49:38 +00:00
Orion Henry
82deb8a517 fix succ/pred bugs on doc uncompress 2021-01-22 15:32:36 -05:00
Orion Henry
9a90a8f84c add full document decompression 2021-01-22 13:32:50 -05:00
Alex Good
c45d055ce3 Fix clippy 2021-01-16 17:55:30 +00:00
Alex Good
497372db99 Immutable frontend rewrite 2021-01-16 17:40:47 +00:00
Orion Henry
4f61f7da08 simplified encoding code - 1 less copy 2021-01-14 15:23:42 -05:00
Orion Henry
cd6d83ef6d removed an unnecessarry round trip from the change encoder 2021-01-14 14:51:54 -05:00
Alex Good
7cd1a059f5 Add proptest for serialization 2021-01-14 12:30:25 -05:00
Alex Good
3c4d64c8a0 Add extra_bytes 2021-01-14 12:30:25 -05:00
Alex Good
3187afcc51 Use more expressive Operation structure 2021-01-14 12:30:25 -05:00
Orion Henry
b6d6b66c06 UncompressedChange moved packages 2021-01-14 12:30:25 -05:00
Alex Good
ce38f5360b Move automerge_backend::UnencodedChange -> automerge_protocol::UncompressedChange 2021-01-14 12:30:25 -05:00
Orion Henry
0b469640d4 update format-tweaks to serialize properly 2021-01-12 14:45:32 -05:00
Martin Kleppmann
4f9e07a29d Allow extra bytes at the end of a change
Corresponding to automerge/automerge@7f2e9f4897
2021-01-12 14:45:32 -05:00
Martin Kleppmann
1350b3e4be Move index of columns ahead of the column data
Corresponding to automerge/automerge@d7f97c5387
2021-01-12 14:45:32 -05:00
Martin Kleppmann
fae835343f Require strictly monotonically increasing column IDs 2021-01-12 14:45:32 -05:00
Martin Kleppmann
13b3faf921 Move deps closer to the start of an encoded change
Corresponding to automerge/automerge@7d9adb4807
2021-01-12 14:45:32 -05:00
Orion Henry
83145b82c4 add getHeads() and new deps functionality 2021-01-01 17:39:44 -05:00
Orion Henry
f3049202a7 update api to localChange 2020-12-30 15:27:07 -05:00
Orion Henry
b8d71f3b53 remove undo/redo 2020-12-17 19:13:05 -05:00
Orion Henry
939ccf38aa adding ack function 2020-11-12 11:03:44 -05:00
Orion Henry
1d126dd263 faster max_op calc 2020-11-10 12:25:07 -05:00
Peter van Hardenberg
0a5e39b5fa wip 2020-11-09 15:30:31 -08:00
Orion Henry
d5b49316e7 wip 2020-11-09 18:11:49 -05:00
Orion Henry
d8d24e23a5 remove extra clone 2020-11-09 14:23:24 -05:00
Orion Henry
d03abd7457 fmt 2020-11-09 09:50:27 -05:00
Orion Henry
c2768c5ebc refactor process_request to feed the ops in one at a time removing the
dobule list management ops
2020-11-09 09:48:45 -05:00
Orion Henry
39add00bf9 fxbuildhasher 2020-11-09 09:48:45 -05:00
Orion Henry
26a5d05fe2 copy2 changes 2020-11-09 09:48:45 -05:00
Orion Henry
c1319e06eb patch has a slightly different format now 2020-09-09 12:52:25 -04:00
Orion Henry
783f615a23 update to use new format for encoding key=_head 2020-09-08 16:53:07 -04:00
Orion Henry
fb3b56112c update binary encoding for op actions to match js implementation 2020-09-08 16:29:24 -04:00
Orion Henry
ce75f5e29e add a deserializer for message 2020-06-05 17:48:51 -04:00
Orion Henry
fbc70ba0e3 UnencodedChange.message is a required field according to typescript - default to emptystring 2020-06-05 17:07:33 -04:00
Alex Good
1ef10f6450 Remove unnecessary in tests 2020-06-04 14:59:19 +01:00
Alex Good
80409879e0 More clippy shenanigans 2020-06-04 14:51:24 +01:00
Alex Good
7585a9d7a1 Run clippy on nightly 2020-06-04 10:30:27 +01:00
Alex Good
2cf2835e76 Make Patch::clock keys ActorID rather than String 2020-05-30 01:44:00 +01:00
Alex Good
62345c2b5f Make Patch::actor an ActorID, not a string 2020-05-30 01:24:26 +01:00
Alex Good
a36a364443 Rename automerge_protocol::Value -> ScalarValue 2020-05-29 21:04:29 +01:00
Alex Good
b7527c28eb Stop child IDs which are valid object IDs raising MissingObjectError 2020-05-25 19:24:45 +01:00
Alex Good
baaebef6d1 Merge branch 'master' into two-level-objtype 2020-05-25 18:47:46 +01:00
Orion Henry
ab71d01487 internal types impl COPY 2020-05-25 09:43:28 -04:00
Alex Good
2443cdf860 Remove objtype wrapper for diffs 2020-05-24 11:06:23 +01:00
Alex Good
40c8f8f9b3 Move ObjType to two level hierarchy 2020-05-24 10:22:18 +01:00
Orion Henry
cbfac9a7b2 clearly show when using external types via amp:: 2020-05-23 12:38:31 -04:00
Orion Henry
a8cb2d805b opid should have an actor not a string 2020-05-23 12:15:53 -04:00
Orion Henry
48dfd6f29a ActorID is now bytes 2020-05-22 19:00:39 -04:00
Orion Henry
87b44cf977 ChangeRequest->Request 2020-05-22 16:11:26 -04:00
Orion Henry
c6ec8515af move OpType and Operation back to Backend 2020-05-22 15:54:14 -04:00
Orion Henry
e9c03ccdaa BinChange is now Change 2020-05-22 15:16:42 -04:00
Orion Henry
a6f1499b2f Change -> UnencodedChange 2020-05-22 15:10:19 -04:00
Orion Henry
92d357efe7 break out change - do some cleanup 2020-05-22 14:57:51 -04:00
Orion Henry
89a1ed46f7 move change back to the backend repo 2020-05-22 13:54:02 -04:00
Orion Henry
ad1b1490d8 fmt 2020-05-21 19:05:57 -04:00
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
67f857f248 Run rustfmt 2020-05-16 02:23:26 +01: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
9daf1053e6
Formatting and clippy 2020-04-10 18:55:59 +01:00
Alex Good
0ed6586a04 Port backend tests 2020-04-10 18:54:13 +01:00
Alex Good
ce856d4213 wip 2020-04-10 17:23:09 +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