From 6e97d56c25580d504e2b89b10813728183cc68b2 Mon Sep 17 00:00:00 2001 From: nkomonen-amazon Date: Wed, 23 Apr 2025 12:11:01 -0400 Subject: [PATCH] fix(lsp): LSP download timeout message disappears too early Problem: When downloading the LSP artifacts from the manifest, there are some large ones (100+ MB). For a slow connection this can take 1+ minutes, but our timeout for the "downloading" message is set to disappear much earlier. So it is still downloading in the background, but the message has disappeared and the user thinks that the download is done. Solution: Increase the timeout to 30 minutes, which will ensure the downloading message sticks around while the download is still happening. Signed-off-by: nkomonen-amazon --- packages/core/src/shared/lsp/lspResolver.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/shared/lsp/lspResolver.ts b/packages/core/src/shared/lsp/lspResolver.ts index 90892148a9f..70f66cafd14 100644 --- a/packages/core/src/shared/lsp/lspResolver.ts +++ b/packages/core/src/shared/lsp/lspResolver.ts @@ -15,9 +15,11 @@ import { lspSetupStage, StageResolver, tryStageResolvers } from './utils/setupSt import { HttpResourceFetcher } from '../resourcefetcher/httpResourceFetcher' import { showMessageWithCancel } from '../../shared/utilities/messages' import { Timeout } from '../utilities/timeoutUtils' +import { oneMinute } from '../datetime' -// max timeout for downloading remote LSP assets progress, the lowest possible is 3000, bounded by httpResourceFetcher's waitUntil -const remoteDownloadTimeout = 5000 +// max timeout for downloading remote LSP assets. Some asserts are large (100+ MB) so this needs to be large for slow connections. +// Since the user can cancel this one we can let it run very long. +const remoteDownloadTimeout = oneMinute * 30 export class LanguageServerResolver { constructor(