HHVM - How to use hh_client properly
Asked Answered
A

3

6

So I was excited to jump into some Hacklang and HHVM, and after finally managing to get it running on a CentOS 6 VM (tip: servergrove.com have a RPM from a repo of theirs, but it still needed MySQL 5.0 shared libraries to work - still the closest I could find to an easy CentOS 6 install though...), I thought I would tackle a reasonably small PHP project of mine as a good test case for converting to strict Hack code.

I'm getting through the code alright, but I don't think I fully understand how hh_client is supposed to work. I created a .hhconfig file in the root of my project, and then ran hh_client start from the directory, and it seems to start ok - I see three hh_server -d /var/www/html/groundwork processes running after doing this. However every time I want to type check my code, I have to run a hh_client check, where as the language being used in the docs and other sources keeps suggesting this is supposed to be a real time checker that automatically feeds back - I could run a watch hh_client check I guess, but it seems like I'm missing something.

I made sure to get a copy of the hhi files as suggested by Common php functions in hack

Also, sometimes when I start hh_client it reports stuff that a check straight afterwards won't, despite not changing anything in code. The check is often fewer in errors. Stopping and starting hh_client reports more again.

Thanks.

Aladdin answered 9/5, 2014 at 11:57 Comment(0)
E
7

The editor bindings are probably what you want.

Expressly answered 9/5, 2014 at 12:32 Comment(2)
There's also one for emacs: github.com/facebook/hhvm/blob/master/hphp/hack/editor-plugins/…. As for why some errors disappear after an incremental check, it has to do with the way incremental mode works and how we try to not cascade errors. Basically some classes of errors can mask others, but how exactly this happens can vary. If the checker says "no errors", then there are no errors; but if there are errors, they may not be all the errors.Radiolarian
Ok thanks guys. I'm typically developing in Windows remotely so a vim plugin wouldn't be my first choice but I'll check it out all the same. And Josh, thanks for the incremental explanation, makes sense now at least!Aladdin
B
1

If you are using this on Mac OSX 10.10 you have to use Vagrant. If you are using Vagrant and importing the files from the local machine to your vagrant box hh_client will not detect the changes. To fix this you can log into the vagrant box in another terminal and run the following.

watch hh_server . --check

As of a few weeks ago brew not can install hhvm on your mac. This should no longer be necessary.

Bertine answered 12/1, 2015 at 0:54 Comment(0)
B
-1

disable extension called "Hack" from Visual Studio

enter image description here

Baier answered 6/10, 2021 at 22:51 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Eladiaelaeoptene

© 2022 - 2024 — McMap. All rights reserved.