implement incremental case for commit_edges and merge_edges
commit76ce5bc61b3de6012b8c51ec269abd8e5d6748d9
authorTom Yang <toyang@meta.com>
Thu, 10 Nov 2022 23:40:47 +0000 (10 15:40 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 10 Nov 2022 23:40:47 +0000 (10 15:40 -0800)
tree7d7dc2221d6f0bb2742309b7d1d7e82d75d191dd
parent380f455bed084daf8907e05c448294ca67239c3f
implement incremental case for commit_edges and merge_edges

Summary:
The `commit-edges` and `merge-edges` functions now behave properly when `hh_fanout` has a base dep graph (hhdg).

`commit-edges` will filter out existing edges in the hhdg so that it only writes new edges to the edges files. Maybe it's also important that we filter out edges that exist in the delta DB... not sure what performance implications that would have.

`merge-edges` will add new edges to the delta if the base already exists. I have yet to implement a way to merge the DB's edges to the base.

The meat of the changes can be found in `FullDepGraph::commit_edges` and `FullDepGraph::merge_edges`. The rest of the changes are to check the contents of the full dep graph in the testing.

Reviewed By: ljw1004

Differential Revision: D40821578

fbshipit-source-id: 6688c8b96cb1d1bd8a7682e2b798fdbf3c1d4afb
hphp/hack/src/depgraph/depgraph/reader.rs