automerge/rust/automerge/src/query
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
..
elem_id_pos.rs fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
insert.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
keys.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
keys_at.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
len.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
len_at.rs Text v2. JS Api now uses text by default (#462) 2022-12-09 23:48:07 +00:00
list_range.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
list_range_at.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
list_vals.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
list_vals_at.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
map_range.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
map_range_at.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
nth.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
nth_at.rs Text v2. JS Api now uses text by default (#462) 2022-12-09 23:48:07 +00:00
opid.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
opid_vis.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
prop.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
prop_at.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00
seek_op.rs Fix SeekOpWithPatch on optrees with only internal optrees (#496) 2023-01-14 11:27:48 +00:00
seek_op_with_patch.rs Fix SeekOpWithPatch on optrees with only internal optrees (#496) 2023-01-14 11:27:48 +00:00