@@ -2614,9 +2614,8 @@ type BackgroundCompiler(referenceResolver, projectCacheSize, keepAssemblyContent
2614
2614
#endif
2615
2615
let loadedTimeStamp = defaultArg loadedTimeStamp DateTime.MaxValue // Not 'now', we don't want to force reloading
2616
2616
let applyCompilerOptions tcConfigB =
2617
- let collect _name = ()
2618
2617
let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB
2619
- CompileOptions.ParseCompilerOptions ( collect , fsiCompilerOptions, Array.toList otherFlags)
2618
+ CompileOptions.ParseCompilerOptions ( ignore , fsiCompilerOptions, Array.toList otherFlags)
2620
2619
let fas = LoadClosure.ComputeClosureOfSourceText( referenceResolver, filename, source, CodeContext.Editing, useSimpleResolution, useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions)
2621
2620
let otherFlags =
2622
2621
[| yield " --noframework" ; yield " --warn:3" ;
@@ -3000,25 +2999,30 @@ type FSharpChecker(referenceResolver, projectCacheSize, keepAssemblyContents, ke
3000
2999
member internal __.FrameworkImportsCache = backgroundCompiler.FrameworkImportsCache
3001
3000
3002
3001
3003
- type FsiInteractiveChecker ( reactorOps : IReactorOperations , tcConfig , tcGlobals , tcImports , tcState , loadClosure ) =
3002
+ type FsiInteractiveChecker ( referenceResolver , reactorOps : IReactorOperations , tcConfig : TcConfig , tcGlobals , tcImports , tcState ) =
3004
3003
let keepAssemblyContents = false
3005
3004
3006
3005
static member CreateErrorInfos ( tcConfig , allErrors , mainInputFileName , errors ) =
3007
3006
Parser.CreateErrorInfos( tcConfig, allErrors, mainInputFileName, errors)
3008
3007
3009
3008
member __.ParseAndCheckInteraction ( source ) =
3010
3009
3011
- let mainInputFileName = " stdin.fsx"
3010
+ let mainInputFileName = Path.Combine ( tcConfig.implicitIncludeDir , " stdin.fsx" )
3012
3011
// Note: projectSourceFiles is only used to compute isLastCompiland, and is ignored if Build.IsScript(mainInputFileName) is true (which it is in this case).
3013
3012
let projectSourceFiles = [ ]
3014
3013
let parseErrors , _matchPairs , inputOpt , anyErrors = Parser.ParseOneFile ( source, false , true , mainInputFileName, projectSourceFiles, tcConfig)
3015
3014
let dependencyFiles = [] // interactions have no dependencies
3016
3015
let parseResults = FSharpParseFileResults( parseErrors, inputOpt, parseHadErrors = anyErrors, dependencyFiles = dependencyFiles)
3017
3016
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)
3018
3022
let backgroundErrors = []
3019
3023
let tcErrors , tcFileResult =
3020
3024
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)
3022
3026
3023
3027
match tcFileResult with
3024
3028
| Parser.TypeCheckAborted.No scope ->
0 commit comments