Commit graph

918 commits

Author SHA1 Message Date
Andrew Jeffery
8f4562b2cb Have apply_changes take an iterator 2022-04-01 23:02:56 +01:00
Andrew Jeffery
b54075fe4d Add makefile to run edit-traces 2022-04-01 13:56:15 +01:00
Andrew Jeffery
6494945a42
Merge pull request #327 from jeffa5/experiment-del-inc-names
Rename `del` and `inc` to `delete` and `increment`
2022-04-01 07:47:13 -05:00
Andrew Jeffery
d331ceb6d4 Rename set to put and set_object to put_object 2022-04-01 13:40:58 +01:00
Andrew Jeffery
5cbc977076 More internal renames of del and inc 2022-04-01 13:36:27 +01:00
Andrew Jeffery
632857a4e6 Rename del and inc in wasm and js 2022-04-01 13:36:26 +01:00
Andrew Jeffery
1a66dc7ab1 Use full names for delete and increment 2022-04-01 13:36:00 +01:00
Andrew Jeffery
790423c7ae
Merge pull request #328 from jeffa5/experiment-js-names
Make Js names consistently camelCase
2022-04-01 07:34:20 -05:00
Andrew Jeffery
3631ddfd55 Fix js side 2022-04-01 11:48:04 +01:00
Andrew Jeffery
0c16dfe2aa Change js function names to camelCase 2022-04-01 11:46:43 +01:00
Andrew Jeffery
35ddda5e0f
Merge pull request #324 from jeffa5/experiment-remove-const-b
Remove const B: usize requirement everywhere
2022-03-31 08:14:25 -05:00
Andrew Jeffery
0e457d5891 Remove const B: usize requirement everywhere
This doesn't need to be generic on everything, just defined once as a
const and referenced.
2022-03-31 13:53:26 +01:00
Andrew Jeffery
12f070ce45
Merge pull request #323 from jeffa5/experiment-update-tree
Change set to update to avoid cloning and make it more efficient
2022-03-31 07:05:37 -05:00
Andrew Jeffery
a69643c9cc Change set to update to avoid cloning and make it more efficient 2022-03-31 12:04:42 +01:00
Orion Henry
1c4dc88de3
Merge pull request #312 from automerge/generate-patches
Generate patches
2022-03-30 16:59:48 -04:00
Orion Henry
ab580df947 Merge remote-tracking branch 'origin/experiment' into getnerate-patches 2022-03-30 13:04:51 -06:00
Orion Henry
2dcbfbf27d clippy 2022-03-30 13:28:52 -04:00
Martin Kleppmann
f83fb5ec61 More tests 2022-03-30 13:12:07 -04:00
Martin Kleppmann
ab4dc331ac cargo fmt 2022-03-30 13:12:07 -04:00
Martin Kleppmann
a9eddd88cc Bugfix: resurrection of deleted list elements 2022-03-30 13:12:07 -04:00
Martin Kleppmann
975338900c Document another suspected bug
Testing this is harder because I need to construct a tree in which list
elements are split across multiple tree nodes, and the number of list
elements required to trigger this condition depends on the branching
factor of the tree, which I don't really want to hard-code into the
tests in case we change it...
2022-03-30 13:12:07 -04:00
Martin Kleppmann
361db06eb5 Delete unnecessary code
This check is not needed because the case `e == HEAD` can only happen if
`self.op` is a list insertion operation, and an insertion operation
always has empty `preds`, so it can never overwrite any existing list
element.
2022-03-30 13:12:07 -04:00
Martin Kleppmann
ba177c3d83 Fix broken handling of conflicts on list elements 2022-03-30 13:12:07 -04:00
Martin Kleppmann
fa0a8953dc More tests and comments 2022-03-30 13:12:07 -04:00
Martin Kleppmann
cf508a94a9 Slight simplification 2022-03-30 13:12:07 -04:00
Martin Kleppmann
289dd95196 Fix index calculation for insertions at the head 2022-03-30 13:12:07 -04:00
Martin Kleppmann
c908979372 Fix search for the correct insertion position 2022-03-30 13:12:07 -04:00
Martin Kleppmann
7025bb6541 Tests and fixes for list patches 2022-03-30 13:12:07 -04:00
Martin Kleppmann
145969152a Fix conversion of OpId to ExId when referring to root object 2022-03-30 13:12:07 -04:00
Martin Kleppmann
94ff10f690 Rename and reformat a bit 2022-03-30 13:12:07 -04:00
Martin Kleppmann
26efee509d First patch implementation from pairing session with Orion 2022-03-30 13:12:01 -04:00
Andrew Jeffery
3039efca9b Use pending_ops rather than direct len of operations 2022-03-30 12:18:44 +01:00
Andrew Jeffery
a989e294f8 Use entry api in index 2022-03-29 21:05:09 +01:00
Andrew Jeffery
3c294d8fca Document some fields on structs 2022-03-29 21:05:03 +01:00
Andrew Jeffery
0af471a1a1 Document object_type function 2022-03-29 20:45:20 +01:00
Andrew Jeffery
0da8ceddce Use iter() in IntoIterator 2022-03-29 20:34:20 +01:00
Orion Henry
be8f367d07 missing test tag 2022-03-29 11:39:25 -04:00
Orion Henry
93082ad6a9
Merge pull request #319 from jeffa5/experiment-broken-list
Add broken list tests
2022-03-29 11:14:46 -04:00
Orion Henry
fb586455dd
Merge branch 'experiment' into experiment-broken-list 2022-03-29 11:14:35 -04:00
Orion Henry
5d9880e1e1
Merge pull request #320 from jeffa5/experiment-last-elem
Fix nth query's last_elem
2022-03-29 11:08:31 -04:00
Andrew Jeffery
f002e7261b Update comments 2022-03-28 10:37:14 +01:00
Andrew Jeffery
636fe75647 Simplify query_node for insert and nth 2022-03-28 10:34:00 +01:00
Andrew Jeffery
1c6032bee0 Reset B to 16 2022-03-28 10:33:42 +01:00
Andrew Jeffery
fb6f2787b2 Remove last_elem in nth query 2022-03-28 10:18:15 +01:00
Andrew Jeffery
ece1e22283 Fix clippy 2022-03-28 10:18:15 +01:00
Andrew Jeffery
8f201562c3 Add better comments 2022-03-28 10:18:15 +01:00
Andrew Jeffery
a19aae484c Don't set last_seen unless the elemid was actually visible 2022-03-28 10:18:15 +01:00
Andrew Jeffery
b280138f84 Remove explicit len on index 2022-03-28 10:18:13 +01:00
Andrew Jeffery
1b5730c0ae Fix insert query to not skip past insert positions
When inserting and we have seen enough elements then look for the first
index to insert at rather than skipping over it.
2022-03-28 10:17:46 +01:00
Andrew Jeffery
49c4bf4911 Rename has to has_visible 2022-03-28 10:17:46 +01:00