Coalesce dependents onto single line in Typing_deps.dump_debug_deps
commit0334d8f9c7e53126d7e7025136a5a53e3e0138f2
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Tue, 9 Oct 2018 19:50:15 +0000 (9 12:50 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 9 Oct 2018 19:57:07 +0000 (9 12:57 -0700)
tree99163bbe2db80b4d3264a30391f0b48f4573eb87
parent9e3993f379fe6b23d1bcff228d9cd29d1251ff1a
Coalesce dependents onto single line in Typing_deps.dump_debug_deps

Summary:
This changes the backing store for the debug tracing in Typing_deps from a set of strings (each representing an edge) to a mapping from string (representing a dependency) to a set of strings (representing its dependents).

When printing, dependents are printed on a single line if they fit within 78 characters:

```
Class FooParent -> Class Bar, Class Foo, Class IFoo
```

And on multiple lines if they do not:

```
Class FooParent -> Class Bar,
                   Class Foo,
                   Class IFoo
```

Reviewed By: dabek

Differential Revision: D10247323

fbshipit-source-id: e60b7343e9a153dabb4f19f6d306f8ef471ffe2a
hphp/hack/src/deps/typing_deps.ml
hphp/hack/test/deps/namespaces.php.exp
hphp/hack/test/deps/requirements.php.exp
hphp/hack/test/deps/tconst.php.exp