Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/LSPHackTypeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
}),
);

// `hh_client --lsp` fails to spawn `hh_server` if not already running,
// so do an initial `hh_client` call to start the server if needed.
await vscode.window.withProgress(
{
location: vscode.ProgressLocation.Window,
Expand Down Expand Up @@ -115,7 +117,7 @@
if (
this.config.enableCoverageCheck &&
languageClient.initializeResult &&
(<any>languageClient.initializeResult.capabilities).typeCoverageProvider

Check warning on line 120 in src/LSPHackTypeChecker.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Unexpected any. Specify a different type

Check warning on line 120 in src/LSPHackTypeChecker.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Unexpected any. Specify a different type
) {
await new HackCoverageChecker(languageClient).start(context);
}
Expand Down
5 changes: 4 additions & 1 deletion src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
}
}

/** Run `hh_client` to start `hh_server` if needed. */
export async function start(
config: HackConfig,
log: vscode.LogOutputChannel,
): Promise<string> {
return run(config, log, []);
// Ignore errors to avoid exceeding `maxBuffer` in case of many preexisting errors.
// We only run this command to ensure `hh_server` starts and don't care about the output.
return run(config, log, ["--max-errors", "0"]);
}

async function run(
Expand All @@ -48,7 +51,7 @@
command,
args,
{ maxBuffer: 1024 * 1024 },
(err: any, stdout, stderr) => {

Check warning on line 54 in src/proxy.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Unexpected any. Specify a different type

Check warning on line 54 in src/proxy.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Unexpected any. Specify a different type
if (!stdout) {
// all hh_client --check output goes to stderr by default
stdout = stderr;
Expand Down
Loading