From 0c442776a90da8768527f74ce2403f7a4b112809 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Tue, 5 Jul 2022 17:44:43 -0700 Subject: [PATCH] [mlir-vscode] Explicitly set the return type for didOpen In the newer versions of the language client, this explicitly expects a Promise return type, otherwise it errors out. Fixes #56297 Differential Revision: https://reviews.llvm.org/D129181 --- mlir/utils/vscode/src/mlirContext.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mlir/utils/vscode/src/mlirContext.ts b/mlir/utils/vscode/src/mlirContext.ts index 90e5c280f7bb..9bba50e1c0a3 100644 --- a/mlir/utils/vscode/src/mlirContext.ts +++ b/mlir/utils/vscode/src/mlirContext.ts @@ -251,10 +251,11 @@ export class MLIRContext implements vscode.Disposable { let middleware = {}; if (!workspaceFolder) { middleware = { - didOpen : (document, next) => { + didOpen : (document, next) : Promise => { if (!vscode.workspace.getWorkspaceFolder(document.uri)) { - next(document); + return next(document); } + return Promise.resolve(); } }; }