@@ -237,9 +237,9 @@ export let formatCode = (
237
237
}
238
238
} ;
239
239
240
- export let findReScriptVersion = (
240
+ export let findReScriptVersion = async (
241
241
filePath : p . DocumentUri
242
- ) : string | undefined => {
242
+ ) : Promise < string | undefined > => {
243
243
let projectRoot = findProjectRootOfFile ( filePath ) ;
244
244
if ( projectRoot == null ) {
245
245
return undefined ;
@@ -260,7 +260,7 @@ export let findReScriptVersion = (
260
260
}
261
261
} ;
262
262
263
- export function findReScriptVersionForProjectRoot ( projectRootPath :string ) : string | undefined {
263
+ export function findReScriptVersionForProjectRoot ( projectRootPath : string ) : string | undefined {
264
264
const bscExe = findBinary ( findPlatformPath ( projectRootPath ) , c . bscExeName ) ;
265
265
266
266
if ( bscExe == null ) {
@@ -605,9 +605,9 @@ type parsedCompilerLogResult = {
605
605
codeActions : codeActions . filesCodeActions ;
606
606
linesWithParseErrors : string [ ] ;
607
607
} ;
608
- export let parseCompilerLogOutput = (
608
+ export let parseCompilerLogOutput = async (
609
609
content : string
610
- ) : parsedCompilerLogResult => {
610
+ ) : Promise < parsedCompilerLogResult > => {
611
611
type parsedDiagnostic = {
612
612
code : number | undefined ;
613
613
severity : t . DiagnosticSeverity ;
@@ -752,7 +752,7 @@ export let parseCompilerLogOutput = (
752
752
let result : filesDiagnostics = { } ;
753
753
let foundCodeActions : codeActions . filesCodeActions = { } ;
754
754
755
- parsedDiagnostics . forEach ( ( parsedDiagnostic ) => {
755
+ for ( const parsedDiagnostic of parsedDiagnostics ) {
756
756
let [ fileAndRangeLine , ...diagnosticMessage ] = parsedDiagnostic . content ;
757
757
let { file, range } = parseFileAndRange ( fileAndRangeLine ) ;
758
758
@@ -771,7 +771,7 @@ export let parseCompilerLogOutput = (
771
771
} ;
772
772
773
773
// Check for potential code actions
774
- codeActions . findCodeActionsInDiagnosticsMessage ( {
774
+ await codeActions . findCodeActionsInDiagnosticsMessage ( {
775
775
addFoundActionsHere : foundCodeActions ,
776
776
diagnostic,
777
777
diagnosticMessage,
@@ -780,7 +780,7 @@ export let parseCompilerLogOutput = (
780
780
} ) ;
781
781
782
782
result [ file ] . push ( diagnostic ) ;
783
- } ) ;
783
+ }
784
784
785
785
return {
786
786
done,
0 commit comments