@@ -2314,7 +2314,7 @@ let internal DriveFsiEventLoop (fsi: FsiEvaluationSessionHostConfig, fsiConsoleO
23142314
23152315/// The primary type, representing a full F# Interactive session, reading from the given
23162316/// text input, writing to the given text output and error writers.
2317- type FsiEvaluationSession ( fsi : FsiEvaluationSessionHostConfig , argv : string [], inReader : TextReader , outWriter : TextWriter , errorWriter : TextWriter , fsiCollectible : bool , msbuildEnabled : bool , checker : FSharpChecker ) =
2317+ type FsiEvaluationSession ( fsi : FsiEvaluationSessionHostConfig , argv : string [], inReader : TextReader , outWriter : TextWriter , errorWriter : TextWriter , fsiCollectible : bool , msbuildEnabled : bool ) =
23182318#if DYNAMIC_ CODE_ REWRITES_ CONSOLE_ WRITE
23192319 do
23202320 Microsoft.FSharp.Core.Printf.setWriter outWriter
@@ -2454,6 +2454,10 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
24542454
24552455 let fsiConsoleInput = FsiConsoleInput( fsi, fsiOptions, inReader, outWriter)
24562456
2457+ /// The single, global interactive checker that can be safely used in conjunction with other operations
2458+ /// on the FsiEvaluationSession.
2459+ let checker = FSharpChecker.Create( msbuildEnabled= msbuildEnabled)
2460+
24572461 let ( tcGlobals , frameworkTcImports , nonFrameworkResolutions , unresolvedReferences ) =
24582462 try
24592463 let tcConfig = tcConfigP.Get()
@@ -2714,12 +2718,8 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
27142718 GC.KeepAlive fsiInterruptController.EventHandlers
27152719
27162720
2717- static member Create ( fsiConfig , argv , inReader , outWriter , errorWriter , ? collectible , ? msbuildEnabled , ? checker ) =
2718- /// The single, global interactive checker that can be safely used in conjunction with other operations
2719- /// on the FsiEvaluationSession.
2720- let checker = match checker with None -> FSharpChecker.Create() | Some c -> c
2721-
2722- new FsiEvaluationSession( fsiConfig, argv, inReader, outWriter, errorWriter, defaultArg collectible false , defaultArg msbuildEnabled true , checker)
2721+ static member Create ( fsiConfig , argv , inReader , outWriter , errorWriter , ? collectible , ? msbuildEnabled ) =
2722+ new FsiEvaluationSession( fsiConfig, argv, inReader, outWriter, errorWriter, defaultArg collectible false , defaultArg msbuildEnabled true )
27232723
27242724 static member GetDefaultConfiguration ( fsiObj : obj ) = FsiEvaluationSession.GetDefaultConfiguration( fsiObj, true )
27252725
0 commit comments