Skip to content

Commit 57ca46b

Browse files
committed
Revert "Allow parallel project analysis with an environment variable"
This reverts commit c62e89c
1 parent ad5d138 commit 57ca46b

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

src/Compiler/Driver/CompilerImports.fs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,20 +2141,6 @@ and [<Sealed>] TcImports
21412141
node {
21422142
CheckDisposed()
21432143

2144-
// TODO inject top-down from FSharpChecker
2145-
let runInParallel =
2146-
Environment.GetEnvironmentVariable("FCS_PARALLEL_PROJECTS_ANALYSIS")
2147-
|> bool.TryParse
2148-
|> function
2149-
| true, runInParallel -> runInParallel
2150-
| false, _ -> false
2151-
2152-
let runMethod =
2153-
if runInParallel then
2154-
NodeCode.Parallel
2155-
else
2156-
NodeCode.Sequential
2157-
21582144
let! results =
21592145
nms
21602146
|> List.map (fun nm ->
@@ -2165,7 +2151,7 @@ and [<Sealed>] TcImports
21652151
errorR (Error(FSComp.SR.buildProblemReadingAssembly (nm.resolvedPath, e.Message), nm.originalReference.Range))
21662152
return None
21672153
})
2168-
|> runMethod
2154+
|> NodeCode.Sequential
21692155

21702156
let dllinfos, phase2s = results |> Array.choose id |> List.ofArray |> List.unzip
21712157
fixupOrphanCcus ()

src/Compiler/Facilities/BuildGraph.fs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@ type NodeCode private () =
194194

195195
return results.ToArray()
196196
}
197-
198-
static member Parallel (computations: NodeCode<'T> seq) =
199-
computations
200-
|> Seq.map (fun (Node x) -> x)
201-
|> Async.Parallel
202-
|> Node
203197

204198
type private AgentMessage<'T> = GetValue of AsyncReplyChannel<Result<'T, Exception>> * callerCancellationToken: CancellationToken
205199

@@ -349,7 +343,7 @@ type GraphNode<'T>(retryCompute: bool, computation: NodeCode<'T>) =
349343
// occur, making sure we are under the protection of the 'try'.
350344
// For example, NodeCode's 'try/finally' (TryFinally) uses async.TryFinally which does
351345
// implicit cancellation checks even before the try is entered, as do the
352-
// de-sugaring of 'do!' and other NodeCode constructs.
346+
// de-sugaring of 'do!' and other CodeCode constructs.
353347
let mutable taken = false
354348

355349
try

src/Compiler/Facilities/BuildGraph.fsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ type NodeCode =
6969

7070
static member Sequential: computations: NodeCode<'T> seq -> NodeCode<'T[]>
7171

72-
static member Parallel: computations: (NodeCode<'T> seq) -> NodeCode<'T[]>
73-
7472
/// Execute the cancellable computation synchronously using the ambient cancellation token of
7573
/// the NodeCode.
7674
static member FromCancellable: computation: Cancellable<'T> -> NodeCode<'T>

0 commit comments

Comments
 (0)