Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
f6cad50
Add Roslyn-format EnC CustomDebugInformation codec and portable PDB m…
NatElkins Jul 1, 2026
0d02145
Use ProcessStartInfo.Arguments for net472 compatibility
NatElkins Jul 1, 2026
66a1412
Make the EnC CDI test module public for xunit v3 discovery
NatElkins Jul 2, 2026
c8639f3
Extract stable synthesized-name replay layer
NatElkins Jul 2, 2026
d6319c1
Add ECMA-335 EnC metadata delta writer
NatElkins Jul 1, 2026
b0a487f
Add typed-tree diff slice for hot reload
NatElkins Jul 2, 2026
d505ab9
Fix generated-name scope test in stable names slice
NatElkins Jul 8, 2026
7aaacc5
Fix EnC CDI cross-validation test process launch on Desktop and bare …
NatElkins Jul 3, 2026
c78b2f6
Remove extra EOF blank line in delta metadata tests
NatElkins Jul 8, 2026
2facaf2
Merge branch 'refresh/20260717/hotreload-typedtree-diff' into refresh…
NatElkins Jul 17, 2026
cd1339b
Merge branch 'refresh/20260717/hotreload-stable-names' into refresh/2…
NatElkins Jul 17, 2026
ba5bce9
Merge branch 'refresh/20260717/enc-metadata-delta-writer' into refres…
NatElkins Jul 17, 2026
c23986b
Add hot reload baseline reader state
NatElkins Jul 3, 2026
ac6a1ba
Extract hot reload delta emitter
NatElkins Jul 3, 2026
11e8fa0
Fix synthesized-name snapshot assertions to use the array equality ov…
NatElkins Jul 3, 2026
b228654
Align the signature-change diff test with the evolved differ classifi…
NatElkins Jul 3, 2026
3e1678d
Validate hot reload baseline metadata inputs
NatElkins Jul 17, 2026
5fdf705
Enforce cumulative metadata delta invariants
NatElkins Jul 17, 2026
c584660
Validate hot reload generated names before classification
NatElkins Jul 17, 2026
9a9211e
Validate hot reload baseline metadata inputs
NatElkins Jul 17, 2026
be6df7b
Preserve reviewed lower-slice invariants in delta emitter
NatElkins Jul 17, 2026
8932904
Unify delta emission on the shared metadata writer
NatElkins Jul 17, 2026
d40f0bc
Fail closed on unresolved accessor metadata
NatElkins Jul 17, 2026
11b50cc
Extract hot reload session slice
NatElkins Jul 3, 2026
36ef5ba
Fix CI compile breaks and extraction debris in the session slice tests
NatElkins Jul 3, 2026
330761c
Fix net472 and CI-image portability breaks in session slice tests
NatElkins Jul 3, 2026
a886637
Drop the netcore-only Contains overload from delta builder tests
NatElkins Jul 3, 2026
9bb2547
Gate the Roslyn baseline comparison tests to .NET Core
NatElkins Jul 3, 2026
6420b62
Normalize fixture line endings before update-source splicing
NatElkins Jul 3, 2026
c67ec56
Update ilxgen name-path architecture guard
NatElkins Jul 8, 2026
a4b8616
Remove duplicate delta metadata test copies
NatElkins Jul 8, 2026
4a1efa4
Remove duplicate compiler global reset member
NatElkins Jul 8, 2026
7216294
Remove duplicate compiler global reset signature
NatElkins Jul 8, 2026
2b461a8
Repair session slice after metadata writer consolidation
NatElkins Jul 17, 2026
9bf2891
Make hot reload session updates transactional
NatElkins Jul 17, 2026
9112dab
Report hot reload update capabilities
NatElkins Jul 17, 2026
21dbd06
Report hot reload update capabilities
NatElkins Jul 17, 2026
b26df0f
Expose required hot reload capabilities
NatElkins Jul 17, 2026
490f458
Document F# hot reload rude-edit diagnostics
NatElkins Jul 17, 2026
16b0de1
Format delta metadata writer sources
NatElkins Jul 17, 2026
a402010
Format delta metadata writer sources
NatElkins Jul 17, 2026
24f4879
Format hot reload compiler sources
NatElkins Jul 17, 2026
34950ea
Format hot reload compiler sources
NatElkins Jul 17, 2026
733a531
Format hot reload compiler sources
NatElkins Jul 17, 2026
1248503
Format hot reload emitter sources
NatElkins Jul 17, 2026
254b36c
Format hot reload session sources
NatElkins Jul 17, 2026
4768d1b
Retry CI after Linux runner memory exhaustion
NatElkins Jul 18, 2026
bdb1d28
Add typed-tree diff slice for hot reload
NatElkins Jul 2, 2026
1a5c97e
Make typed-tree diff classification fail closed
NatElkins Jul 17, 2026
f7dd5dd
Format hot reload compiler sources
NatElkins Jul 17, 2026
c2d4c86
Add ECMA-335 EnC metadata delta writer
NatElkins Jul 1, 2026
83696d2
Remove extra EOF blank line in delta metadata tests
NatElkins Jul 8, 2026
6cc71de
Enforce cumulative metadata delta invariants
NatElkins Jul 17, 2026
7e2770f
Format delta metadata writer sources
NatElkins Jul 17, 2026
078961d
Retry CI after regression job timeout
NatElkins Jul 18, 2026
33fceef
Share delta user string encoding and trace configuration
NatElkins Jul 22, 2026
0e55c15
Harden hot reload session capture and file handling
NatElkins Jul 22, 2026
ad6c411
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 22, 2026
e981e30
Handle metadata-only methods in PDB ambiguity checks
NatElkins Jul 22, 2026
1f7a82b
Share delta user string encoding and trace configuration
NatElkins Jul 22, 2026
06378d5
Make synthesized name snapshots deterministic
NatElkins Jul 22, 2026
6129dda
Harden typed-tree diff classification
NatElkins Jul 22, 2026
4ad2364
Harden baseline metadata parsing
NatElkins Jul 22, 2026
88c0c62
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 22, 2026
9dad496
Handle metadata-only methods in PDB ambiguity checks
NatElkins Jul 22, 2026
e7531a7
Make synthesized name snapshots deterministic
NatElkins Jul 22, 2026
eaaf64e
Harden typed-tree diff classification
NatElkins Jul 22, 2026
2491370
Harden baseline metadata parsing
NatElkins Jul 22, 2026
ac42fbf
Harden delta metadata identity and cleanup
NatElkins Jul 22, 2026
2aefa5f
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 22, 2026
17f464f
Handle metadata-only methods in PDB ambiguity checks
NatElkins Jul 22, 2026
25eca5c
Share delta user string encoding and trace configuration
NatElkins Jul 22, 2026
98aeadb
Make synthesized name snapshots deterministic
NatElkins Jul 22, 2026
e84c143
Harden typed-tree diff classification
NatElkins Jul 22, 2026
2a827b0
Harden baseline metadata parsing
NatElkins Jul 22, 2026
01d19b1
Harden delta metadata identity and cleanup
NatElkins Jul 22, 2026
118edc8
Ignore transient provider scopes in body identity
NatElkins Jul 22, 2026
eb661b3
Ignore transient provider scopes in body identity
NatElkins Jul 22, 2026
e3e089d
Bound decision-tree identity traversal
NatElkins Jul 23, 2026
7ffe458
Bound baseline string heap reads
NatElkins Jul 23, 2026
42d29eb
Bound decision-tree identity traversal
NatElkins Jul 23, 2026
0b44ec4
Fail closed on closure-name recapture mismatch
NatElkins Jul 23, 2026
7b00822
Bound baseline string heap reads
NatElkins Jul 23, 2026
ec0f30b
Bound decision-tree identity traversal
NatElkins Jul 23, 2026
f2d7c1e
Bound baseline string heap reads
NatElkins Jul 23, 2026
a052db3
Format bounded string heap reader
NatElkins Jul 23, 2026
474bbef
Format bounded string heap reader
NatElkins Jul 23, 2026
9f6a761
Make closure recapture test deterministic
NatElkins Jul 23, 2026
e5d6392
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 23, 2026
54cd67d
Merge branch 'main' into enc-metadata-delta-writer
T-Gro Jul 24, 2026
62df5dc
Merge branch 'main' into hotreload-typedtree-diff
T-Gro Jul 24, 2026
8d28083
Merge remote-tracking branch 'origin/main' into refresh/20260717/enc-…
NatElkins Jul 24, 2026
b492d58
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 24, 2026
ead308d
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 24, 2026
7622b7e
Merge remote-tracking branch 'origin/main' into refresh/20260717/hotr…
NatElkins Jul 24, 2026
c83b6ab
Complete hot reload merge integration
NatElkins Jul 24, 2026
6c7a61b
Fix compiled baseline metadata table parsing
NatElkins Jul 24, 2026
4386ab1
Update delta metadata test writer options
NatElkins Jul 24, 2026
e0a38af
Complete baseline reader merge integration
NatElkins Jul 24, 2026
e1d6a50
Merge branch 'refresh/20260717/enc-metadata-delta-writer' into refres…
NatElkins Jul 24, 2026
3ce3b14
Merge branch 'refresh/20260717/hotreload-typedtree-diff' into refresh…
NatElkins Jul 24, 2026
b994397
Merge branch 'refresh/20260717/hotreload-baseline-reader' into refres…
NatElkins Jul 24, 2026
cf0202c
Merge branch 'refresh/20260717/hotreload-delta-emitter' into refresh/…
NatElkins Jul 24, 2026
469a3b2
Complete session merge integration
NatElkins Jul 24, 2026
5b12365
Deduplicate merged compiler source entries
NatElkins Jul 24, 2026
4c0bba2
Merge branch 'refresh/20260717/hotreload-delta-emitter' into refresh/…
NatElkins Jul 24, 2026
000171d
Remove obsolete baseline reader copy
NatElkins Jul 24, 2026
e9b19d1
Merge branch 'refresh/20260717/hotreload-delta-emitter' into refresh/…
NatElkins Jul 24, 2026
a34afbc
Renumber hot reload driver diagnostics
NatElkins Jul 24, 2026
0ad1dce
Place baseline reader release note in current FCS notes
NatElkins Jul 24, 2026
47e92ee
Merge refreshed baseline reader release note
NatElkins Jul 24, 2026
5bdb691
Deduplicate composite release notes
NatElkins Jul 24, 2026
88053ca
Merge refreshed delta emitter release notes
NatElkins Jul 24, 2026
1511b10
Give session slice a single current release note
NatElkins Jul 24, 2026
238ebb6
Keep hot reload diagnostics sorted
NatElkins Jul 24, 2026
06e0ad8
Merge current main
NatElkins Jul 24, 2026
e56776f
Merge current main
NatElkins Jul 24, 2026
6218916
Merge current main
NatElkins Jul 24, 2026
2ec1bd2
Merge refreshed enc-metadata-delta-writer
NatElkins Jul 24, 2026
5f359e8
Merge refreshed hotreload-typedtree-diff
NatElkins Jul 24, 2026
b2642b8
Merge refreshed hotreload-baseline-reader
NatElkins Jul 24, 2026
ea8c3d3
Merge refreshed delta emitter
NatElkins Jul 24, 2026
f9be8ba
Merge remote-tracking branch 'origin/main' into merge/20260806/hotrel…
NatElkins Aug 6, 2026
c156e15
Merge remote-tracking branch 'origin/main' into merge/20260806/hotrel…
NatElkins Aug 6, 2026
169c41c
Merge branch 'merge/20260806/hotreload-baseline-reader' into merge/20…
NatElkins Aug 6, 2026
ea862ec
Merge branch 'merge/20260806/hotreload-typedtree-diff' into merge/202…
NatElkins Aug 6, 2026
ed3decb
Remove duplicated delta metadata compile entries after main merge
NatElkins Aug 6, 2026
aad5b56
Drop null match on Path.ChangeExtension result for new nullness rules
NatElkins Aug 6, 2026
b78ffd6
Use Async.RunSynchronouslyImmediate after test helper removal
NatElkins Aug 6, 2026
d04bd1a
Merge branch 'merge/20260806/hotreload-typedtree-diff' into merge/202…
NatElkins Aug 6, 2026
a259542
Merge branch 'merge/20260806/hotreload-delta-emitter' into merge/2026…
NatElkins Aug 6, 2026
2b16c6c
Use Async.RunSynchronouslyImmediate after test helper removal
NatElkins Aug 6, 2026
f222ff4
Drop null handling on Path.ChangeExtension results for new nullness r…
NatElkins Aug 6, 2026
b603728
Merge remote-tracking branch 'origin/main' into merge/20260806/hotrel…
NatElkins Aug 14, 2026
76b28e8
Merge remote-tracking branch 'origin/main' into merge/20260806/hotrel…
NatElkins Aug 14, 2026
34fc19a
Merge branch 'merge/20260806/hotreload-typedtree-diff' into merge/202…
NatElkins Aug 14, 2026
5654049
Remove baseline reader entries duplicated by the merged baseline slice
NatElkins Aug 14, 2026
98001b2
Merge branch 'merge/20260806/hotreload-delta-emitter' into merge/2026…
NatElkins Aug 14, 2026
af22915
Merge current compiler changes into the hot reload session
NatElkins Sep 25, 2026
f5490d5
Merge current main into the typed-tree diff slice
NatElkins Sep 25, 2026
de2069f
Merge current main into the delta emitter slice
NatElkins Sep 25, 2026
3e6f5d8
Use the public calling convention properties
NatElkins Sep 25, 2026
149da1c
Use the public calling convention properties
NatElkins Sep 25, 2026
e6582e4
Keep independent hot reload baselines for long output options
NatElkins Sep 25, 2026
9b49030
Detect hot reload metadata edits without body bindings
NatElkins Sep 25, 2026
7e69254
Merge the refreshed typed-tree diff and preserve capability classific…
NatElkins Sep 25, 2026
bd33519
Allocate resumption metadata only for hot reload capture
NatElkins Sep 25, 2026
22abc46
Assert resolved output identifiers for independent hot reload sessions
NatElkins Sep 25, 2026
6dd9edd
Keep intrinsic parameter identities stable across compilations
NatElkins Sep 25, 2026
450a42a
Preserve original metadata identities in disk hot reload sessions
NatElkins Sep 25, 2026
740046e
Use the repository SDK for metadata validation fixtures
NatElkins Sep 25, 2026
30cf2f7
Merge refreshed delta emitter dependencies into hot reload sessions
NatElkins Sep 25, 2026
b66ae91
Adapt inherited typed tree regressions to the session test module
NatElkins Sep 25, 2026
79e39a7
Validate emitted deltas and preserve native pointer identities
NatElkins Sep 25, 2026
caa5bb9
Distinguish the inherited ParamArray regression name
NatElkins Sep 25, 2026
675092f
Track emitted extension receiver metadata
NatElkins Sep 25, 2026
4c605c7
Isolate disk-start fixtures from previous capture sessions
NatElkins Sep 25, 2026
125e0c9
Match extension method metadata to emitted signatures
NatElkins Sep 25, 2026
bd97f70
Merge refreshed typed-tree receiver metadata detection
NatElkins Sep 25, 2026
feaecf0
Merge validated metadata and extension receiver fixes
NatElkins Sep 25, 2026
ac66be4
Verify extension receiver parameter updates through runtime apply
NatElkins Sep 25, 2026
38a64c0
Report metadata validator failures instead of skipping them
NatElkins Sep 25, 2026
b244ee3
Set explicit capabilities in inherited parameter rename regressions
NatElkins Sep 25, 2026
b4c1b83
Reject runtime async implementation transitions during hot reload
NatElkins Sep 25, 2026
ec1c2a4
Merge final emitter validation and runtime async safeguards
NatElkins Sep 25, 2026
57e2fea
Clarify the runtime async restart requirement
NatElkins Sep 25, 2026
507232d
Merge final runtime async documentation
NatElkins Sep 25, 2026
7234a30
Merge main and isolate hot reload captures by output
NatElkins Oct 27, 2026
caa6c48
Keep tracked input probes inside hot reload sessions
NatElkins Oct 27, 2026
4ddbd37
Match Roslyn parameter associations in hot reload deltas
NatElkins Oct 27, 2026
61bf359
Address historical hot reload review feedback
NatElkins Oct 27, 2026
a49dcb4
Separate declaration matching and added-definition row preparation
NatElkins Oct 27, 2026
aaa9563
Avoid redundant snapshots when committing hot reload sessions
NatElkins Oct 29, 2026
db76b9a
Allocate local value identities only when needed
NatElkins Oct 29, 2026
d37f267
Remove redundant canonical path length check
NatElkins Oct 29, 2026
debd77c
Check module storage before comparing initializer bodies
NatElkins Oct 29, 2026
7af9eec
Compare sequence points without a temporary pair list
NatElkins Oct 29, 2026
178a8a3
Find line-shift bounds without projected lists
NatElkins Oct 29, 2026
38e0b59
Skip alias snapshots for recorded synthesized names
NatElkins Oct 29, 2026
7dc5867
Deduplicate method updates without a reversed list
NatElkins Oct 29, 2026
96ea5de
Use immutable capability sets with stable diagnostic order
NatElkins Oct 30, 2026
ba7a61d
Reuse exact-value environment switch checks
NatElkins Oct 30, 2026
5fa4385
Format rude edit diagnostics without intermediate strings
NatElkins Oct 30, 2026
c74868c
Collect tracked inputs in one ordered pass
NatElkins Oct 30, 2026
e0aa055
Use value options for hot reload symbol lookups
NatElkins Oct 30, 2026
1f1463b
Reduce closure naming and resumption point allocations
NatElkins Oct 30, 2026
ba67dd8
Name internal checked project implementation fields
NatElkins Oct 30, 2026
baf0a24
Avoid temporary collections in hot reload preparation
NatElkins Oct 30, 2026
17441af
Preserve cancellation through hot reload error recovery
NatElkins Oct 30, 2026
df69c82
Observe cancellation while awaiting stable hot reload output
NatElkins Oct 30, 2026
6d39e9f
Skip metadata snapshots for ordinary in-memory emission
NatElkins Oct 30, 2026
e5aaec2
Assert actual PDB delta documents and heap contents
NatElkins Oct 30, 2026
3f381a3
Dispose each portable PDB content hash provider
NatElkins Oct 30, 2026
b285d73
Preserve cancellation in hot reload metadata fallbacks
NatElkins Oct 30, 2026
c121fdd
Keep the in-memory writer result private
NatElkins Oct 30, 2026
fb4793e
Apply scoped F# conventions to hot reload helpers
NatElkins Oct 30, 2026
b457bc3
Skip hot reload context lookup without registered projects
NatElkins Oct 30, 2026
0b9add5
Avoid optional allocation during closure name overrides
NatElkins Oct 30, 2026
fa79c59
Remove redundant rude-edit severity helper
NatElkins Oct 30, 2026
2e2fad2
Clarify closure identity and state-machine comments
NatElkins Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/hot-reload-rude-edits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# F# hot reload rude-edit diagnostics

F# hot reload reports an `FSHRDL` diagnostic when an edit cannot be applied safely to the running process. The application is rebuilt and restarted instead of applying a delta that could leave it in an invalid state.

The diagnostic message identifies the affected declaration and the reason for the restart. These codes are owned by the F# compiler and are separate from Roslyn's `ENC` diagnostic namespace.

| Code | Meaning | What to do |
| --- | --- | --- |
| `FSHRDL001` | A member signature changed. | Undo the signature change to apply in place, or allow the rebuild and restart. |
| `FSHRDL002` | An `inline` annotation changed. | Allow the rebuild and restart. |
| `FSHRDL003` | A type representation or layout changed. | Allow the rebuild and restart. |
| `FSHRDL004` | A declaration was added in a shape the runtime cannot add. | Allow the rebuild and restart. |
| `FSHRDL005` | A declaration was removed. | Allow the rebuild and restart. |
| `FSHRDL006` | A virtual, abstract, or override member was added. | Allow the rebuild and restart. |
| `FSHRDL007` | A constructor was added. | Allow the rebuild and restart. |
| `FSHRDL008` | A user-defined operator was added. | Allow the rebuild and restart. |
| `FSHRDL009` | An explicit interface implementation was added. | Allow the rebuild and restart. |
| `FSHRDL010` | A member was added to an interface. | Allow the rebuild and restart. |
| `FSHRDL011` | A field was added in a shape the runtime cannot add. | Allow the rebuild and restart. |
| `FSHRDL012` | A lambda's lowered shape changed incompatibly. | Allow the rebuild and restart. |
| `FSHRDL013` | A state machine's resumable or hoisted layout changed incompatibly. | Keep the existing resume-point and captured-value layout, or allow the rebuild and restart. |
| `FSHRDL014` | A query expression's lowered shape changed incompatibly. | Allow the rebuild and restart. |
| `FSHRDL015` | A synthesized compiler declaration changed incompatibly. | Allow the rebuild and restart. |
| `FSHRDL016` | The runtime did not advertise a capability required by the edit. | Update the runtime if a newer version supports the capability, or allow the rebuild and restart. |
| `FSHRDL099` | The edit is unsupported for another fail-closed reason. | Follow the detailed message and allow the rebuild and restart. |

These diagnostics are intentionally fail closed. If the compiler cannot prove that an edit is safe, it requests a restart and leaves the running application unchanged.
26 changes: 26 additions & 0 deletions docs/hot-reload-runtime-async.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Runtime async edits

Hot reload rejects changes to the runtime-async implementation flag on an existing method. Such an edit requires an application restart.

The method signature alone does not identify this change. Both implementations return `Task<int>` in metadata, but their IL return conventions differ. Normal IL returns a task. Runtime-async IL returns its integer result and requires the `0x2000` implementation flag.

The delta writer preserves implementation flags from the baseline. It compares the async bit before it emits an updated method row. A mismatch raises `HotReloadUnsupportedEditException` instead of an invalid delta.

## Reference contract

The comparison uses Roslyn commit `eb789e2741f6f22d9e283e2049dc1378871323e0`, inspected on September 25, 2026.

- `MetadataWriter.PopulateMethodTableRows` writes the current method implementation flags.
- `AbstractEditAndContinueAnalyzer` rejects changes to the non-custom `MethodImplAttribute`.
- [Roslyn issue #77954](https://github.com/dotnet/roslyn/issues/77954) remains open for runtime-async edit support.
- The [runtime specification](https://github.com/dotnet/runtime/blob/25bd04c79542dfaaab5c5cd42670bcfc20b7d57a/docs/design/specs/runtime-async.md) defines the distinct return conventions.

The F# rejection is a temporary limit. It does not claim complete parity with future runtime-async edit support in Roslyn.

## Verification

Six regressions cover both transition directions, methods added by an earlier delta, unchanged flags, and runtime application. The .NET 11 run passed all 39 hot reload component tests with no skips. The runtime test called the same method before and after `MetadataUpdater.ApplyUpdate`. Its task result changed from 42 to 43.

A full `mdv` review covered the baseline and the unchanged-flag delta. Both method rows retained `0x2000`. The delta reused the baseline signature and emitted only the module and method update entries in `EncLog` and `EncMap`.

Metadata tests do not require runtime-async execution support. The execution test requires CoreCLR, the runtime's `Async` implementation flag, and enabled metadata updates.
5 changes: 5 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.200.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Added

* Add the experimental `FSharpChecker.CreateHotReloadSession` API with per-project baselines, capability checks, and commit or discard operations. Distinct `--out:` paths retain independent baselines. Requests preserve cancellation through file waits and metadata recovery. ([Issue #11636](https://github.com/dotnet/fsharp/issues/11636), [PR #20030](https://github.com/dotnet/fsharp/pull/20030))
* Added internal F# hot reload delta emitter and symbol matcher infrastructure with direct emitter test coverage. ([PR #20027](https://github.com/dotnet/fsharp/pull/20027))

* Add an internal typed-tree diff utility for future F# hot reload edit classification. It is not called by normal compilation. ([PR #20025](https://github.com/dotnet/fsharp/pull/20025))

* Add a read-only repository review agent for performance-improvement PRs to assess measurement quality, behavior preservation, and implementation risk using source-attributed review precedents. ([PR #20619](https://github.com/dotnet/fsharp/pull/20619))
* Completion: respect EditorBrowsableAttribute ([PR #20729](https://github.com/dotnet/fsharp/pull/20729))
* Runtime-async sequences allow awaits inside `try/with` bodies, filters and handlers, and reject overlapping `MoveNextAsync` calls. ([PR #20655](https://github.com/dotnet/fsharp/pull/20655))
Expand Down
3 changes: 2 additions & 1 deletion src/Compiler/AbstractIL/DeltaIndexSizing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ module internal FSharp.Compiler.AbstractIL.DeltaIndexSizing

open FSharp.Compiler.AbstractIL.BinaryConstants
open FSharp.Compiler.AbstractIL.ILDeltaHandles
open FSharp.Compiler.AbstractIL.ILMetadataHeaps
open FSharp.Compiler.AbstractIL.DeltaMetadataEncoding

type MetadataHeapSizes = FSharp.Compiler.AbstractIL.ILBinaryWriter.MetadataHeapSizes

/// Holds computed "bigness" flags for all coded index types.
/// When true, the index requires 4 bytes; when false, 2 bytes suffice.
type CodedIndexSizes =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/AbstractIL/DeltaMetadataSerializer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open System
open System.Collections.Generic
open System.IO
open System.Text
open FSharp.Compiler.AbstractIL.ILMetadataHeaps
open FSharp.Compiler.AbstractIL.ILBinaryWriter
open FSharp.Compiler.AbstractIL.BinaryConstants
open FSharp.Compiler.AbstractIL.ILDeltaHandles
open FSharp.Compiler.AbstractIL.DeltaMetadataTables
Expand Down
12 changes: 5 additions & 7 deletions src/Compiler/AbstractIL/DeltaMetadataTables.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module internal FSharp.Compiler.AbstractIL.DeltaMetadataTables

open FSharp.Compiler.EnvironmentHelpers
open System
open System.Collections.Generic
open System.IO
Expand All @@ -15,11 +16,7 @@ open FSharp.Compiler.AbstractIL.DeltaMetadataTypes
module Encoding = FSharp.Compiler.AbstractIL.DeltaMetadataEncoding

let traceHeapOffsets =
lazy
(match Environment.GetEnvironmentVariable("FSHARP_HOTRELOAD_TRACE_HEAP_OFFSETS") with
| null
| "" -> false
| value -> value = "1" || String.Equals(value, "true", StringComparison.OrdinalIgnoreCase))
lazy (isEnvVarTruthy EnvironmentVariableNames.HotReloadTraceHeapOffsets)

/// Mirrors the AbstractIL metadata tables for the subset of rows emitted by
/// hot reload deltas. The tables are populated alongside the SRM metadata
Expand Down Expand Up @@ -494,7 +491,7 @@ type DeltaMetadataTables(?heapOffsets: MetadataHeapOffsets) =
else
invalidArg "entry" "GUID entries must be 16 bytes."

if Environment.GetEnvironmentVariable("FSHARP_HOTRELOAD_TRACE_METADATA") = "1" then
if isEnvVarSetToOne EnvironmentVariableNames.HotReloadTraceMetadata then
let dumpGuid (bytes: byte[]) =
if bytes.Length >= 16 then
BitConverter.ToString(bytes, 0, 16)
Expand Down Expand Up @@ -645,7 +642,8 @@ type DeltaMetadataTables(?heapOffsets: MetadataHeapOffsets) =
rowElementUShort (uint16 row.Attributes)
stringElement nameToken
blobElement signatureToken
rowElementSimpleIndex TableNames.Param (row.FirstParameterRowId |> Option.defaultValue 0)
// Roslyn suppresses ParamList in deltas. EncLog owns parameter associations.
rowElementSimpleIndex TableNames.Param 0
|]

methodRows.Add rowElements
Expand Down
21 changes: 5 additions & 16 deletions src/Compiler/AbstractIL/FSharpDeltaMetadataWriter.fs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module internal FSharp.Compiler.AbstractIL.FSharpDeltaMetadataWriter

open System
open FSharp.Compiler.EnvironmentHelpers
open System.Collections.Generic
open Microsoft.FSharp.Collections
open FSharp.Compiler.AbstractIL.ILMetadataHeaps
open FSharp.Compiler.AbstractIL.ILBinaryWriter
open FSharp.Compiler.AbstractIL.BinaryConstants
open FSharp.Compiler.AbstractIL.ILDeltaHandles
open FSharp.Compiler.AbstractIL.IlxDeltaStreams
Expand All @@ -13,25 +14,13 @@ open FSharp.Compiler.AbstractIL.DeltaTableLayout
open FSharp.Compiler.AbstractIL.DeltaMetadataSerializer

[<Literal>]
let private TraceMetadataFlagName = "FSHARP_HOTRELOAD_TRACE_METADATA"
let private TraceMetadataFlagName = EnvironmentVariableNames.HotReloadTraceMetadata

[<Literal>]
let private TraceHeapsFlagName = "FSHARP_HOTRELOAD_TRACE_HEAPS"
let private TraceHeapsFlagName = EnvironmentVariableNames.HotReloadTraceHeaps

[<Literal>]
let private TraceMethodsFlagName = "FSHARP_HOTRELOAD_TRACE_METHODS"

/// Local copy of FSharp.Compiler.EnvironmentHelpers.isEnvVarTruthy. That module is a new
/// utility file added by the hot-reload feature branch and isn't part of this extraction's
/// scope, so the writer's trace-flag checks carry their own tiny copy instead of pulling in
/// an extra out-of-scope file.
let private isEnvVarTruthy (name: string) =
match Environment.GetEnvironmentVariable(name) with
| null
| "" -> false
| value when String.Equals(value, "1", StringComparison.OrdinalIgnoreCase) -> true
| value when String.Equals(value, "true", StringComparison.OrdinalIgnoreCase) -> true
| _ -> false
let private TraceMethodsFlagName = EnvironmentVariableNames.HotReloadTraceMethods

let private shouldTraceMetadata () = isEnvVarTruthy TraceMetadataFlagName

Expand Down
Loading
Loading