Remove push/pop_local_changes from FileProvider trait
commit2a79bcdcef2aa7f21641c52fb072a6016c894b37
authorJake Bailey <jakebailey@fb.com>
Wed, 1 Jun 2022 22:18:20 +0000 (1 15:18 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Jun 2022 22:18:20 +0000 (1 15:18 -0700)
tree6a53b7bdbaf2749ef3c8c419983b37af1c763843
parent814544ed90c499789b1bd8d539f2a18090fbd6b7
Remove push/pop_local_changes from FileProvider trait

Summary:
The push/pop_local_changes methods don't really belong in FileProvider. Only hh_server is interested in having the ability to push/pop local changes, and we really shouldn't be giving the (Rust) typechecker permission to invoke these methods anyway.

Instead, follow the same pattern used for the naming table in previous diffs, and for shallow and folded decls later in this stack: have HhServerProviderBackend hold on to a backing ChangesStore (in order to invoke push/pop_local_changes on it), and use that as the storage for the FileProvider.

Differential Revision: D36725433

fbshipit-source-id: d53529a4f96bac23012438bdc3b9170677bdaef9
16 files changed:
hphp/hack/src/providers/file_provider.ml
hphp/hack/src/providers/hackrs_provider_backend/hackrs_provider_backend.rs
hphp/hack/src/providers/rust_provider_backend.ml
hphp/hack/src/providers/rust_provider_backend.mli
hphp/hack/src/providers/rust_provider_backend_ffi.rs
hphp/hack/src/rupro/datastore/datastore.rs
hphp/hack/src/rupro/datastore/empty.rs [new file with mode: 0644]
hphp/hack/src/rupro/decl_file_rust.rs
hphp/hack/src/rupro/decl_folded_class_ffi.rs
hphp/hack/src/rupro/decl_repo_rust.rs
hphp/hack/src/rupro/file_provider/file_provider.rs
hphp/hack/src/rupro/file_provider/provider.rs
hphp/hack/src/rupro/hackrs/decl_parser.rs
hphp/hack/src/rupro/hackrs/shallow_decl_provider.rs
hphp/hack/src/rupro/hackrs_test/hackrs_test.rs
hphp/hack/src/rupro/stc_ffi.rs