@@ -2314,7 +2314,7 @@ let internal DriveFsiEventLoop (fsi: FsiEvaluationSessionHostConfig, fsiConsoleO
2314
2314
2315
2315
/// The primary type, representing a full F# Interactive session, reading from the given
2316
2316
/// 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 ) =
2318
2318
#if DYNAMIC_ CODE_ REWRITES_ CONSOLE_ WRITE
2319
2319
do
2320
2320
Microsoft.FSharp.Core.Printf.setWriter outWriter
@@ -2454,6 +2454,10 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
2454
2454
2455
2455
let fsiConsoleInput = FsiConsoleInput( fsi, fsiOptions, inReader, outWriter)
2456
2456
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
+
2457
2461
let ( tcGlobals , frameworkTcImports , nonFrameworkResolutions , unresolvedReferences ) =
2458
2462
try
2459
2463
let tcConfig = tcConfigP.Get()
@@ -2714,12 +2718,8 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
2714
2718
GC.KeepAlive fsiInterruptController.EventHandlers
2715
2719
2716
2720
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 )
2723
2723
2724
2724
static member GetDefaultConfiguration ( fsiObj : obj ) = FsiEvaluationSession.GetDefaultConfiguration( fsiObj, true )
2725
2725
0 commit comments