Skip to content

Commit fddbe36

Browse files
mszabo-wikiaGitHub Enterprise
authored andcommitted
Increase language server hackfmt timeout (facebook#112)
The `hh_client` language server launches a `hackfmt` subprocess to implement the format command, with a hardcoded 2 seconds timeout. This is too short to format some larger (~6k loc) Hack files, so let's increase it a bit.
1 parent eb0c47b commit fddbe36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hphp/hack/src/client/ide_service/ide_format.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ let call_external_formatter
3232
| _ -> Error "Call to hackfmt was killed"
3333
in
3434
Timeout.read_process
35-
~timeout:2
35+
(* SLACK: bump timeout from 2s -> 6s to allow autoformatting large files *)
36+
~timeout:6
3637
~on_timeout:(fun _ ->
3738
Hh_logger.log "Formatter timeout";
3839
Error "Call to hackfmt timed out")

0 commit comments

Comments
 (0)