@@ -2614,9 +2614,8 @@ type BackgroundCompiler(referenceResolver, projectCacheSize, keepAssemblyContent
26142614#endif
26152615 let loadedTimeStamp = defaultArg loadedTimeStamp DateTime.MaxValue // Not 'now', we don't want to force reloading
26162616 let applyCompilerOptions tcConfigB =
2617- let collect _name = ()
26182617 let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB
2619- CompileOptions.ParseCompilerOptions ( collect , fsiCompilerOptions, Array.toList otherFlags)
2618+ CompileOptions.ParseCompilerOptions ( ignore , fsiCompilerOptions, Array.toList otherFlags)
26202619 let fas = LoadClosure.ComputeClosureOfSourceText( referenceResolver, filename, source, CodeContext.Editing, useSimpleResolution, useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions)
26212620 let otherFlags =
26222621 [| yield " --noframework" ; yield " --warn:3" ;
@@ -3000,25 +2999,30 @@ type FSharpChecker(referenceResolver, projectCacheSize, keepAssemblyContents, ke
30002999 member internal __.FrameworkImportsCache = backgroundCompiler.FrameworkImportsCache
30013000
30023001
3003- type FsiInteractiveChecker ( reactorOps : IReactorOperations , tcConfig , tcGlobals , tcImports , tcState , loadClosure ) =
3002+ type FsiInteractiveChecker ( referenceResolver , reactorOps : IReactorOperations , tcConfig : TcConfig , tcGlobals , tcImports , tcState ) =
30043003 let keepAssemblyContents = false
30053004
30063005 static member CreateErrorInfos ( tcConfig , allErrors , mainInputFileName , errors ) =
30073006 Parser.CreateErrorInfos( tcConfig, allErrors, mainInputFileName, errors)
30083007
30093008 member __.ParseAndCheckInteraction ( source ) =
30103009
3011- let mainInputFileName = " stdin.fsx"
3010+ let mainInputFileName = Path.Combine ( tcConfig.implicitIncludeDir , " stdin.fsx" )
30123011 // Note: projectSourceFiles is only used to compute isLastCompiland, and is ignored if Build.IsScript(mainInputFileName) is true (which it is in this case).
30133012 let projectSourceFiles = [ ]
30143013 let parseErrors , _matchPairs , inputOpt , anyErrors = Parser.ParseOneFile ( source, false , true , mainInputFileName, projectSourceFiles, tcConfig)
30153014 let dependencyFiles = [] // interactions have no dependencies
30163015 let parseResults = FSharpParseFileResults( parseErrors, inputOpt, parseHadErrors = anyErrors, dependencyFiles = dependencyFiles)
30173016
3017+ let applyCompilerOptions tcConfigB =
3018+ let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB
3019+ CompileOptions.ParseCompilerOptions ( ignore, fsiCompilerOptions, [ ])
3020+
3021+ let loadClosure = LoadClosure.ComputeClosureOfSourceText( referenceResolver, mainInputFileName, source, CodeContext.Editing, tcConfig.useSimpleResolution, tcConfig.useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions)
30183022 let backgroundErrors = []
30193023 let tcErrors , tcFileResult =
30203024 Parser.TypeCheckOneFile( parseResults, source, mainInputFileName, " project" , tcConfig, tcGlobals, tcImports, tcState,
3021- loadClosure, backgroundErrors, reactorOps,( fun () -> true ),( fun _ -> false ), None)
3025+ Some loadClosure, backgroundErrors, reactorOps,( fun () -> true ),( fun _ -> false ), None)
30223026
30233027 match tcFileResult with
30243028 | Parser.TypeCheckAborted.No scope ->
0 commit comments