@@ -237,9 +237,9 @@ export let formatCode = (
237237 }
238238} ;
239239
240- export let findReScriptVersion = (
240+ export let findReScriptVersion = async (
241241 filePath : p . DocumentUri
242- ) : string | undefined => {
242+ ) : Promise < string | undefined > => {
243243 let projectRoot = findProjectRootOfFile ( filePath ) ;
244244 if ( projectRoot == null ) {
245245 return undefined ;
@@ -260,7 +260,7 @@ export let findReScriptVersion = (
260260 }
261261} ;
262262
263- export function findReScriptVersionForProjectRoot ( projectRootPath :string ) : string | undefined {
263+ export function findReScriptVersionForProjectRoot ( projectRootPath : string ) : string | undefined {
264264 const bscExe = findBinary ( findPlatformPath ( projectRootPath ) , c . bscExeName ) ;
265265
266266 if ( bscExe == null ) {
@@ -605,9 +605,9 @@ type parsedCompilerLogResult = {
605605 codeActions : codeActions . filesCodeActions ;
606606 linesWithParseErrors : string [ ] ;
607607} ;
608- export let parseCompilerLogOutput = (
608+ export let parseCompilerLogOutput = async (
609609 content : string
610- ) : parsedCompilerLogResult => {
610+ ) : Promise < parsedCompilerLogResult > => {
611611 type parsedDiagnostic = {
612612 code : number | undefined ;
613613 severity : t . DiagnosticSeverity ;
@@ -752,7 +752,7 @@ export let parseCompilerLogOutput = (
752752 let result : filesDiagnostics = { } ;
753753 let foundCodeActions : codeActions . filesCodeActions = { } ;
754754
755- parsedDiagnostics . forEach ( ( parsedDiagnostic ) => {
755+ for ( const parsedDiagnostic of parsedDiagnostics ) {
756756 let [ fileAndRangeLine , ...diagnosticMessage ] = parsedDiagnostic . content ;
757757 let { file, range } = parseFileAndRange ( fileAndRangeLine ) ;
758758
@@ -771,7 +771,7 @@ export let parseCompilerLogOutput = (
771771 } ;
772772
773773 // Check for potential code actions
774- codeActions . findCodeActionsInDiagnosticsMessage ( {
774+ await codeActions . findCodeActionsInDiagnosticsMessage ( {
775775 addFoundActionsHere : foundCodeActions ,
776776 diagnostic,
777777 diagnosticMessage,
@@ -780,7 +780,7 @@ export let parseCompilerLogOutput = (
780780 } ) ;
781781
782782 result [ file ] . push ( diagnostic ) ;
783- } ) ;
783+ }
784784
785785 return {
786786 done,
0 commit comments