Commit graph

733 commits

Author SHA1 Message Date
Andrew Jeffery
e71f6964a4 Use static_assertions to test for Send+Sync 2021-07-04 10:23:12 +01:00
Andrew Jeffery
066c955370 Remove event handlers
These were to capture changes before they were applied but since there
is no queue now it is deterministic when they will be applied.
2021-07-04 10:04:51 +01:00
Andrew Jeffery
9dcafaeac4 Remove queue from backend
This also adds a check for any missing dependencies when applying the
changes.
2021-07-04 09:25:50 +01:00
Andrew Jeffery
a55ea62c66
Return an error to the user when trying to delete a non-existent key (#204)
* Return an error to the user when trying to delete a non-existent key

* Add tests for deleting a missing key
2021-07-01 16:09:58 +01:00
David Craven
5d42e50798
Generic actor (#202)
* No reason to force usage of uuid's.

* Fix tests and benches.
2021-07-01 15:49:35 +01:00
Andrew Jeffery
942627c11b
Update nix (#200)
* Improve flake nix to always use Cargo.nix info

* Update Cargo.nix
2021-06-29 17:52:38 +01:00
Andrew Jeffery
01159056ef
Add dev command for building wasm backend (#199)
* Add dev command for building wasm backend

This aims to reduce the time spent building when testing with the wasm
backend. On my machine `yarn release` takes 20s while `yarn dev` takes
just 2s.

* Separate out building wasm
2021-06-29 17:12:24 +01:00
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
Andrew Jeffery
b4829ede72
Add makefile for ease of use (#194)
This should allow consistent commands for everyone, including a local ci
check.
2021-06-28 13:02:32 +01:00
Andrew Jeffery
cf42e72662
Add building docs to CI (#192) 2021-06-28 12:59:39 +01:00
Andrew Jeffery
49e4aae673
Don't document automerge-c-v2 due to name clash (#191)
In the future we should rename it or find another way around this.
2021-06-28 12:58:07 +01:00
Andrew Jeffery
14d92e513c
Stop non-empty needs repeating messages (#193) 2021-06-27 14:59:23 +01:00
Vedant Roy
892d356001 Fix interop script 2021-06-25 11:06:25 -07:00
Vedant Roy
b307781c8a Try different commit hash 2021-06-25 11:06:25 -07:00
Vedant Roy
2e1ab65d1d Make benches compile 2021-06-25 11:06:25 -07:00
Vedant Roy
e606937fa0 Update interop tests + review comment 2021-06-25 11:06:25 -07: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
Orion Henry
bf3d2447aa throw a proper error on change decode 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
b82463bb87 Tests pass 2021-06-25 11:06:25 -07:00
Vedant Roy
a3a9d0b1fb condense_insert_ops failing 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
d35fc961e9 Ensure values have same type when constructing MultiElementInsert 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
f267064ed5 test the correct repo/commit 2021-06-25 11:06:25 -07:00
Orion Henry
069aa338b2 strict numbers 2021-06-25 11:06:25 -07:00
Andrew Jeffery
08fd039eb3
Reduce use of new features to build on older Rusts (#184) 2021-06-25 16:03:13 +01:00
Andrew Jeffery
fe5a9a816d
Cleanup ColumnOp in backend and use sort_unstable (#187)
* Use sort_unstable_by for sorting columns

* Use ExpandedOp directly in ColumnEncoder
2021-06-25 14:20:34 +01:00
Andrew Jeffery
0737248f3d Enable lto 2021-06-22 08:40:16 -07:00
Andrew Jeffery
c9869ebf1b Remove debug info for release builds 2021-06-22 08:40:16 -07:00
Andrew Jeffery
885a763766
Calculate pred_for_key before deleting the key (#183) 2021-06-20 12:46:50 +01:00
Andrew Jeffery
1383068064
Backend rearrangements (#177)
* Add SortedVec struct to ensure preds are sorted

* Add into_iter for sortedvec

* Specify capacity of bytes

* Pass docops by value

* Use Cow for operation keys

* More preallocation

* Use swap remove instead of remove to avoid O(n)

* Use default compression level for better balance of performance

* Remove result for incorporate_new_op

* Import actor once

* Allocate for the new value too in LiteralRun

The literalrun will finish with pushing the new `value` onto the vec so
we can allocate for that from the start.

* Set capacity of rangemap

* Preallocate data
2021-06-19 17:26:56 +01: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
98dbd6150e
Mutation tracker rollback (#165)
* Make set and delete operations return the old value

* Add rollback to MutableDocument

* Use rollback in optimistically_apply_change
2021-06-16 14:16:48 +01:00
Andrew Jeffery
0f0e9e827a
New value zero copy multivalue (#170)
* Remove copying when making a multivalue from a newvalue

* Optimise cursors in new value

* Make key be a value not reference

* Rename union to extend
2021-06-16 12:16:31 +01:00
Andrew Jeffery
79239cc6a4
Improve load performance when no cursors are present (#171)
* Add save and load to benchmarks

* Improve load performance when no cursors are found
2021-06-16 11:50:49 +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
4821cdd766
Calculate pred for deletion from text before deleting (#174) 2021-06-16 11:49:58 +01:00