Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
F# Hot Reload (Edit-and-Continue) Implementation
This PR introduces hot reload infrastructure for F# on top of .NET's
MetadataUpdater.ApplyUpdatepipeline, with Roslyn-parity-oriented metadata behavior and multi-generation delta chaining.Status Snapshot (2026-02-07)
NatElkins/fsharp#1hot-reload@c454aebVerified in this branch
./.dotnet/dotnet build FSharp.sln -c Debug -v minimal✅./.dotnet/dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -c Debug --no-build --filter FullyQualifiedName~HotReload -v minimal✅ (258passed)./.dotnet/dotnet test tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj -c Debug --no-build --filter FullyQualifiedName~HotReload -v minimal✅ (101passed)What This PR Adds
FSharpChecker:StartHotReloadSessionEmitHotReloadDeltaEndHotReloadSessionHotReloadSessionActiveHotReloadCapabilitiesFSharpEmitBaseline) and generation chaining (EncId/EncBaseId) across multiple edits.tests/projects/HotReloadDemo/HotReloadDemoApp) and smoke script (tests/scripts/hot-reload-demo-smoke.sh).Recent Architecture/Parity Direction (late 2025)
BinaryConstants/delta token helpers)c454aeb).Supported vs Unsupported (Current)
Supported
Still rejected / rebuild required
UnsupportedEdit/rude edits).Runtime Apply Capability Model
RuntimeApplyis only advertised when the runtime supports it andFSHARP_HOTRELOAD_ENABLE_RUNTIME_APPLY=1is set.HOTRELOAD_SMOKE_RUNTIME_APPLY=1Remaining Follow-ups (Not Claimed Done Here)
dotnet watchintegration path.Key Files
src/Compiler/Service/service.fs,src/Compiler/HotReload/EditAndContinueLanguageService.fssrc/Compiler/CodeGen/IlxDeltaEmitter.fs,src/Compiler/CodeGen/FSharpDeltaMetadataWriter.fs,src/Compiler/CodeGen/DeltaMetadataSerializer.fssrc/Compiler/CodeGen/HotReloadBaseline.fs,src/Compiler/HotReload/HotReloadCapabilities.fstests/FSharp.Compiler.Service.Tests/HotReload/*tests/FSharp.Compiler.ComponentTests/HotReload/*