attempt to reduce flakiness in LSP test
commit47babf6dda106973d80924623db55fb98c33aea0
authorLucian Wischik <ljw@fb.com>
Thu, 19 Oct 2017 20:44:39 +0000 (19 13:44 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 19 Oct 2017 20:52:06 +0000 (19 13:52 -0700)
treede2cf7cb5d5bf794422d455f2c30efe8959974c8
parent4afc96854ab7a2e13823a661ed91fe09b04b0253
attempt to reduce flakiness in LSP test

Summary:
We have a function
   function a_didchange(): int {...}
We send a didChange event to hh_server to replace its the first three letters with asterisks:
   function ***idchange(): int {...}

Normally hh_server publishes this error:
   1002 expected identifier [underscoring the first two asterisks]

But sometimes it ends up publishing different errors:
   2049 Unbound name: *Unknown* (an object type) [on the first asterisk]
   4030 Was expecting a return type hint [on the first asterisk]
   2049 Unbound name: *Unknown* (an object type) [on the first asterisk]

What's up? Is hh_server non-deterministic in the errors it publishes in response to IDE changes?

In this diff I've switched over to a different change, with the hope that maybe hh_server will be less non-deterministic with this new change... from this:
   return 42;
to this:
   return 42a;

I expect it will squiggle the `a` and say `Expected ;`.

I'm hoping that this is a simpler parse failure with a unique determinstic error.

Differential Revision: D6101340

fbshipit-source-id: 7d9e7dd561fa47635ecda40883927a6604e1429f
hphp/hack/test/integration/data/lsp_exchanges/didchange.expected
hphp/hack/test/integration/data/lsp_exchanges/didchange.json