mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Merge #10053
10053: Remove old workaround in vscode extension r=lnicola a=Azorlogh See #3167. Co-authored-by: = <bott.alix@gmail.com>
This commit is contained in:
commit
4ad0a1b8a5
1 changed files with 0 additions and 15 deletions
|
@ -200,19 +200,4 @@ async function downloadFile(
|
||||||
const srcStream = gunzip ? res.body.pipe(zlib.createGunzip()) : res.body;
|
const srcStream = gunzip ? res.body.pipe(zlib.createGunzip()) : res.body;
|
||||||
|
|
||||||
await pipeline(srcStream, destFileStream);
|
await pipeline(srcStream, destFileStream);
|
||||||
|
|
||||||
// Don't apply the workaround in fixed versions of nodejs, since the process
|
|
||||||
// freezes on them, the process waits for no-longer emitted `close` event.
|
|
||||||
// The fix was applied in commit 7eed9d6bcc in v13.11.0
|
|
||||||
// See the nodejs changelog:
|
|
||||||
// https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md
|
|
||||||
const [, major, minor] = /v(\d+)\.(\d+)\.(\d+)/.exec(process.version)!;
|
|
||||||
if (+major > 13 || (+major === 13 && +minor >= 11)) return;
|
|
||||||
|
|
||||||
await new Promise<void>(resolve => {
|
|
||||||
destFileStream.on("close", resolve);
|
|
||||||
destFileStream.destroy();
|
|
||||||
// This workaround is awaiting to be removed when vscode moves to newer nodejs version:
|
|
||||||
// https://github.com/rust-analyzer/rust-analyzer/issues/3167
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue