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
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
f224940fdc
Fix Frontend debug struct name ( #172 )
2021-06-16 09:22:06 +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
Andrew Jeffery
28459f868f
Remove value_at_path ( #159 )
...
This has the same functionality as get_value and we only need one.
2021-06-07 10:18:00 +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
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
6050f39d46
Change patch diffs to start with mapdiff
2021-05-11 09:26:19 +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
921e9859b2
Fix issue in RleDecoder with null runs ( #63 )
...
* Add test to check save and load works on failing input
We loop 100 times due to it being a flaky test, likely due to an
iteration order issue in hashmaps.
* Update printing diff of changes
* Add new case for save then load
* Add another failing test case for save_load
* Update test case
* Update test case to not use empty strings in keys
* Specify to decode into usize in rle decoder
The `decoder.read` call was previously inferring to use isize since the
`self.count` variable is that type. This meant that for a list of null
values >= 64 in length it would read it as negative and so enter an
infinite loop of reading nulls, even if there were other values to read.
This changes the read to use usize but introduces the issue of usize
potentially being bigger than isize. This should be very unlikely for
what it is currently used for though so I'll defer this to later work.
* Add a test case to check the repeated nulls issue in rle
* Update tests
* Specify reading rle len as i64 instead of isize
2021-03-26 13:57:08 +00:00
Andrew Jeffery
429b3ebf06
Nostd time ( #51 )
...
* frontend: Add std feature
* frontend: Add new_with_timestamper
This allows using the frontend in contexts where SystemTime isn't
available.
2021-03-17 11:55:31 +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
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
497372db99
Immutable frontend rewrite
2021-01-16 17:40:47 +00:00
Alex Good
d7560d88ed
Start making errors more descriptive
2020-06-04 00:32:18 +01:00
Alex Good
2cf2835e76
Make Patch::clock keys ActorID rather than String
2020-05-30 01:44:00 +01:00
Alex Good
62345c2b5f
Make Patch::actor an ActorID, not a string
2020-05-30 01:24:26 +01:00
Alex Good
03a786d608
Fix a few small bugs
2020-05-26 16:17:06 +01:00
Alex Good
baaebef6d1
Merge branch 'master' into two-level-objtype
2020-05-25 18:47:46 +01:00
Orion Henry
ab71d01487
internal types impl COPY
2020-05-25 09:43:28 -04: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
48dfd6f29a
ActorID is now bytes
2020-05-22 19:00:39 -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
045656ac46
Port the backend concurrency tests
2020-05-21 18:40:36 +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
f8fe19ef08
run clippy
2020-05-14 00:54:06 +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
0223433a36
WIP
2020-05-05 20:12:42 +01:00
Alex Good
65b2a056ac
WIP
2020-04-27 19:38:32 +01:00
Alex Good
15b7bb8c60
Make a CLI out of an enmormous pile of hacks
2020-04-22 00:35:10 +01:00
Alex Good
43d14194d3
Loading initial state sans text
2020-04-21 23:17:36 +01:00
Alex Good
344cfb2a9d
WIP
2020-04-13 18:24:19 +01:00
Alex Good
161cd1c827
WIP
2020-04-13 16:39:30 +01:00