Reuse diagnostic pusher across typechecking iterations
commit5378d6a9ccbdef412ea18c42ed6c9f1f1d6ac25d
authorCatherine Gasnier <catg@fb.com>
Wed, 30 Jun 2021 12:11:27 +0000 (30 05:11 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 30 Jun 2021 12:13:14 +0000 (30 05:13 -0700)
tree0542bc52e9ac0c5a853296de0b764fe5d233a996
parent6c3723fb44b6802ed86e95ac642c5a83ac0f773f
Reuse diagnostic pusher across typechecking iterations

Summary:
So far, the diagnostic pusher was initialized in Typing_check_service.go, which meant that it wasn't reused between typechecking iterations. This diff initialized it instead ServerEnv.make_env, so that it spans the lifetime of the server, and threads it through Typing_check_service.go (which is not directly aware of the server env).

The threading adds yet another argument and return element to most functions there, which is not great: we should refactor arguments and returns in bigger structures.

Differential Revision: D29396473

fbshipit-source-id: 10a3c1d18d9333b55c1b207544d3266b1df33a21
hphp/hack/src/server/dune
hphp/hack/src/server/serverApi.ml
hphp/hack/src/server/serverEnv.ml
hphp/hack/src/server/serverEnv.mli
hphp/hack/src/server/serverEnvBuild.ml
hphp/hack/src/server/serverTypeCheck.ml
hphp/hack/src/typing/typing_check_service.ml
hphp/hack/src/typing/typing_check_service.mli
hphp/hack/test/integration_ml/test_interrupt.ml