Commit graph

712 commits

Author SHA1 Message Date
Vedant Roy
08209a4fd8 Switch to new json macro 2021-05-28 11:26:08 -07:00
Vedant Roy
5a3b767b7b Continue implementing infra 2021-05-28 11:26:08 -07:00
Vedant Roy
8b74a99b50 Implement basic infra for new C api 2021-05-28 11:26:08 -07:00
Vedant Roy
ef3289da14
Merge pull request #154 from automerge/msgpack-serde
Serialize/Deserialize OpType so it works with msgpack
2021-05-27 17:18:00 -07:00
Vedant Roy
ae3c3cd563 Avoid return 2021-05-27 17:17:16 -07:00
Vedant Roy
5f7628143d Use return... a bit less 2021-05-27 16:58:16 -07:00
Vedant Roy
f2c0a4953e Report incorrect variant error to serde in RawDiffType::deserialize 2021-05-27 16:54:34 -07:00
Alex Good
623d09d19f Report incorrect variant error to serde in RawOpType::deserialize 2021-05-28 00:40:09 +01:00
Vedant Roy
32f0821e0e Make another enum work with msgpack 2021-05-27 16:33:49 -07:00
Vedant Roy
c845351224 Serialize/Deserialize OpType so it works with msgpack 2021-05-27 15:54:07 -07:00
Andrew Jeffery
edf9edd35e
Simplify apply root diff (#150) 2021-05-26 11:45:30 +01:00
Andrew Jeffery
51f50b8f5c
diffable seq: Avoid rebuilding the updating list each time (#149)
This means we can keep things in the original state but while applying
the diff we don't have to keep building a new vec each time.

This makes B1.1 run in ~11 seconds for me.
2021-05-26 09:17:08 +01:00
Andrew Jeffery
fc50871b8e
Merge pull request #148 from automerge/diffable-sequence-remove-unused
Remove unused variables in diffable sequence
2021-05-25 23:25:09 +01:00
Andrew Jeffery
949d7b9f62 Remove unused variables
These were likely used at one point but now just incur an expensive
allocation cost. This reduces the B1.1 Append N characters benchmark
from ~19s to ~16s.
2021-05-25 22:45:36 +01:00
Andrew Jeffery
ac080c7b74
Merge pull request #147 from automerge/sort-pred
Sort predecessors during encoding
2021-05-25 11:40:18 +01:00
Andrew Jeffery
e98ed15582 Sort predecessors during encoding 2021-05-25 11:29:25 +01:00
Orion Henry
72d15bfe99 a few things broke in the merge 2021-05-24 16:27:05 -04:00
Andrew Jeffery
8876667a55 Set console_error_panic_hook when initing a backend 2021-05-24 13:19:39 -07:00
Andrew Jeffery
4e5f1e1451 Dont document cli 2021-05-24 13:18:44 -07:00
Andrew Jeffery
ad30c4ab4c Dont document the C lib
This gives an error due to the duplicate name.
2021-05-24 13:18:44 -07:00
Vedant Roy
2659efc335 Change outdated error message 2021-05-24 13:17:37 -07:00
Vedant Roy
aaccefcb11 Switch back to using Vec<u8> 2021-05-24 13:17:37 -07:00
Vedant Roy
b6db78329a Satisfy clippy 2021-05-24 13:17:37 -07:00
Vedant Roy
bc249bb630 Fix serialization + add test 2021-05-24 13:17:37 -07:00
Vedant Roy
6539029eaa Add apply_patch test 2021-05-24 13:17:37 -07:00
Vedant Roy
22af56b059 Internal representation = base64 string 2021-05-24 13:17:37 -07:00
Vedant Roy
41021f398f Add bytes type 2021-05-24 13:17:37 -07:00
Vedant Roy
73bc44edbc Add comments from JS version 2021-05-24 13:15:20 -07:00
Vedant Roy
60c04c13a4 add c binding 2021-05-24 13:15:20 -07:00
Vedant Roy
e694370733 Fix inverted bool + return correct data + remove serde 2021-05-24 13:15:20 -07:00
Vedant Roy
2c51761d01 Implement getAddedChanges 2021-05-24 13:15:20 -07:00
Orion Henry
506d1e61ca
Merge pull request #88 from automerge/implement-new-sequence-patch-format
Implement new sequence patch format
2021-05-24 13:11:19 -07:00
Orion Henry
6ebb63bfdd Merge branch 'main' into implement-new-sequence-patch-format 2021-05-24 15:50:19 -04:00
Orion Henry
17b0d2eb38 cleanup for clippy 2021-05-24 15:07:13 -04:00
Orion Henry
3465517ab3 handle conflicts in list parent modifications 2021-05-24 14:59:09 -04:00
Andrew Jeffery
8af065e8f6
Merge pull request #144 from automerge/expose-encoding-decoding-errors
Make `encoding::Error` and `decoding::Error` public.
2021-05-21 14:13:49 +01:00
Andrew Jeffery
c2f2ded69f Make encoding and decoding errors public 2021-05-21 14:00:17 +01:00
Andrew Jeffery
d5dfefb704
Fix backend panics (#141)
* Fix a panic when indexing the bytes

* Fix leb failing to read enough bytes

* Fix another panic out of bounds

* Use get rather than checking

* Check addition with arbitrary val

* Add backend load fuzzing

* Handle no ops sub

* Fix another index out of bounds
2021-05-20 11:24:23 +01:00
Andrew Jeffery
a0bd33e5a6
Refactor travis to have more jobs (#120)
* Refactor travis to have more jobs
2021-05-20 11:01:54 +01:00
Andrew Jeffery
e75864a549
Merge pull request #140 from automerge/mismatched-sequence-number
Add mismatched sequence number failing test
2021-05-20 08:50:35 +01:00
Andrew Jeffery
d31f704a32 Fix transfer of frontend states when we don't make a change 2021-05-19 22:40:58 +01:00
Andrew Jeffery
ab90ec85f5 Add mismatched sequence number failing test 2021-05-19 22:38:41 +01:00
Andrew Jeffery
2c9e68d344 Implement PartialEq on more structs 2021-05-19 22:38:41 +01:00
Andrew Jeffery
46ff9eabee Apply clippy suggestion 2021-05-19 22:10:09 +01:00
Andrew Jeffery
37717f2798 Cargo fmt 2021-05-19 19:10:47 +01:00
Andrew Jeffery
098cfc585d
Fix expansion of multi insert indexes (#138) 2021-05-19 19:08:52 +01:00
Andrew Jeffery
e619a34c5c Remove dbg 2021-05-19 10:44:25 +01:00
Vedant Roy
ddc9c6d4ce Add missing Safety header 2021-05-18 16:25:19 -04:00
Vedant Roy
0df5444669 Better sync test
Multiple round trips + exercise encode/decode
2021-05-18 16:25:19 -04:00
Vedant Roy
4b7886dfe6 Remove unused var 2021-05-18 16:25:19 -04:00