introduce ServerLocalConfig.use_naming_for_dephash_filenames
commitf3b8e011656eb555b3fe82c59ccad9b46ee4ba10
authorLucian Wischik <ljw@fb.com>
Tue, 19 Oct 2021 06:27:51 +0000 (18 23:27 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 19 Oct 2021 06:31:52 +0000 (18 23:31 -0700)
tree88da4077de57d84d6d1f7e3728ac1a58293c6f67
parent5f4f73d990906a7018682ceb5cf64878e8867f13
introduce ServerLocalConfig.use_naming_for_dephash_filenames

Summary:
I've added code to use naming instead of ifiles for the dephash->filename lookup, where applicable.

Now I want to run an A/B test. This diff adds a new hh.conf / JustKnobs / rollout flag, "use_naming_for_dephash_filenames". If true, and if possible, hack will indeed using naming instead of ifiles.

1. add flag in https://www.internalfb.com/intern/justknobs/
2. HackEventLogger.rollout_flags
3. ServerLocalConfig.{t,default,load_,load_,to_rollout_flags}
4. ServerLocalConfig.apply_justknobs_overrides
5. If your logic has a "genv" off which to read ServerLocalConfig, done
6. If your logic only has "ctx", add e.g. to GlobalOptions.tco_xyz and oxidized_regen.sh

For my logic, I needed to make a decision inside Naming_provider based on the setting. Naming_provider has a 'ctx' but doesn't have 'genv'. I figured the easiest way to make the change was to put the setting into tcopt, which is carried within ctx.

Differential Revision: D30971692

fbshipit-source-id: b38e8bb9f243a27a53014a286e8a073707c64dc7
hphp/hack/src/options/globalOptions.ml
hphp/hack/src/options/globalOptions.mli
hphp/hack/src/oxidized/gen/global_options.rs
hphp/hack/src/oxidized/manual/global_options_impl.rs
hphp/hack/src/oxidized_by_ref/gen/global_options.rs
hphp/hack/src/oxidized_by_ref/manual/global_options_impl.rs
hphp/hack/src/providers/dune
hphp/hack/src/providers/naming_provider.ml
hphp/hack/src/server/serverConfig.ml
hphp/hack/src/server/serverLocalConfig.ml
hphp/hack/src/stubs/logging/hackEventLogger.ml