Conversation
This reverts commit 17a04f0ecc06a2e0be7c1cfee6e14c6faa7f1d70.
|
Very nice stuff @NatElkins ! That will relief the review burden when it comes to product safety, and we can then more focus on HR itself in next phases of the review 👍 . Hot reload should be a plugin, not woven into the compiler
Normal compilation must produce upstream-identical output
Session scoping
Low-level observations
|
|
Continuation of my review, now focused on the hot reload implementation itself (code, robustness, tests) in lower detail. This is more of an "closer to production" review - feel free to dismiss for now. My viewing angles:
Architecture
Robustness — coupling to compiler evolution
Separation
Duplication
Test coverage
|
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/*