Commit graph

45 commits

Author SHA1 Message Date
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
14af0738dd
Remove MapType from Map and add Table variant (#168)
This simplifies the Value enum and hides the protocol internals from the
variants.
2021-06-14 21:26:02 +01:00
Andrew Jeffery
a6e955abfd
Rework statetree to be a tree (#156) 2021-06-14 11:08:14 +01: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
Andrew Jeffery
59a24081d2 Switch to expanded_op more 2021-05-10 19:25:43 +01:00
Andrew Jeffery
d1934f2286 Add formatting config 2021-04-26 09:42:36 -07:00
Andrew Jeffery
fc45ff09a3
Allow change to return value from users closure (#84)
* Allow change to return value from users closure

* Add closure_result field to OptimisticChangeResult
2021-04-15 10:49:04 +01:00
Andrew Jeffery
239fe59090
Use grapheme clusters in Text instead of char (#72)
* Use grapheme clusters in Text instead of char

char is not what users typically expect as a 'letter' so we should use
grapheme clusters instead. These can't always be represented as single
rust char types so the Text now stores a Vec of single grapheme Strings.

* Add test for grapheme clusters in text

* Use debug_assert_eq instead of debug_assert
2021-03-28 21:32:03 +01: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
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
Alex Good
56750f68d1 Fix inserts at beginning of a text object 2021-01-19 14:20:09 +00:00
Alex Good
497372db99 Immutable frontend rewrite 2021-01-16 17:40:47 +00:00
Martin Kleppmann
5ec8408398 Replace all-zeros UUID with '_root'
Corresponding to automerge/automerge@10ec271cbd
2021-01-12 14:45:32 -05:00
Alex Good
d7560d88ed Start making errors more descriptive 2020-06-04 00:32:18 +01:00
Alex Good
a36a364443 Rename automerge_protocol::Value -> ScalarValue 2020-05-29 21:04:29 +01:00
Alex Good
40c8f8f9b3 Move ObjType to two level hierarchy 2020-05-24 10:22:18 +01:00
Orion Henry
25393130e8 Merge remote-tracking branch 'origin/master' into bin_change 2020-05-22 19:11:52 -04:00
Orion Henry
87b44cf977 ChangeRequest->Request 2020-05-22 16:11:26 -04:00
Alex Good
2567efcc70 Port apply local patch tests 2020-05-22 15:11:42 +01:00
Alex Good
4738e3c52f Run rustfmt and clippy 2020-05-21 13:05:33 +01:00
Alex Good
c1af21e42e Port refuse to overwrite counter 2020-05-21 13:03:19 +01:00
Alex Good
11c9ad9ba9 Port counters inside lists test 2020-05-21 12:57:24 +01:00
Alex Good
425beb2f3f Port counters inside maps test 2020-05-21 12:47:41 +01:00
Alex Good
baf0bc4c0c Port delete in list elements test 2020-05-21 12:11:23 +01:00
Alex Good
42b2c02d3f Port a few more tests 2020-05-21 00:49:55 +01:00
Alex Good
ad6afb9e4d Port the delete keys in map frontend test 2020-05-20 21:25:13 +01:00
Scott Trinh
fb32dac173
protocol: Hex-encode random ActorID (#18)
* protocol: Hex-encode random ActorID

* protocol: Encode UUID bytes directly

* frontend: Remove redundant clone
2020-05-20 19:49:25 +01:00
Alex Good
c918da4d32 Port the update in nested maps frontend test 2020-05-20 18:26:07 +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
6fd6d0f839 Port nested state creation test 2020-05-13 19:01:15 +01:00
Alex Good
c415d95c71 Merge branch 'performance' into frontend 2020-05-13 17:53:47 +01:00
Alex Good
dd650b0c38 Merge branch 'performance' into frontend 2020-05-09 13:04:44 +01:00
Alex Good
e3fe5b9d6d One more passing test 2020-05-08 00:24:34 +01:00
Alex Good
6ad3e13fc0 Tests passing with optimistic local diff application 2020-05-07 16:02:02 +01:00
Alex Good
65b2a056ac WIP 2020-04-27 19:38:32 +01:00
Alex Good
eca8af0d04 Add text rendering with no tests 2020-04-21 23:32:02 +01:00
Alex Good
43d14194d3
Loading initial state sans text 2020-04-21 23:17:36 +01:00