[Mlir-commits] [mlir] 0c44277 - [mlir-vscode] Explicitly set the return type for didOpen

River Riddle llvmlistbot at llvm.org
Thu Jul 7 13:36:26 PDT 2022


Author: River Riddle
Date: 2022-07-07T13:35:53-07:00
New Revision: 0c442776a90da8768527f74ce2403f7a4b112809

URL: https://github.com/llvm/llvm-project/commit/0c442776a90da8768527f74ce2403f7a4b112809
DIFF: https://github.com/llvm/llvm-project/commit/0c442776a90da8768527f74ce2403f7a4b112809.diff

LOG: [mlir-vscode] Explicitly set the return type for didOpen

In the newer versions of the language client, this explicitly expects a
Promise<void> return type, otherwise it errors out.

Fixes #56297

Differential Revision: https://reviews.llvm.org/D129181

Added: 
    

Modified: 
    mlir/utils/vscode/src/mlirContext.ts

Removed: 
    


################################################################################
diff  --git a/mlir/utils/vscode/src/mlirContext.ts b/mlir/utils/vscode/src/mlirContext.ts
index 90e5c280f7bbb..9bba50e1c0a3e 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<void> => {
           if (!vscode.workspace.getWorkspaceFolder(document.uri)) {
-            next(document);
+            return next(document);
           }
+          return Promise.resolve();
         }
       };
     }


        


More information about the Mlir-commits mailing list