Suggest cleaning `hh_fanout` state on state-load failure
commitc5f9c86e2c12bb239316e60f0f7462f851264773
authorWaleed Khan <waleedk@fb.com>
Mon, 3 Aug 2020 20:52:14 +0000 (3 13:52 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 3 Aug 2020 20:54:33 +0000 (3 13:54 -0700)
tree8e2b11319dfcd90a3f2f035c2a673478cfaeefe0
parent7d9c8549a7053c694986006b9032b4243425d037
Suggest cleaning `hh_fanout` state on state-load failure

Summary:
During development, loading the state from disk sometimes fails, because we unmarshal an OCaml blob that was intended for a previous version of the executable. Add a `clean` command and a hint to use it when this scenario occurs.

So far, I've only ever seen this with the "development" version of `hh_fanout`, not for any deployed version. The state path is keyed by the version of `hh_fanout` (and the development version is keyed by the string "development" instead of a version hash), so we don't have to worry about this scenario in production. This is just for future maintainers, and for when I don't want to manually figure out what path I need to `rm -rf` to get things working again.

Reviewed By: ljw1004

Differential Revision: D22678095

fbshipit-source-id: 65f3fcd7022ef17a5caea7a37f733de15f9a0d12
hphp/hack/src/hh_fanout/hh_fanout.ml
hphp/hack/src/hh_fanout/incremental_ocaml.ml