hh_format no longer formats dirs
HHVM Version
$ hh_client --version
2118955d3ac60c03b335abbb2b7bf10c0c336466 Fri Jul 15 09:54:02 2016
Standalone code, or other way to reproduce the problem
From inside a directory with a .hhconfig file, run hh_format .
Expected result
No output, hh_format runs on all partial and strict mode files.
Actual result
$ hh_format .
Fatal error: exception Invalid_argument("Prefix has not been set!")
This has regressed since HHVM-3.14.2
AIUI we're not working on hh_format as architectural issues mean that some major problems are really unsolvable - but a replacement is in the works. @dlreeves ?
If it something that may be fixed, a bisect tracked it down to b80c3da166ae963e33dd1374d4639ce03de02d2c by @OCamlPro-Henry
Have managed to fix that error (set Relative_path.Root and .Hhi to dir), but am now getting:
Fatal error: exception End_of_file
Raised by primitive operation at file "utils/timeout.ml", line 53, characters 8-33
Called from file "utils/timeout.ml", line 41, characters 45-49
Called from file "procs/worker.ml", line 305, characters 18-29
Re-raised at file "procs/worker.ml", line 312, characters 14-17
Called from file "procs/multiWorker.ml", line 76, characters 31-52
Called from file "list.ml", line 84, characters 24-34
Called from file "third-party/core/core_list.ml", line 185, characters 22-47
Called from file "hh_format.ml", line 232, characters 4-132
Called from file "hh_format.ml", line 313, characters 11-38
This is beyond my ability to fix. It looks like this has also broken hh_match when run on a directory. My suspicion is that the jobs they're trying to run on workers were never designed to run on a server worker.
No longer relevant: hh_format has been replaced by hackfmt.