Add coverage levels request to JSON RPC
commitc1eff5ec282f570cc2403ee502f2d9dea264c367
authorWaleed Khan <waleedk@fb.com>
Thu, 9 Feb 2017 20:11:09 +0000 (9 12:11 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 9 Feb 2017 20:26:55 +0000 (9 12:26 -0800)
treeb19cfa03c88a290ddf9858cb09fab5b2fa245092
parentcb5cd69a38713b8c79674843e17d19d8c03b4c57
Add coverage levels request to JSON RPC

Summary:
The current coverage levels request is handled by calling `hh --color`. Currently, this returns its results in a weird JSON form: it provides a list of `text * coverage level` tuples. This is a bit weird and means that we have to transmit the entire file every time we request its coverage levels.

This diff moves this from the `hh` executable to the Nuclide RPC protocol, keeping the in the old form but deprecating it. It also adds the new form (a list of `range * coverage level` tuples`) to the JSON RPC protocol.

Reviewed By: dabek

Differential Revision: D4495868

fbshipit-source-id: 5037cedc2d6a6c4d636ad78c57ba199e328f7212
15 files changed:
hphp/hack/src/client/clientColorFile.ml
hphp/hack/src/client/clientIde.ml
hphp/hack/src/ide_rpc/ide_message.ml
hphp/hack/src/ide_rpc/ide_rpc_V0_message_printer.ml
hphp/hack/src/ide_rpc/ide_rpc_V0_method_parser.ml
hphp/hack/src/ide_rpc/nuclide_rpc_message_printer.ml
hphp/hack/src/ide_rpc/nuclide_rpc_method_parser.ml
hphp/hack/src/ide_rpc/protocol.md
hphp/hack/src/server/colorFile.ml
hphp/hack/src/server/serverColorFile.ml
hphp/hack/src/typing/coverage_level.ml
hphp/hack/test/unit/ide/ide_rpc_V0_message_printer_test.ml
hphp/hack/test/unit/ide/ide_rpc_V0_method_parser_test.ml
hphp/hack/test/unit/ide/nuclide_rpc_message_printer_test.ml
hphp/hack/test/unit/ide/nuclide_rpc_method_parser_test.ml