@@ -247,7 +247,7 @@ type clientSentBuildAction = {
247247 title : string ;
248248 projectRootPath : string ;
249249} ;
250- let openedFile = ( fileUri : string , fileContent : string ) => {
250+ let openedFile = async ( fileUri : string , fileContent : string ) => {
251251 let filePath = fileURLToPath ( fileUri ) ;
252252
253253 stupidFileContentCache . set ( filePath , fileContent ) ;
@@ -270,8 +270,8 @@ let openedFile = (fileUri: string, fileContent: string) => {
270270 namespaceName . kind === "success" ? namespaceName . result : null ,
271271 rescriptVersion : utils . findReScriptVersionForProjectRoot ( projectRootPath ) ,
272272 bsbWatcherByEditor : null ,
273- bscBinaryLocation : utils . findBscExeBinary ( projectRootPath ) ,
274- editorAnalysisLocation : utils . findEditorAnalysisBinary ( projectRootPath ) ,
273+ bscBinaryLocation : await utils . findBscExeBinary ( projectRootPath ) ,
274+ editorAnalysisLocation : await utils . findEditorAnalysisBinary ( projectRootPath ) ,
275275 hasPromptedToStartBuild : / ( \/ | \\ ) n o d e _ m o d u l e s ( \/ | \\ ) / . test (
276276 projectRootPath
277277 )
@@ -1036,7 +1036,7 @@ function openCompiledFile(msg: p.RequestMessage): p.Message {
10361036 return response ;
10371037}
10381038
1039- function onMessage ( msg : p . Message ) {
1039+ async function onMessage ( msg : p . Message ) {
10401040 if ( p . Message . isNotification ( msg ) ) {
10411041 // notification message, aka the client ends it and doesn't want a reply
10421042 if ( ! initialized && msg . method !== "exit" ) {
@@ -1052,7 +1052,7 @@ function onMessage(msg: p.Message) {
10521052 }
10531053 } else if ( msg . method === DidOpenTextDocumentNotification . method ) {
10541054 let params = msg . params as p . DidOpenTextDocumentParams ;
1055- openedFile ( params . textDocument . uri , params . textDocument . text ) ;
1055+ await openedFile ( params . textDocument . uri , params . textDocument . text ) ;
10561056 updateDiagnosticSyntax ( params . textDocument . uri , params . textDocument . text ) ;
10571057 } else if ( msg . method === DidChangeTextDocumentNotification . method ) {
10581058 let params = msg . params as p . DidChangeTextDocumentParams ;
0 commit comments