From 0d5c23332fd1ac6b9df6937f5c077dc623fcd47d Mon Sep 17 00:00:00 2001 From: Misode Date: Wed, 10 Jul 2024 17:40:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Re-check=20client=20managed=20fi?= =?UTF-8?q?les=20after=20ready?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/service/Project.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/core/src/service/Project.ts b/packages/core/src/service/Project.ts index ecbf6f853..99df1d89d 100644 --- a/packages/core/src/service/Project.ts +++ b/packages/core/src/service/Project.ts @@ -377,12 +377,17 @@ export class Project implements ExternalEventEmitter { this.tryClearingCache(uri) }).on('ready', () => { this.#isReady = true - // // Recheck client managed files after the READY process, as they may have incomplete results and are user-facing. - // const promises: Promise[] = [] - // for (const { doc, node } of this.#clientManagedDocAndNodes.values()) { - // promises.push(this.check(doc, node)) - // } - // Promise.all(promises).catch(e => this.logger.error('[Project#ready] Error occurred when rechecking client managed files after READY', e)) + // Recheck client managed files after the READY process, as they may have incomplete results and are user-facing. + const promises: Promise[] = [] + for (const { doc, node } of this.#clientManagedDocAndNodes.values()) { + promises.push(this.check(doc, node)) + } + Promise.all(promises).catch(e => + this.logger.error( + '[Project#ready] Error occurred when rechecking client managed files after READY', + e, + ) + ) }) }