FSharpCompilerPath Override for Version-Pinned Upgrade Testing
0 reputation · 18 Jan 2026, 23:48 UTC
0 reputation · 18 Jan 2026, 23:48 UTC
This question examines the extent to which the FSharpCompilerPath override in an .fsharpproj file can isolate compiler-version-specific breakage during upgrade testing. The documented feature allows project maintainers to pin a known-good F# compiler version, thereby preserving incremental build state when transitioning between compiler releases. The goal is to determine whether this configuration alone prevents build failure when incremental state, type providers, and session persistence from F# Interactive interact with the overridden path.
A remaining uncertainty involves how paket.dependencies resolution and the F# 6.0 inline function semantics shift, which diverge from 5.x behavior, interact with the pinned compiler path. Specifically, it is unclear whether package version conflicts discovered during restore will automatically revert, or whether the override fully shields the incremental build pipeline from API-level breakage introduced by the newer compiler.
Does the FSharpCompilerPath override prevent incremental build failure when compiler API changes invalidate existing type providers? Should F# package restore automatically revert NuGet package versions when paket.dependencies conflicts surface after a compiler upgrade? How does the F# Interactive #load recovery pattern interact with a pinned compiler path during session restart after an upgrade failure?
The FSharpCompilerPath override alone does not prevent incremental build failure when compiler API changes invalidate existing type providers. Incremental caches and type provider metadata are stamped with the compiler version that generated them; overriding the path selects which compiler binary is invoked but does not automatically invalidate version-mismatched artifacts. Similarly, paket.dependencies resolution does not automatically revert NuGet package versions when a compiler override is in place, and F# Interactive session restoration via #load can fail if loaded scripts or type providers were compiled against a different compiler version than the pinned path.
dotnet clean or manually remove obj/ and bin/ directories under the project path to discard version-stamped artifacts.fsi --version before and after setting FSharpCompilerPath in the .fsharpproj to confirm the override is recognized by the runtime.dotnet build (or the project-specific build command) and observe whether type provider errors reappear.paket resolve --refresh to force re-evaluation of NuGet version constraints, or adjust paket.dependencies constraints if newer versions are fetched.#load only after ensuring all referenced type provider assemblies are rebuilt against the pinned compiler version.To determine whether a full cache invalidation or a paket refresh is the appropriate next step, please share the specific type provider or assembly error message observed when rebuilding with the overridden FSharpCompilerPath. This detail would change the recommended remediation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.