Commit graph

112 commits

Author SHA1 Message Date
Andrew Jeffery
78dc394a7a
Fix ambiguous key deserialization (#197) 2021-06-28 18:09:18 +01:00
Orion Henry
3db6f9ef13
Fix Clippy issues, broken tests, formatting issues (#188)
* fix clippy errors

* Bump travis nvm version

* Add smol_str arbitrary

* Fix Err prefix clippy error

* Fix clippy needless-borrow

* Ensure SortedVec sorts on deserialize

Co-authored-by: Andrew Jeffery <dev@jeffas.io>
2021-06-28 13:20:21 +01:00
Vedant Roy
132fa001fc Address review comments 2021-06-25 11:06:25 -07:00
Vedant Roy
ca638691d0 Tests pass after rebase 2021-06-25 11:06:25 -07:00
Vedant Roy
aecfcf2c87 Rebase + clippy 2021-06-25 11:06:25 -07:00
Vedant Roy
bb83460c44 Remove bad file 2021-06-25 11:06:25 -07:00
Vedant Roy
338ec28992 Satisfy clippy 2021-06-25 11:06:25 -07:00
Vedant Roy
14031addd3 Encode Vec<ScalarValue> into type system as ScalarValues 2021-06-25 11:06:25 -07:00
Vedant Roy
9353ae40b2 Remove F32 2021-06-25 11:06:25 -07:00
Vedant Roy
93f45bcc73 Add comment explaining reason for custom serialization 2021-06-25 11:06:25 -07:00
Vedant Roy
0b76f5100c Add custom serialization for DiffEdit 2021-06-25 11:06:25 -07:00
Vedant Roy
c989033365 Add datatype for MultiSet 2021-06-25 11:06:25 -07:00
Orion Henry
6f92d1583d fix error message 2021-06-25 11:06:25 -07:00
Vedant Roy
14bfe9b6b3 Remove unnecessary newline 2021-06-25 11:06:25 -07:00
Vedant Roy
c377b1f491 Properly update field count 2021-06-25 11:06:25 -07:00
Orion Henry
069aa338b2 strict numbers 2021-06-25 11:06:25 -07:00
Andrew Jeffery
987263b25d
Add SortedVec struct to ensure preds are sorted (#176)
* Add SortedVec struct to ensure preds are sorted

* Add into_iter for sortedvec
2021-06-19 17:25:25 +01:00
Andrew Jeffery
fc1b8f87fb
Use SmolStr in place of String (#182)
Most of the strings are small and so fit nicely in a SmolStr. When they
don't it just reverts to using a normal String.
2021-06-19 16:28:51 +01:00
Andrew Jeffery
ff8b8613d5
Flatten objtype (#175)
* Flatten object type

* Use separate construct functions

* Use separate gen_*_diff functions

* Remove maptype and seqtype from Diffs

* Preallocate ops in new_map_or_table

* More preallocations
2021-06-17 20:06:10 +01:00
Andrew Jeffery
8b3938c2e7
Rename UncompressedChange to Change (#173)
It wasn't really uncompressed as we have compressed and uncompressed
changes in the backend. It is just not encoded into the binary format.
The module separation (protocol vs backend) should help with the
distinction.
2021-06-16 11:50:26 +01:00
Andrew Jeffery
a6e955abfd
Rework statetree to be a tree (#156) 2021-06-14 11:08:14 +01: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
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
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
Orion Henry
3465517ab3 handle conflicts in list parent modifications 2021-05-24 14:59:09 -04:00
Alex Good
9bbaf7cbd5 Merge branch 'main' into implement-new-sequence-patch-format 2021-05-17 13:03:57 +01:00
Andrew Jeffery
5637956895 Add custom RootDiff type
This ensures that the patch starts with the right diff type statically
and will give an error to js during deserialization.
2021-05-16 14:02:57 +01:00
Andrew Jeffery
2e07e93e72 Change patches diffs to be non-optional 2021-05-16 13:01:37 +01:00
Andrew Jeffery
2aa35bc349
Add derive Arbitrary support behind cargo feature (#124) 2021-05-14 16:38:35 +01:00
Andrew Jeffery
9ace8892f6 Remove unchanged diff
Uses empty edits or props instead.
2021-05-11 12:48:45 +01:00
Andrew Jeffery
6050f39d46 Change patch diffs to start with mapdiff 2021-05-11 09:26:19 +01:00
Andrew Jeffery
4caa9798d6 Don't skip props 2021-05-10 23:43:59 +01:00
Andrew Jeffery
59a24081d2 Switch to expanded_op more 2021-05-10 19:25:43 +01:00
Andrew Jeffery
d794ad4dd5 Update diffedit naming of fields and add comments
This brings the DiffEdit types more in line with the typescript ones and
fixes the names. Also changed to using match guards in the append_edit
function so we can take edit by value.
2021-05-10 13:19:48 +01:00
Andrew Jeffery
9c522cb587 Handle collapsing inserts in edits 2021-05-10 12:27:28 +01:00
Alex Good
e86aabb6a3 Implement new sequence patch format 2021-05-05 21:52:57 +01:00
Andrew Jeffery
3a8447c068
Remove automerge bench harness (#106)
This removes the default wrapper which throws errors with some cli
arguments, e.g. --save-baseline which is nice for being able to compare
versions!
2021-04-27 10:30:07 +01:00
Andrew Jeffery
d1934f2286 Add formatting config 2021-04-26 09:42:36 -07:00
Andrew Jeffery
0a377a858b Catch up with js changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
137e6d2808 Fix clippy lints 2021-04-07 08:07:53 -07:00
Andrew Jeffery
2cc7b60ccb
Update uuid (#52)
This enables it to work for wasm32.
2021-03-18 12:38:05 +00:00
Alex Good
c103b0638e Ritual abasement at the altar of clippy 2021-03-02 19:35:00 +00:00
Alex Good
4f4674a4a1 Implement cursors in frontend 2021-03-02 16:07:52 +00:00