Skip to content

Commit

Permalink
Remove Async.RunSynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Feb 20, 2025
1 parent 27b205e commit be1048d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Compiler/Service/FSharpCheckerResults.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3860,6 +3860,9 @@ type FSharpCheckProjectResults
|> Array.toSeq
#endif //!FABLE_COMPILER
| Choice2Of2 task ->
#if FABLE_COMPILER
seq {}
#else
Async.RunSynchronously(
async {
let! tcSymbolUses = task
Expand All @@ -3872,6 +3875,7 @@ type FSharpCheckProjectResults
},
?cancellationToken = cancellationToken
)
#endif //!FABLE_COMPILER

results
|> Seq.filter (fun symbolUse -> symbolUse.ItemOccurrence <> ItemOccurrence.RelatedText)
Expand All @@ -3890,7 +3894,7 @@ type FSharpCheckProjectResults

let cenv = SymbolEnv(tcGlobals, thisCcu, Some ccuSig, tcImports)

let tcSymbolUses =
let tcSymbolUses : TcSymbolUses seq =
match builderOrSymbolUses with
| Choice1Of2 builder ->
#if FABLE_COMPILER
Expand All @@ -3908,7 +3912,12 @@ type FSharpCheckProjectResults
| _ -> TcSymbolUses.Empty)
|> Array.toSeq
#endif //!FABLE_COMPILER
| Choice2Of2 tcSymbolUses -> Async.RunSynchronously(tcSymbolUses, ?cancellationToken = cancellationToken)
| Choice2Of2 tcSymbolUses ->
#if FABLE_COMPILER
seq {}
#else
Async.RunSynchronously(tcSymbolUses, ?cancellationToken = cancellationToken)
#endif //!FABLE_COMPILER

[|
for r in tcSymbolUses do
Expand Down

0 comments on commit be1048d

Please sign in to comment.