@@ -247,7 +247,7 @@ type clientSentBuildAction = {
247
247
title : string ;
248
248
projectRootPath : string ;
249
249
} ;
250
- let openedFile = ( fileUri : string , fileContent : string ) => {
250
+ let openedFile = async ( fileUri : string , fileContent : string ) => {
251
251
let filePath = fileURLToPath ( fileUri ) ;
252
252
253
253
stupidFileContentCache . set ( filePath , fileContent ) ;
@@ -270,8 +270,8 @@ let openedFile = (fileUri: string, fileContent: string) => {
270
270
namespaceName . kind === "success" ? namespaceName . result : null ,
271
271
rescriptVersion : utils . findReScriptVersionForProjectRoot ( projectRootPath ) ,
272
272
bsbWatcherByEditor : null ,
273
- bscBinaryLocation : utils . findBscExeBinary ( projectRootPath ) ,
274
- editorAnalysisLocation : utils . findEditorAnalysisBinary ( projectRootPath ) ,
273
+ bscBinaryLocation : await utils . findBscExeBinary ( projectRootPath ) ,
274
+ editorAnalysisLocation : await utils . findEditorAnalysisBinary ( projectRootPath ) ,
275
275
hasPromptedToStartBuild : / ( \/ | \\ ) n o d e _ m o d u l e s ( \/ | \\ ) / . test (
276
276
projectRootPath
277
277
)
@@ -1036,7 +1036,7 @@ function openCompiledFile(msg: p.RequestMessage): p.Message {
1036
1036
return response ;
1037
1037
}
1038
1038
1039
- function onMessage ( msg : p . Message ) {
1039
+ async function onMessage ( msg : p . Message ) {
1040
1040
if ( p . Message . isNotification ( msg ) ) {
1041
1041
// notification message, aka the client ends it and doesn't want a reply
1042
1042
if ( ! initialized && msg . method !== "exit" ) {
@@ -1052,7 +1052,7 @@ function onMessage(msg: p.Message) {
1052
1052
}
1053
1053
} else if ( msg . method === DidOpenTextDocumentNotification . method ) {
1054
1054
let params = msg . params as p . DidOpenTextDocumentParams ;
1055
- openedFile ( params . textDocument . uri , params . textDocument . text ) ;
1055
+ await openedFile ( params . textDocument . uri , params . textDocument . text ) ;
1056
1056
updateDiagnosticSyntax ( params . textDocument . uri , params . textDocument . text ) ;
1057
1057
} else if ( msg . method === DidChangeTextDocumentNotification . method ) {
1058
1058
let params = msg . params as p . DidChangeTextDocumentParams ;
0 commit comments