automerge/rust/automerge/src
alexjg 9b44a75f69
fix: don't panic when generating parents for hidden objects (#500)
Problem: the `OpSet::export_key` method uses `query::ElemIdPos` to
determine the index of sequence elements when exporting a key. This
query returned `None` for invisible elements. The `Parents` iterator
which is used to generate paths to objects in patches in
`automerge-wasm` used `export_key`. The end result is that applying a
remote change which deletes an object in a sequence would panic as it
tries to generate a path for an invisible object.

Solution: modify `query::ElemIdPos` to include invisible objects. This
does mean that the path generated will refer to the previous visible
object in the sequence as it's index, but this is probably fine as for
an invisible object the path shouldn't be used anyway.

While we're here also change the return value of `OpSet::export_key` to
an `Option` and make `query::Index::ops` private as obeisance to the
Lady of the Golden Blade.
2023-01-19 21:11:36 +00:00
..
automerge Update rust toolchain to 1.66 2023-01-10 12:51:56 +00:00
columnar Update rust toolchain to 1.66 2023-01-10 12:51:56 +00:00
legacy Ritual obeisance before the altar of clippy 2022-11-05 22:48:43 +00:00
op_set Text v2. JS Api now uses text by default (#462) 2022-12-09 23:48:07 +00:00
op_tree change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
query fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
storage Update rust toolchain to 1.66 2023-01-10 12:51:56 +00:00
sync Update rust toolchain to 1.66 2023-01-10 12:51:56 +00:00
transaction wasm: Allow a choice of text representations 2023-01-10 12:52:19 +00:00
types change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
autocommit.rs Text v2. JS Api now uses text by default (#462) 2022-12-09 23:48:07 +00:00
automerge.rs Add a method for loading a document without verifying heads 2022-12-19 16:30:14 +00:00
autoserde.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
change.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
clock.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
clocks.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
columnar.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
convert.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
decoding.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
error.rs Text v2. JS Api now uses text by default (#462) 2022-12-09 23:48:07 +00:00
exid.rs automerge-rs: Add ExId::to_bytes (#491) 2023-01-19 17:02:47 +00:00
indexed_cache.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
keys.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
keys_at.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
lib.rs automerge-rs: Add ExId::to_bytes (#491) 2023-01-19 17:02:47 +00:00
list_range.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
list_range_at.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
map_range.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
map_range_at.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
op_observer.rs wasm: Allow a choice of text representations 2023-01-10 12:52:19 +00:00
op_set.rs fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
op_tree.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
parents.rs fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
query.rs fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
sequence_tree.rs automerge-wasm: Use a SequenceTree in the OpObserver 2022-11-22 12:13:42 +00:00
storage.rs Add a method for loading a document without verifying heads 2022-12-19 16:30:14 +00:00
sync.rs wasm: improve error messages 2022-12-02 14:42:55 +00:00
transaction.rs rust: Make fields of Transaction and TransactionInner private 2022-12-02 12:12:54 +00:00
types.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
value.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
values.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
visualisation.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00