From 3ce904827cf8f6454eee827534bd87464e224607 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 6 Feb 2025 13:31:28 +0100 Subject: [PATCH 1/8] Cancellable: fix leaking cancellation token --- src/Compiler/Driver/CompilerImports.fs | 2 +- src/Compiler/Service/BackgroundCompiler.fs | 2 +- src/Compiler/Service/ServiceAnalysis.fs | 2 +- src/Compiler/Utilities/Cancellable.fs | 2 +- src/Compiler/Utilities/Cancellable.fsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs index 8478429a452..ca223e6df39 100644 --- a/src/Compiler/Driver/CompilerImports.fs +++ b/src/Compiler/Driver/CompilerImports.fs @@ -2255,7 +2255,7 @@ and [] TcImports r: AssemblyResolution ) : Async<(_ * (unit -> AvailableImportedAssembly list)) option> = async { - do! Cancellable.UseToken() + use! _holder = Cancellable.UseToken() CheckDisposed() let m = r.originalReference.Range let fileName = r.resolvedPath diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index da04b6ebb83..77a068bda0d 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -503,7 +503,7 @@ type internal BackgroundCompiler match tryGetBuilder options with | Some getBuilder -> async { - do! Cancellable.UseToken() + use! _holder = Cancellable.UseToken() match! getBuilder with | builderOpt, creationDiags when builderOpt.IsNone || not builderOpt.Value.IsReferencesInvalidated -> diff --git a/src/Compiler/Service/ServiceAnalysis.fs b/src/Compiler/Service/ServiceAnalysis.fs index 1347751d167..6455d9f0ff3 100644 --- a/src/Compiler/Service/ServiceAnalysis.fs +++ b/src/Compiler/Service/ServiceAnalysis.fs @@ -302,7 +302,7 @@ module UnusedOpens = /// Async to allow cancellation. let getUnusedOpens (checkFileResults: FSharpCheckFileResults, getSourceLineStr: int -> string) : Async = async { - do! Cancellable.UseToken() + use! _holder = Cancellable.UseToken() if checkFileResults.OpenDeclarations.Length = 0 then return [] diff --git a/src/Compiler/Utilities/Cancellable.fs b/src/Compiler/Utilities/Cancellable.fs index ad739b5039e..bf9b2313915 100644 --- a/src/Compiler/Utilities/Cancellable.fs +++ b/src/Compiler/Utilities/Cancellable.fs @@ -21,7 +21,7 @@ type Cancellable = static member UseToken() = async { let! ct = Async.CancellationToken - tokenHolder.Value <- ValueSome ct + return Cancellable.UsingToken ct } static member UsingToken(ct) = diff --git a/src/Compiler/Utilities/Cancellable.fsi b/src/Compiler/Utilities/Cancellable.fsi index aba96859491..368f2455cac 100644 --- a/src/Compiler/Utilities/Cancellable.fsi +++ b/src/Compiler/Utilities/Cancellable.fsi @@ -5,7 +5,7 @@ open System.Threading [] type Cancellable = - static member internal UseToken: unit -> Async + static member internal UseToken: unit -> Async /// For use in testing only. Cancellable.token should be set only by the cancellable computation. static member internal UsingToken: CancellationToken -> IDisposable From 164208f5a7c8bb3767f4922f0fdc2447ea61b496 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 6 Feb 2025 21:37:20 +0900 Subject: [PATCH 2/8] Release notes Update docs/release-notes/.FSharp.Compiler.Service/9.0.300.md --- docs/release-notes/.FSharp.Compiler.Service/9.0.300.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index a6d29f078d4..c2fd13613a3 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -7,6 +7,7 @@ * Fix missing nullness warning when static upcast dropped nullness ([Issue #18232](https://github.com/dotnet/fsharp/issues/18232), [PR #18261](https://github.com/dotnet/fsharp/pull/18261)) * Cancellable: only cancel on OCE with own token ([PR #18277](https://github.com/dotnet/fsharp/pull/18277)) * Cancellable: set token in more places ([PR #18283](https://github.com/dotnet/fsharp/pull/18283)) +* Cancellable: fix leaking cancellation token ([PR #18295](https://github.com/dotnet/fsharp/pull/18295)) * Fix NRE when accessing nullable fields of types within their equals/hash/compare methods ([PR #18296](https://github.com/dotnet/fsharp/pull/18296)) ### Added From 7f3929e2cff77dcf095fd970440d4ba6c06b5569 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 6 Feb 2025 18:49:16 +0100 Subject: [PATCH 3/8] Set Cancellable.Token in transparent compiler --- src/Compiler/Service/TransparentCompiler.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index 9f35b4f2835..27af1cb6068 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -611,6 +611,8 @@ type internal TransparentCompiler caches.FrameworkImports.Get( key, async { + use! _holder = Cancellable.UseToken() + use _ = Activity.start "ComputeFrameworkImports" [] let tcConfigP = TcConfigProvider.Constant tcConfig @@ -635,6 +637,8 @@ type internal TransparentCompiler ) = async { + use! _holder = Cancellable.UseToken() + let diagnosticsLogger = CompilationDiagnosticLogger("CombineImportedAssembliesTask", tcConfig.diagnosticsOptions) From 9c96524d9341a1c3b77af6c084278f05729c1eda Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Feb 2025 11:05:32 +0100 Subject: [PATCH 4/8] Review fixes --- src/Compiler/Driver/CompilerImports.fs | 8 ++++++-- src/Compiler/Service/TransparentCompiler.fs | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs index ca223e6df39..6b00bafa970 100644 --- a/src/Compiler/Driver/CompilerImports.fs +++ b/src/Compiler/Driver/CompilerImports.fs @@ -2255,7 +2255,6 @@ and [] TcImports r: AssemblyResolution ) : Async<(_ * (unit -> AvailableImportedAssembly list)) option> = async { - use! _holder = Cancellable.UseToken() CheckDisposed() let m = r.originalReference.Range let fileName = r.resolvedPath @@ -2325,8 +2324,9 @@ and [] TcImports // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. member tcImports.RegisterAndImportReferencedAssemblies(ctok, nms: AssemblyResolution list) = async { - CheckDisposed() + use! _holder = Cancellable.UseToken() + CheckDisposed() let tcConfig = tcConfigP.Get ctok @@ -2475,6 +2475,8 @@ and [] TcImports // If a framework set ever includes type providers, you will not have to worry about explicitly calling Dispose as the Finalizer will handle it. static member BuildFrameworkTcImports(tcConfigP: TcConfigProvider, frameworkDLLs, nonFrameworkDLLs) = async { + use! _holder = Cancellable.UseToken() + let ctok = CompilationThreadToken() let tcConfig = tcConfigP.Get ctok @@ -2648,6 +2650,8 @@ and [] TcImports ) = async { + use! _holder = Cancellable.UseToken() + let ctok = CompilationThreadToken() let tcConfig = tcConfigP.Get ctok diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index 27af1cb6068..9f35b4f2835 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -611,8 +611,6 @@ type internal TransparentCompiler caches.FrameworkImports.Get( key, async { - use! _holder = Cancellable.UseToken() - use _ = Activity.start "ComputeFrameworkImports" [] let tcConfigP = TcConfigProvider.Constant tcConfig @@ -637,8 +635,6 @@ type internal TransparentCompiler ) = async { - use! _holder = Cancellable.UseToken() - let diagnosticsLogger = CompilationDiagnosticLogger("CombineImportedAssembliesTask", tcConfig.diagnosticsOptions) From a887abb55ca921938b751a9ff645bb1cb2113845 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Feb 2025 13:40:07 +0100 Subject: [PATCH 5/8] Move setting the token --- src/Compiler/Driver/CompilerImports.fs | 6 ------ src/Compiler/Service/BackgroundCompiler.fs | 13 +++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs index 6b00bafa970..ae14ee51157 100644 --- a/src/Compiler/Driver/CompilerImports.fs +++ b/src/Compiler/Driver/CompilerImports.fs @@ -2324,8 +2324,6 @@ and [] TcImports // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. member tcImports.RegisterAndImportReferencedAssemblies(ctok, nms: AssemblyResolution list) = async { - use! _holder = Cancellable.UseToken() - CheckDisposed() let tcConfig = tcConfigP.Get ctok @@ -2475,8 +2473,6 @@ and [] TcImports // If a framework set ever includes type providers, you will not have to worry about explicitly calling Dispose as the Finalizer will handle it. static member BuildFrameworkTcImports(tcConfigP: TcConfigProvider, frameworkDLLs, nonFrameworkDLLs) = async { - use! _holder = Cancellable.UseToken() - let ctok = CompilationThreadToken() let tcConfig = tcConfigP.Get ctok @@ -2650,8 +2646,6 @@ and [] TcImports ) = async { - use! _holder = Cancellable.UseToken() - let ctok = CompilationThreadToken() let tcConfig = tcConfigP.Get ctok diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index 77a068bda0d..201f8c0cdf0 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -500,11 +500,11 @@ type internal BackgroundCompiler } let getOrCreateBuilder (options, userOpName) : Async = - match tryGetBuilder options with - | Some getBuilder -> - async { - use! _holder = Cancellable.UseToken() + async { + use! _holder = Cancellable.UseToken() + match tryGetBuilder options with + | Some getBuilder -> match! getBuilder with | builderOpt, creationDiags when builderOpt.IsNone || not builderOpt.Value.IsReferencesInvalidated -> return builderOpt, creationDiags @@ -520,8 +520,9 @@ type internal BackgroundCompiler checkFileInProjectCache.RemoveAnySimilar(ltok, key))) return! createAndGetBuilder (options, userOpName) - } - | _ -> createAndGetBuilder (options, userOpName) + | _ -> + return! createAndGetBuilder (options, userOpName) + } let getSimilarOrCreateBuilder (options, userOpName) = match tryGetSimilarBuilder options with From e02068ecd430d42d0a4f6c51467d7dbdf8be69d7 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Feb 2025 13:46:36 +0100 Subject: [PATCH 6/8] Fantomas --- src/Compiler/Service/BackgroundCompiler.fs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index 201f8c0cdf0..a55aaa490be 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -520,8 +520,7 @@ type internal BackgroundCompiler checkFileInProjectCache.RemoveAnySimilar(ltok, key))) return! createAndGetBuilder (options, userOpName) - | _ -> - return! createAndGetBuilder (options, userOpName) + | _ -> return! createAndGetBuilder (options, userOpName) } let getSimilarOrCreateBuilder (options, userOpName) = From b756c5d2341009e78d73d08e6397d95ed14ca2a4 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 10 Feb 2025 15:34:10 +0100 Subject: [PATCH 7/8] Transparent compiler --- src/Compiler/Service/TransparentCompiler.fs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index 9f35b4f2835..9007a111e7d 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -1610,6 +1610,8 @@ type internal TransparentCompiler caches.ParseAndCheckFileInProject.Get( projectSnapshot.FileKeyWithExtraFileSnapshotVersion fileName, async { + use! _holder = Cancellable.UseToken() + use _ = Activity.start "ComputeParseAndCheckFileInProject" [| Activity.Tags.fileName, fileName |> Path.GetFileName |> (!!) |] @@ -1861,6 +1863,7 @@ type internal TransparentCompiler caches.AssemblyData.Get( projectSnapshot.SignatureKey, async { + use! _holder = Cancellable.UseToken() try @@ -1908,6 +1911,7 @@ type internal TransparentCompiler caches.ParseAndCheckProject.Get( projectSnapshot.FullKey, async { + use! _holder = Cancellable.UseToken() match! ComputeBootstrapInfo projectSnapshot with | None, creationDiags -> @@ -1980,6 +1984,8 @@ type internal TransparentCompiler let tryGetSink (fileName: string) (projectSnapshot: ProjectSnapshot) = async { + use! _holder = Cancellable.UseToken() + match! ComputeBootstrapInfo projectSnapshot with | None, _ -> return None | Some bootstrapInfo, _creationDiags -> From 4d8e4f9f39428b61dbed1f9349f655682573b60e Mon Sep 17 00:00:00 2001 From: Petr Date: Tue, 11 Feb 2025 13:04:29 +0100 Subject: [PATCH 8/8] il bsl --- .../ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl | 2 +- .../ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl | 2 +- .../ilverify_FSharp.Compiler.Service_Release_net9.0.bsl | 2 +- .../ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index c2263a4f259..4f429d04961 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-789::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-802::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 18045d70b31..2ec0116a1af 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-789::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-802::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index b01f7e04acb..48210dddd5c 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-833::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-846::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index e093fab1d7d..2df2cf0fbd9 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-833::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3516-846::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2205::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack.