lost server part 4 - hhconfig
commit67d9dc6d26bc67d23997c90f0951f3b956de8b6b
authorLucian Wischik <ljw@fb.com>
Fri, 8 Sep 2017 20:24:51 +0000 (8 13:24 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 8 Sep 2017 20:32:14 +0000 (8 13:32 -0700)
tree0d8632440ee09e0d143e40a5d15b0fc685180fd6
parent538d794ec2c0f74aec80e02261e26463bf1fcacb
lost server part 4 - hhconfig

Summary:
Maybe the server terminated itself after seeing that .hhconfig has changed, or maybe the monitor terminated itself some time after the .hhconfig change when someone happened to invoke an "hh" command using the new version of hh_client (causing the existing running monitor to terminate itself with a Mismatch error).

Whatever the cause for the server shutting down, this diff causes "hh_client lsp" to recognize that .hhconfig has changed and therefore it too must terminate itself. That will prompt VSCode/Nuclide to relaunch hh_client. Hopefully the technique for launching hh_client will now launch a new version of it (based on the contents of .hhconfig). Then the new version will communicate with the server, telling it (if necessary) to restart itself due to version mismatch.

If we didn't terminate "hh_client lsp", then we'd be in a situation where the old version of hh_client might be trying to establish a persistent connection with the server. Meanwhile, any time the user invokes "hh" at the command-line, they'd end up getting a new version.

Reviewed By: alexchow

Differential Revision: D5620640

fbshipit-source-id: 477ba0538b99a9b22397c8db869aa33890668de3
hphp/hack/src/client/clientLsp.ml