Refactor the parsing and processing of configuration options ... just a bit ...
commit1a681b188c2c7cfda67aafb0530b0378dd6c8b76
authorJoel Marcey <joelm@fb.com>
Wed, 10 Sep 2014 03:30:23 +0000 (9 20:30 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Wed, 10 Sep 2014 04:00:20 +0000 (9 21:00 -0700)
treef71416bc1d51371732536197d7e615276cb95a39
parent898654d16c7ec0766ebaf54e1fc59316d9c2e744
Refactor the parsing and processing of configuration options ... just a bit ...

Summary: ... and fix some bugs too :)

I was running into problems where it seemed like `-v` overrides were not being respected. So I wanted
to make sure that we had one goto place for parsing, processing and binding of configuration opens,
for easier debugging. This ended up into a bit of a refactor of our configuration option process.

Found a bug in `IniSetting::Set` where updates were not happening to existing pairs. This might
have been the biggest find during this whole process.

The second biggest find was probably the sort of subtle re-parsing of ini files for extension constants.
Right now we parse the whole file again; thus un-overriding any overrides that were given at the command
line. Needed to be a bit more clever on how we do this.

Reviewed By: @ptarjan

Differential Revision: D1524620
21 files changed:
hphp/compiler/compiler.cpp
hphp/neo/neo_hdf.c
hphp/neo/neo_hdf.h
hphp/runtime/base/config.cpp
hphp/runtime/base/config.h
hphp/runtime/base/emulate-zend.cpp
hphp/runtime/base/ini-setting.cpp
hphp/runtime/base/ini-setting.h
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/program-functions.h
hphp/runtime/base/runtime-option.cpp
hphp/runtime/base/runtime-option.h
hphp/runtime/debugger/debugger_client.cpp
hphp/runtime/server/replay-transport.cpp
hphp/runtime/server/source-root-info.cpp
hphp/test/slow/program_functions/config_overrides.php [new file with mode: 0644]
hphp/test/slow/program_functions/config_overrides.php.expect [new file with mode: 0644]
hphp/test/slow/program_functions/config_overrides.php.ini [new file with mode: 0644]
hphp/test/slow/program_functions/config_overrides.php.opts [new file with mode: 0644]
hphp/util/hdf.cpp
hphp/util/hdf.h