diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index d0af1284f14..3a9b805b676 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -126,6 +126,7 @@ type internal IBackgroundCompiler = abstract GetProjectSnapshotFromScript: fileName: string * sourceText: ISourceTextNew * + documentSource: DocumentSource * previewEnabled: bool option * loadedTimeStamp: System.DateTime option * otherFlags: string array option * @@ -1627,6 +1628,7 @@ type internal BackgroundCompiler ( fileName: string, sourceText: ISourceTextNew, + documentSource: DocumentSource, previewEnabled: bool option, loadedTimeStamp: DateTime option, otherFlags: string array option, @@ -1653,7 +1655,7 @@ type internal BackgroundCompiler userOpName ) - let! snapshot = FSharpProjectSnapshot.FromOptions(options, DocumentSource.FileSystem) + let! snapshot = FSharpProjectSnapshot.FromOptions(options, documentSource) return snapshot, diagnostics } diff --git a/src/Compiler/Service/BackgroundCompiler.fsi b/src/Compiler/Service/BackgroundCompiler.fsi index fff6324be35..498e2a5102e 100644 --- a/src/Compiler/Service/BackgroundCompiler.fsi +++ b/src/Compiler/Service/BackgroundCompiler.fsi @@ -105,6 +105,7 @@ type internal IBackgroundCompiler = abstract GetProjectSnapshotFromScript: fileName: string * sourceText: ISourceTextNew * + documentSource: DocumentSource * previewEnabled: bool option * loadedTimeStamp: System.DateTime option * otherFlags: string array option * diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index 953c7c5dd6e..e206971eaad 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -376,6 +376,76 @@ type internal TransparentCompiler ) :> IBackgroundCompiler + let ComputeScriptClosureInner + (fileName: string) + (source: ISourceTextNew) + (defaultFSharpBinariesDir: string) + (useSimpleResolution: bool) + (useFsiAuxLib: bool) + (useSdkRefs: bool) + (sdkDirOverride: string option) + (assumeDotNetFramework: bool) + (otherOptions: string list) + = + let reduceMemoryUsage = ReduceMemoryFlag.Yes + + let applyCompilerOptions tcConfig = + let fsiCompilerOptions = GetCoreFsiCompilerOptions tcConfig + ParseCompilerOptions(ignore, fsiCompilerOptions, otherOptions) + + let closure = + LoadClosure.ComputeClosureOfScriptText( + legacyReferenceResolver, + defaultFSharpBinariesDir, + fileName, + source, + CodeContext.Editing, + useSimpleResolution, + useFsiAuxLib, + useSdkRefs, + sdkDirOverride, + Lexhelp.LexResourceManager(), + applyCompilerOptions, + assumeDotNetFramework, + tryGetMetadataSnapshot, + reduceMemoryUsage, + dependencyProviderForScripts + ) + + closure + + let mkScriptClosureCacheKey + (fileName: string) + (source: ISourceTextNew) + (useSimpleResolution: bool) + (useFsiAuxLib: bool) + (useSdkRefs: bool) + (assumeDotNetFramework: bool) + (projectIdentifier: ProjectIdentifier) + (otherOptions: string list) + (stamp: int64 option) + = + { new ICacheKey with + member _.GetKey() = fileName, projectIdentifier + member _.GetLabel() = $"ScriptClosure for %s{fileName}" + + member _.GetVersion() = + Md5Hasher.empty + |> Md5Hasher.addStrings + [| + yield! otherOptions + match stamp with + | None -> () + | Some stamp -> string stamp + |] + |> Md5Hasher.addBytes (source.GetChecksum().ToArray()) + |> Md5Hasher.addBool useSimpleResolution + |> Md5Hasher.addBool useFsiAuxLib + |> Md5Hasher.addBool useSdkRefs + |> Md5Hasher.addBool assumeDotNetFramework + |> Md5Hasher.toString + } + let ComputeScriptClosure (fileName: string) (source: ISourceTextNew) @@ -393,57 +463,32 @@ type internal TransparentCompiler let useSdkRefs = defaultArg useSdkRefs true let assumeDotNetFramework = defaultArg assumeDotNetFramework false - let key = - { new ICacheKey with - member _.GetKey() = fileName, projectIdentifier - member _.GetLabel() = $"ScriptClosure for %s{fileName}" - - member _.GetVersion() = - Md5Hasher.empty - |> Md5Hasher.addStrings - [| - yield! otherOptions - match stamp with - | None -> () - | Some stamp -> string stamp - |] - |> Md5Hasher.addBytes (source.GetChecksum().ToArray()) - |> Md5Hasher.addBool useFsiAuxLib - |> Md5Hasher.addBool useFsiAuxLib - |> Md5Hasher.addBool useSdkRefs - |> Md5Hasher.addBool assumeDotNetFramework - |> Md5Hasher.toString - } + let key: ICacheKey = + mkScriptClosureCacheKey + fileName + source + useSimpleResolution + useFsiAuxLib + useSdkRefs + assumeDotNetFramework + projectIdentifier + otherOptions + stamp caches.ScriptClosure.Get( key, node { - let reduceMemoryUsage = ReduceMemoryFlag.Yes - - let applyCompilerOptions tcConfig = - let fsiCompilerOptions = GetCoreFsiCompilerOptions tcConfig - ParseCompilerOptions(ignore, fsiCompilerOptions, otherOptions) - - let closure = - LoadClosure.ComputeClosureOfScriptText( - legacyReferenceResolver, - defaultFSharpBinariesDir, - fileName, - source, - CodeContext.Editing, - useSimpleResolution, - useFsiAuxLib, - useSdkRefs, - sdkDirOverride, - Lexhelp.LexResourceManager(), - applyCompilerOptions, - assumeDotNetFramework, - tryGetMetadataSnapshot, - reduceMemoryUsage, - dependencyProviderForScripts - ) - - return closure + return + ComputeScriptClosureInner + fileName + source + defaultFSharpBinariesDir + useSimpleResolution + useFsiAuxLib + useSdkRefs + sdkDirOverride + assumeDotNetFramework + otherOptions } ) @@ -676,8 +721,13 @@ type internal TransparentCompiler (getSwitchValue useSimpleResolutionSwitch) |> Option.isSome let! (loadClosureOpt: LoadClosure option) = - match projectSnapshot.SourceFiles, projectSnapshot.UseScriptResolutionRules with - | [ fsxFile ], true -> // assuming UseScriptResolutionRules and a single source file means we are doing this for a script + let lastScriptFile = + match List.tryLast projectSnapshot.SourceFiles with + | None -> None + | Some file -> if IsScript file.FileName then Some file else None + + match lastScriptFile, projectSnapshot.UseScriptResolutionRules with + | Some fsxFile, true -> // assuming UseScriptResolutionRules and a single source file means we are doing this for a script node { let! source = fsxFile.GetSource() |> NodeCode.AwaitTask @@ -2158,6 +2208,7 @@ type internal TransparentCompiler bc.GetProjectSnapshotFromScript( fileName, SourceTextNew.ofISourceText sourceText, + DocumentSource.FileSystem, previewEnabled, loadedTimeStamp, otherFlags, @@ -2177,6 +2228,7 @@ type internal TransparentCompiler ( fileName: string, sourceText: ISourceTextNew, + documentSource: DocumentSource, previewEnabled: bool option, loadedTimeStamp: DateTime option, otherFlags: string array option, @@ -2199,7 +2251,8 @@ type internal TransparentCompiler let previewEnabled = defaultArg previewEnabled false // Do we assume .NET Framework references for scripts? - let assumeDotNetFramework = defaultArg assumeDotNetFramework true + // No, because the bootstrap info call also doesn't + let assumeDotNetFramework = defaultArg assumeDotNetFramework false let extraFlags = if previewEnabled then @@ -2219,20 +2272,22 @@ type internal TransparentCompiler let currentSourceFile = FSharpFileSnapshot.Create(fileName, sourceText.GetHashCode().ToString(), (fun () -> Task.FromResult sourceText)) - let! loadClosure = - ComputeScriptClosure + let otherFlags = List.ofArray otherFlags + + // Always perform the load closure as we cannot be sure that the incoming file does not load any new additional files. + // Consider the scenario where a.fsx loads b.fsx. Based purely on a.fsx, we cannot know if b.fsx loads another file. + // Therefore we cannot rely on any caching for the script closure in this API. + let loadClosure = + ComputeScriptClosureInner fileName sourceText FSharpCheckerResultsSettings.defaultFSharpBinariesDir useSimpleResolution - (Some useFsiAuxLib) - (Some useSdkRefs) + useFsiAuxLib + useSdkRefs sdkDirOverride - (Some assumeDotNetFramework) - (projectFileName, fileName) - (List.ofArray otherFlags) - optionsStamp - |> Async.AwaitNodeCode + assumeDotNetFramework + otherFlags let otherFlags = [ @@ -2243,13 +2298,31 @@ type internal TransparentCompiler yield "--nowarn:" + code ] + // Once we do have the script closure, we can populate the cache to re-use can later. + let loadClosureKey = + mkScriptClosureCacheKey + fileName + sourceText + useSimpleResolution + useFsiAuxLib + useSdkRefs + assumeDotNetFramework + (projectFileName, "") + otherFlags + optionsStamp + + // Populate the cache. + let! _ = + caches.ScriptClosure.Get(loadClosureKey, node { return loadClosure }) + |> Async.AwaitNodeCode + let sourceFiles = loadClosure.SourceFiles |> List.map (fun (sf, _) -> if sf = fileName then currentSourceFile else - FSharpFileSnapshot.CreateFromFileSystem sf) + FSharpFileSnapshot.CreateFromDocumentSource(sf, documentSource)) let references = loadClosure.References diff --git a/src/Compiler/Service/service.fs b/src/Compiler/Service/service.fs index 103c84e63cf..093a692f1ec 100644 --- a/src/Compiler/Service/service.fs +++ b/src/Compiler/Service/service.fs @@ -566,6 +566,7 @@ type FSharpChecker ( fileName, source, + ?documentSource, ?previewEnabled, ?loadedTimeStamp, ?otherFlags, @@ -577,10 +578,12 @@ type FSharpChecker ?userOpName: string ) = let userOpName = defaultArg userOpName "Unknown" + let documentSource = defaultArg documentSource DocumentSource.FileSystem backgroundCompiler.GetProjectSnapshotFromScript( fileName, source, + documentSource, previewEnabled, loadedTimeStamp, otherFlags, diff --git a/src/Compiler/Service/service.fsi b/src/Compiler/Service/service.fsi index 71e0f51df3d..a15c208c26c 100644 --- a/src/Compiler/Service/service.fsi +++ b/src/Compiler/Service/service.fsi @@ -253,6 +253,7 @@ type public FSharpChecker = /// Used to differentiate between scripts, to consider each script a separate project. Also used in formatted error messages. /// The source for the file. + /// DocumentSource to load any additional files. /// Is the preview compiler enabled. /// Indicates when the script was loaded into the editing environment, /// so that an 'unload' and 'reload' action will cause the script to be considered as a new project, @@ -268,6 +269,7 @@ type public FSharpChecker = member GetProjectSnapshotFromScript: fileName: string * source: ISourceTextNew * + ?documentSource: DocumentSource * ?previewEnabled: bool * ?loadedTimeStamp: DateTime * ?otherFlags: string[] * diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs index 476adb99c5d..c7e7777fd98 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/TransparentCompiler.fs @@ -3,6 +3,7 @@ open System.Collections.Concurrent open System.Diagnostics open FSharp.Compiler.CodeAnalysis +open FSharp.Compiler.IO open FSharp.Compiler.Text open Internal.Utilities.Collections open FSharp.Compiler.CodeAnalysis.TransparentCompiler @@ -1020,4 +1021,108 @@ let ``Transparent Compiler ScriptClosure cache is populated after GetProjectOpti let content = SourceTextNew.ofString "" let! _ = transparentChecker.GetProjectOptionsFromScript(scriptName, content) Assert.Equal(1, transparentChecker.Caches.ScriptClosure.Count) + } + +type private LoadClosureTestShim(currentFileSystem: IFileSystem) = + inherit DefaultFileSystem() + let mutable bDidUpdate = false + let asStream (v:string) = new MemoryStream(System.Text.Encoding.UTF8.GetBytes v) + let knownFiles = set [ "a.fsx"; "b.fsx"; "c.fsx" ] + + member val aFsx = "#load \"b.fsx\"" + member val bFsxInitial = "" + member val bFsxUpdate = "#load \"c.fsx\"" + member val cFsx = "" + + member x.DocumentSource (fileName: string) = + async { + if not (knownFiles.Contains fileName) then + return None + else + match fileName with + | "a.fsx" -> return Some (SourceText.ofString x.aFsx) + | "b.fsx" -> return Some (SourceText.ofString (if bDidUpdate then x.bFsxUpdate else x.bFsxInitial)) + | "c.fsx" -> return Some (SourceText.ofString x.cFsx) + | _ -> return None + } + + member x.UpdateB () = bDidUpdate <- true + + override _.FileExistsShim(path) = + if knownFiles.Contains path then true else currentFileSystem.FileExistsShim(path) + override _.GetFullPathShim(fileName) = + if knownFiles.Contains fileName then fileName else currentFileSystem.GetFullPathShim(fileName) + override x.OpenFileForReadShim(fileName, ?useMemoryMappedFile: bool, ?shouldShadowCopy: bool) = + match fileName with + | "a.fsx" -> asStream x.aFsx + | "b.fsx" -> asStream (if bDidUpdate then x.bFsxUpdate else x.bFsxInitial) + | "c.fsx" -> asStream x.cFsx + | _ -> + currentFileSystem.OpenFileForReadShim( + fileName, + ?useMemoryMappedFile = useMemoryMappedFile, + ?shouldShadowCopy = shouldShadowCopy + ) + +[] +[] +[] +let ``The script load closure should always be evaluated`` useTransparentCompiler = + async { + // The LoadScriptClosure uses the file system shim so we need to reset that. + let currentFileSystem = FileSystemAutoOpens.FileSystem + let assumeDotNetFramework = + // The old BackgroundCompiler uses assumeDotNetFramework = true + // This is not always correctly loading when this test runs on non-Windows. + if System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") then + None + else + Some false + + try + let checker = FSharpChecker.Create(useTransparentCompiler = useTransparentCompiler) + let fileSystemShim = LoadClosureTestShim(currentFileSystem) + // Override the file system shim for loading b.fsx + FileSystem <- fileSystemShim + + let! initialSnapshot, _ = + checker.GetProjectSnapshotFromScript( + "a.fsx", + SourceTextNew.ofString fileSystemShim.aFsx, + documentSource = DocumentSource.Custom fileSystemShim.DocumentSource, + ?assumeDotNetFramework = assumeDotNetFramework + ) + + // File b.fsx should also be included in the snapshot. + Assert.Equal(2, initialSnapshot.SourceFiles.Length) + + let! checkResults = checker.ParseAndCheckFileInProject("a.fsx", initialSnapshot) + + match snd checkResults with + | FSharpCheckFileAnswer.Aborted -> failwith "Did not expected FSharpCheckFileAnswer.Aborted" + | FSharpCheckFileAnswer.Succeeded checkFileResults -> Assert.Equal(0, checkFileResults.Diagnostics.Length) + + // Update b.fsx, it should now load c.fsx + fileSystemShim.UpdateB() + + // The constructed key for the load closure will the exactly the same as the first GetProjectSnapshotFromScript call. + // However, a none cached version will be computed first in GetProjectSnapshotFromScript and update the cache afterwards. + let! secondSnapshot, _ = + checker.GetProjectSnapshotFromScript( + "a.fsx", + SourceTextNew.ofString fileSystemShim.aFsx, + documentSource = DocumentSource.Custom fileSystemShim.DocumentSource, + ?assumeDotNetFramework = assumeDotNetFramework + ) + + Assert.Equal(3, secondSnapshot.SourceFiles.Length) + + let! checkResults = checker.ParseAndCheckFileInProject("a.fsx", secondSnapshot) + + match snd checkResults with + | FSharpCheckFileAnswer.Aborted -> failwith "Did not expected FSharpCheckFileAnswer.Aborted" + | FSharpCheckFileAnswer.Succeeded checkFileResults -> Assert.Equal(0, checkFileResults.Diagnostics.Length) + finally + FileSystemAutoOpens.FileSystem <- currentFileSystem + } \ No newline at end of file diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 9dda7f12180..ccebabe8695 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -2067,7 +2067,7 @@ FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpParseFileResults,FSharp.Compiler.CodeAnalysis.FSharpCheckFileAnswer]] ParseAndCheckFileInProject(System.String, Int32, FSharp.Compiler.Text.ISourceText, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpParseFileResults,FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults]] GetBackgroundCheckResultsForFileInProject(System.String, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpProjectOptions,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectOptionsFromScript(System.String, FSharp.Compiler.Text.ISourceText, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) -FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.ProjectSnapshot+FSharpProjectSnapshot,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectSnapshotFromScript(System.String, FSharp.Compiler.Text.ISourceTextNew, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) +FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.ProjectSnapshot+FSharpProjectSnapshot,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectSnapshotFromScript(System.String, FSharp.Compiler.Text.ISourceTextNew, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Diagnostics.FSharpDiagnostic[],System.Int32]] Compile(System.String[], Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Text.Range,FSharp.Compiler.Text.Range][]] MatchBraces(System.String, FSharp.Compiler.Text.ISourceText, FSharp.Compiler.CodeAnalysis.FSharpParsingOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Text.Range,FSharp.Compiler.Text.Range][]] MatchBraces(System.String, System.String, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 9dda7f12180..ccebabe8695 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -2067,7 +2067,7 @@ FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpParseFileResults,FSharp.Compiler.CodeAnalysis.FSharpCheckFileAnswer]] ParseAndCheckFileInProject(System.String, Int32, FSharp.Compiler.Text.ISourceText, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpParseFileResults,FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults]] GetBackgroundCheckResultsForFileInProject(System.String, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.FSharpProjectOptions,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectOptionsFromScript(System.String, FSharp.Compiler.Text.ISourceText, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) -FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.ProjectSnapshot+FSharpProjectSnapshot,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectSnapshotFromScript(System.String, FSharp.Compiler.Text.ISourceTextNew, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) +FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.CodeAnalysis.ProjectSnapshot+FSharpProjectSnapshot,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Diagnostics.FSharpDiagnostic]]] GetProjectSnapshotFromScript(System.String, FSharp.Compiler.Text.ISourceTextNew, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.DocumentSource], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.DateTime], Microsoft.FSharp.Core.FSharpOption`1[System.String[]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Int64], Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Diagnostics.FSharpDiagnostic[],System.Int32]] Compile(System.String[], Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Text.Range,FSharp.Compiler.Text.Range][]] MatchBraces(System.String, FSharp.Compiler.Text.ISourceText, FSharp.Compiler.CodeAnalysis.FSharpParsingOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpChecker: Microsoft.FSharp.Control.FSharpAsync`1[System.Tuple`2[FSharp.Compiler.Text.Range,FSharp.Compiler.Text.Range][]] MatchBraces(System.String, System.String, FSharp.Compiler.CodeAnalysis.FSharpProjectOptions, Microsoft.FSharp.Core.FSharpOption`1[System.String])