Skip to content

Commit ae99095

Browse files
committed
Update ilxgen name-path architecture guard
1 parent 05414d2 commit ae99095

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎tests/FSharp.Compiler.Service.Tests/HotReload/ArchitectureGuardTests.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,19 @@ let ``delta builder fallback keeps staged signature disambiguation`` () =
235235
[<Fact>]
236236
let ``ilxgen centralizes compiler-generated-name access through helper wrappers`` () =
237237
// Mirrors tests/scripts/check-ilxgen-name-path.sh so the name-path guard runs in CI: every
238-
// compiler-generated name must flow through the freshIlxName/freshCoreName/nextIlxOrdinal
239-
// wrappers, which are the only sites permitted to touch the CompilerGlobalState generators.
238+
// compiler-generated name must flow through the freshIlxName/freshCoreName wrappers, which
239+
// are the only sites permitted to touch the CompilerGlobalState generators.
240240
// A new direct generator call outside a wrapper (or a removed wrapper) breaks the hot-reload
241241
// name-replay invariant and must fail here.
242242
let source = readCompilerFile "src/Compiler/CodeGen/IlxGen.fs"
243243

244244
Assert.Contains("let private freshIlxName", source)
245245
Assert.Contains("let private freshCoreName", source)
246-
Assert.Contains("let private nextIlxOrdinal", source)
246+
Assert.DoesNotContain("IncrementOnly", source)
247247

248248
let directGeneratorCalls =
249249
System.Text.RegularExpressions.Regex.Matches(
250250
source,
251-
@"CompilerGlobalState\.Value\.(IlxGenNiceNameGenerator|NiceNameGenerator)\.(FreshCompilerGeneratedName|IncrementOnly)")
251+
@"CompilerGlobalState\.Value\.(IlxGenNiceNameGenerator|NiceNameGenerator)\.FreshCompilerGeneratedName")
252252

253-
Assert.Equal(3, directGeneratorCalls.Count)
253+
Assert.Equal(2, directGeneratorCalls.Count)

0 commit comments

Comments
 (0)