diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index bbae4ecb698..6e0c412215d 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,12 +1,12 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
{
"name": "F#",
- "image": "mcr.microsoft.com/dotnet/sdk:9.0.100",
+ "image": "mcr.microsoft.com/dotnet/sdk:9.0.102",
"features": {
- "ghcr.io/devcontainers/features/common-utils:2.5.1": {},
+ "ghcr.io/devcontainers/features/common-utils:2.5.2": {},
"ghcr.io/devcontainers/features/git:1.3.2": {},
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
- "ghcr.io/devcontainers/features/dotnet:2.1.3": {}
+ "ghcr.io/devcontainers/features/dotnet:2.2.0": {}
},
"hostRequirements": {
"cpus": 2,
diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md
index 157b1af93cc..52b92207001 100644
--- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md
+++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md
@@ -7,6 +7,8 @@
* Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241))
### Changed
+
+* FSharpCheckFileResults.ProjectContext.ProjectOptions will not be available when using the experimental Transparent Compiler feature. ([PR #18205](https://github.com/dotnet/fsharp/pull/18205))
* Update `Obsolete` attribute checking to account for `DiagnosticId` and `UrlFormat` properties. ([PR #18224](https://github.com/dotnet/fsharp/pull/18224))
### Breaking Changes
diff --git a/eng/Versions.props b/eng/Versions.props
index 59f0f6e7cb9..3b36ad6a716 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -37,7 +37,7 @@
$(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion)
- 9.0.100
+ 9.0.101
$(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).*
diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs
index 63d147d005b..8f119f2fd60 100644
--- a/src/Compiler/Service/BackgroundCompiler.fs
+++ b/src/Compiler/Service/BackgroundCompiler.fs
@@ -1066,7 +1066,7 @@ type internal BackgroundCompiler
tcProj.TcGlobals,
options.IsIncompleteTypeCheckEnvironment,
Some builder,
- options,
+ Some options,
Array.ofList tcDependencyFiles,
creationDiags,
parseResults.Diagnostics,
@@ -1248,7 +1248,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..0d6e83a61c2 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,14 @@ 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
+ // TODO: Once API around Transparent Compiler is stabilized we should probably remove this.
+ member _.ProjectOptions =
+ projectOptions
+ |> Option.defaultWith (fun () ->
+ failwith "ProjectOptions are not available. This is expected when using FSharpChecker with useTransparentCompiler=true.")
member _.GetReferencedAssemblies() = assemblies
@@ -3713,7 +3718,7 @@ type FSharpCheckProjectResults
AccessorDomain *
CheckedImplFile list option *
string[] *
- FSharpProjectOptions) option
+ FSharpProjectOptions option) option
) =
let getDetails () =
@@ -4009,7 +4014,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 f25b75fe99d..9f35b4f2835 100644
--- a/src/Compiler/Service/TransparentCompiler.fs
+++ b/src/Compiler/Service/TransparentCompiler.fs
@@ -1696,7 +1696,7 @@ type internal TransparentCompiler
bootstrapInfo.TcGlobals,
projectSnapshot.IsIncompleteTypeCheckEnvironment,
None,
- projectSnapshot.ToOptions(),
+ None,
Array.ofList tcInfo.tcDependencyFiles,
creationDiags,
parseResults.Diagnostics,
@@ -1963,7 +1963,7 @@ type internal TransparentCompiler
tcEnvAtEnd.AccessRights,
Some checkedImplFiles,
Array.ofList tcDependencyFiles,
- projectSnapshot.ToOptions())
+ None)
let results =
FSharpCheckProjectResults(