Support logging HackC options in HHVM (via JSON)nightly-2020.05.22
commite05d38c3927db9a9508baf2b8fbd7ee3c40dc649
authorLeo Osvald <leoo@fb.com>
Fri, 22 May 2020 00:49:57 +0000 (21 17:49 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 22 May 2020 00:53:24 +0000 (21 17:53 -0700)
tree953c5f7b32fc17bd90c51e5c3031b17bf84791ed
parentc86516e897095455b3faca188c050e4b126d0519
Support logging HackC options in HHVM (via JSON)

Summary:
Support logging a list of JSON strings from HHVM, so that `hh_single_compile` can be safely migrated to Rust.
Read the "config_jsons" field from a compile/parse/facts request, and log it as array of strings using `StructuredLog`, *unless* a non-array is passed in which case it isn't logged.

This is mostly to ensure that HackC options are parsed consistently between Rust and OCaml.

**Note**: `hh_single_compile` code should be careful not to pass an actual array (which triggers logging) on *every* compile/parse request, so that the quota is not exceeded.

Reviewed By: alexeyt

Differential Revision: D21483465

fbshipit-source-id: fc9bb5e37c7f4219908f937cf597d1cae0eb1618
hphp/runtime/vm/extern-compiler.cpp
hphp/util/hackc-log.cpp [new file with mode: 0644]
hphp/util/hackc-log.h [new file with mode: 0644]