expose defered_decl count
commita84647cb574284b175395aca818e897a2d640937
authorLucian Wischik <ljw@fb.com>
Wed, 11 Dec 2019 06:46:22 +0000 (10 22:46 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 11 Dec 2019 06:51:46 +0000 (10 22:51 -0800)
treef800c3978ccb710d7eb991899f16a90b6dd19355
parent610cc26511f2e160753fdb0bda4d5c9477308918
expose defered_decl count

Summary:
The deferred-decl machinery already counts how many decls needed to be fetched. But it only incremeents that count if a threshold is provided (and hence has the potential to raise a Defer exception).

I want to re-use that counting machinery, for use in serverless-IDE and other uses of `compute_tast_and_errors`. But those uses are typically single-threaded, don't have a worker queue, and can never defer.

This diff therefore (1) exposes the counter, (2) lets the counter be incremented even if no threshold is provided.

Reviewed By: 2BitSalute

Differential Revision: D18879091

fbshipit-source-id: 5ad7b65bf857de69bbd4c7edfb92e2f672201bc2
hphp/hack/src/typing/deferred_decl.ml
hphp/hack/src/typing/typing_check_service.ml
hphp/hack/src/typing/typing_classes_heap.ml
hphp/hack/test/unit/server_tests.ml