diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index 1089f5774e8..ade90c9da3f 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -1065,7 +1065,7 @@ type internal BackgroundCompiler tcProj.TcGlobals, options.IsIncompleteTypeCheckEnvironment, Some builder, - options, + Some options, Array.ofList tcDependencyFiles, creationDiags, parseResults.Diagnostics, @@ -1247,7 +1247,7 @@ type internal BackgroundCompiler tcEnvAtEnd.AccessRights, tcAssemblyExprOpt, Array.ofList tcDependencyFiles, - options) + Some options) let results = FSharpCheckProjectResults( diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 1c7878c6df8..ab561ab6d18 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -348,7 +348,7 @@ type internal TypeCheckInfo tcAccessRights: AccessorDomain, projectFileName: string, mainInputFileName: string, - projectOptions: FSharpProjectOptions, + projectOptions: FSharpProjectOptions option, sResolutions: TcResolutions, sSymbolUses: TcSymbolUses, sFallback: NameResolutionEnv, @@ -3289,7 +3289,7 @@ module internal ParseAndCheckFile = tcEnvAtEnd.AccessRights, projectFileName, mainInputFileName, - projectOptions, + Some projectOptions, sink.GetResolutions(), sink.GetSymbolUses(), tcEnvAtEnd.NameEnv, @@ -3302,9 +3302,11 @@ module internal ParseAndCheckFile = } [] -type FSharpProjectContext(thisCcu: CcuThunk, assemblies: FSharpAssembly list, ad: AccessorDomain, projectOptions: FSharpProjectOptions) = +type FSharpProjectContext + (thisCcu: CcuThunk, assemblies: FSharpAssembly list, ad: AccessorDomain, projectOptions: FSharpProjectOptions option) = - member _.ProjectOptions = projectOptions + member _.ProjectOptions = + projectOptions |> Option.defaultWith (fun () -> failwith "not available") member _.GetReferencedAssemblies() = assemblies @@ -3713,7 +3715,7 @@ type FSharpCheckProjectResults AccessorDomain * CheckedImplFile list option * string[] * - FSharpProjectOptions) option + FSharpProjectOptions option) option ) = let getDetails () = @@ -4009,7 +4011,7 @@ type FsiInteractiveChecker(legacyReferenceResolver, tcConfig: TcConfig, tcGlobal tcState.TcEnvFromImpls.AccessRights, None, dependencyFiles, - projectOptions) + Some projectOptions) let projectResults = FSharpCheckProjectResults(fileName, Some tcConfig, keepAssemblyContents, errors, Some details) diff --git a/src/Compiler/Service/FSharpCheckerResults.fsi b/src/Compiler/Service/FSharpCheckerResults.fsi index 6b0a7f49135..607232f3c92 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fsi +++ b/src/Compiler/Service/FSharpCheckerResults.fsi @@ -454,7 +454,7 @@ type public FSharpCheckFileResults = tcGlobals: TcGlobals * isIncompleteTypeCheckEnvironment: bool * builder: IncrementalBuilder option * - projectOptions: FSharpProjectOptions * + projectOptions: FSharpProjectOptions option * dependencyFiles: string[] * creationErrors: FSharpDiagnostic[] * parseErrors: FSharpDiagnostic[] * @@ -554,7 +554,7 @@ type public FSharpCheckProjectResults = AccessorDomain * CheckedImplFile list option * string[] * - FSharpProjectOptions) option -> + FSharpProjectOptions option) option -> FSharpCheckProjectResults module internal ParseAndCheckFile = diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index bc15b6c3b67..db91fea3ea3 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -1695,7 +1695,7 @@ type internal TransparentCompiler bootstrapInfo.TcGlobals, projectSnapshot.IsIncompleteTypeCheckEnvironment, None, - projectSnapshot.ToOptions(), + None, Array.ofList tcInfo.tcDependencyFiles, creationDiags, parseResults.Diagnostics, @@ -1962,7 +1962,7 @@ type internal TransparentCompiler tcEnvAtEnd.AccessRights, Some checkedImplFiles, Array.ofList tcDependencyFiles, - projectSnapshot.ToOptions()) + None) let results = FSharpCheckProjectResults(