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 7f0be7cb37f..01c70d2d29d 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -23,8 +23,10 @@ * Fix checking bug in unpickling [PR #18430](https://github.com/dotnet/fsharp/pull/18430) * Reenable β-reduction and subsequent reoptimization of immediately-invoked F#-defined generic delegates. ([PR #18401](https://github.com/dotnet/fsharp/pull/18401)) * Fixed [#18433](https://github.com/dotnet/fsharp/issues/18433), a rare case of an internal error in xml comment processing. ([PR #18436](https://github.com/dotnet/fsharp/pull/18436)) +* Fixed [#18441](https://github.com/dotnet/fsharp/issues/18441), Unique names of generated assemblies for each fsi session ([PR #18443](https://github.com/dotnet/fsharp/pull/18443)) * Fix missing `null` highlighting in tooltips ([PR #18457](https://github.com/dotnet/fsharp/pull/18457)) + ### Added * Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241)) * The 'use' keyword can be used on IDisposable|null without nullness warnings ([PR #18262](https://github.com/dotnet/fsharp/pull/18262)) diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 78d5cb94dcd..6831c2d75ac 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -1673,7 +1673,16 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let qname = QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)) entity, v, CheckedImplFile.CheckedImplFile(qname, [], mty, contents, false, false, StampMap.Empty, Map.empty) -let dynamicCcuName = "FSI-ASSEMBLY" +let mkUniqueCcuName = + let mutable ccuId = 0 + + fun () -> + let nextId = Interlocked.Increment &ccuId + + if nextId = 1 then + "FSI-ASSEMBLY" + else + $"FSI-ASSEMBLY{nextId}" /// Encapsulates the coordination of the typechecking, optimization and code generation /// components of the F# compiler for interactively executed fragments of code. @@ -1718,6 +1727,8 @@ type internal FsiDynamicCompiler let valuePrinter = FsiValuePrinter(fsi, outWriter) + let dynamicCcuName = mkUniqueCcuName () + let builders = if tcConfigB.fsiMultiAssemblyEmit then None @@ -2415,15 +2426,17 @@ type internal FsiDynamicCompiler member _.DynamicAssemblies = dynamicAssemblies.ToArray() - member _.FindDynamicAssembly(name, useFullName: bool) = - let getName (assemblyName: AssemblyName) : string MaybeNull = - if useFullName then - assemblyName.FullName - else - assemblyName.Name - - dynamicAssemblies - |> ResizeArray.tryFind (fun asm -> getName (asm.GetName()) = name) + member _.FindDynamicAssembly(assemblyName: AssemblyName) = + // All dynamic assemblies share the same simple name and differ only in version. + if assemblyName.Name <> dynamicCcuName then + None + elif isNull assemblyName.Version then + // If no specific version is requested, try to return the most recent assembly. + dynamicAssemblies |> Seq.tryLast + else + // Otherwise, try to find an exact match. + dynamicAssemblies + |> ResizeArray.tryFind (fun asm -> asm.FullName = assemblyName.FullName) member _.EvalParsedSourceFiles(ctok, diagnosticsLogger, istate, inputs, m) = let prefix = mkFragmentPath m nextFragmentId @@ -3274,7 +3287,8 @@ type internal MagicAssemblyResolution() = try // Grab the name of the assembly let tcConfig = TcConfig.Create(tcConfigB, validate = false) - let simpleAssemName = fullAssemName.Split([| ',' |]).[0] + let assemblyName = AssemblyName(fullAssemName) + let simpleAssemName = !!assemblyName.Name if progress then fsiConsoleOutput.uprintfn "ATTEMPT MAGIC LOAD ON ASSEMBLY, simpleAssemName = %s" simpleAssemName // "Attempting to load a dynamically required assembly in response to an AssemblyResolve event by using known static assembly references..." @@ -3285,35 +3299,42 @@ type internal MagicAssemblyResolution() = then null else - // Check dynamic assemblies by exact version - match fsiDynamicCompiler.FindDynamicAssembly(fullAssemName, true) with + // Check dynamic assemblies + match fsiDynamicCompiler.FindDynamicAssembly(assemblyName) with | Some asm -> asm | None -> - // Check dynamic assemblies by simple name - match fsiDynamicCompiler.FindDynamicAssembly(simpleAssemName, false) with - | Some asm when not (tcConfigB.fsiMultiAssemblyEmit) -> asm - | _ -> + // Otherwise continue + let assemblyReferenceTextDll = (simpleAssemName + ".dll") + let assemblyReferenceTextExe = (simpleAssemName + ".exe") - // Otherwise continue - let assemblyReferenceTextDll = (simpleAssemName + ".dll") - let assemblyReferenceTextExe = (simpleAssemName + ".exe") + let overallSearchResult = - let overallSearchResult = + // OK, try to resolve as an existing DLL in the resolved reference set. This does unification by assembly name + // once an assembly has been referenced. + let searchResult = + tcImports.TryFindExistingFullyQualifiedPathBySimpleAssemblyName simpleAssemName - // OK, try to resolve as an existing DLL in the resolved reference set. This does unification by assembly name - // once an assembly has been referenced. + match searchResult with + | Some r -> OkResult([], Choice1Of2 r) + | _ -> + + // OK, try to resolve as a .dll let searchResult = - tcImports.TryFindExistingFullyQualifiedPathBySimpleAssemblyName simpleAssemName + tcImports.TryResolveAssemblyReference( + ctok, + AssemblyReference(m, assemblyReferenceTextDll, None), + ResolveAssemblyReferenceMode.Speculative + ) match searchResult with - | Some r -> OkResult([], Choice1Of2 r) + | OkResult(warns, [ r ]) -> OkResult(warns, Choice1Of2 r.resolvedPath) | _ -> - // OK, try to resolve as a .dll + // OK, try to resolve as a .exe let searchResult = tcImports.TryResolveAssemblyReference( ctok, - AssemblyReference(m, assemblyReferenceTextDll, None), + AssemblyReference(m, assemblyReferenceTextExe, None), ResolveAssemblyReferenceMode.Speculative ) @@ -3321,93 +3342,81 @@ type internal MagicAssemblyResolution() = | OkResult(warns, [ r ]) -> OkResult(warns, Choice1Of2 r.resolvedPath) | _ -> - // OK, try to resolve as a .exe + if progress then + fsiConsoleOutput.uprintfn "ATTEMPT LOAD, assemblyReferenceTextDll = %s" assemblyReferenceTextDll + + /// Take a look through the files quoted, perhaps with explicit paths let searchResult = - tcImports.TryResolveAssemblyReference( - ctok, - AssemblyReference(m, assemblyReferenceTextExe, None), - ResolveAssemblyReferenceMode.Speculative - ) + tcConfig.referencedDLLs + |> List.tryPick (fun assemblyReference -> + if progress then + fsiConsoleOutput.uprintfn + "ATTEMPT MAGIC LOAD ON FILE, referencedDLL = %s" + assemblyReference.Text + + if + String.Compare( + FileSystemUtils.fileNameOfPath assemblyReference.Text, + assemblyReferenceTextDll, + StringComparison.OrdinalIgnoreCase + ) = 0 + || String.Compare( + FileSystemUtils.fileNameOfPath assemblyReference.Text, + assemblyReferenceTextExe, + StringComparison.OrdinalIgnoreCase + ) = 0 + then + Some( + tcImports.TryResolveAssemblyReference( + ctok, + assemblyReference, + ResolveAssemblyReferenceMode.Speculative + ) + ) + else + None) match searchResult with - | OkResult(warns, [ r ]) -> OkResult(warns, Choice1Of2 r.resolvedPath) + | Some(OkResult(warns, [ r ])) -> OkResult(warns, Choice1Of2 r.resolvedPath) | _ -> - if progress then - fsiConsoleOutput.uprintfn "ATTEMPT LOAD, assemblyReferenceTextDll = %s" assemblyReferenceTextDll - - /// Take a look through the files quoted, perhaps with explicit paths - let searchResult = - tcConfig.referencedDLLs - |> List.tryPick (fun assemblyReference -> - if progress then - fsiConsoleOutput.uprintfn - "ATTEMPT MAGIC LOAD ON FILE, referencedDLL = %s" - assemblyReference.Text - - if - String.Compare( - FileSystemUtils.fileNameOfPath assemblyReference.Text, - assemblyReferenceTextDll, - StringComparison.OrdinalIgnoreCase - ) = 0 - || String.Compare( - FileSystemUtils.fileNameOfPath assemblyReference.Text, - assemblyReferenceTextExe, - StringComparison.OrdinalIgnoreCase - ) = 0 - then - Some( - tcImports.TryResolveAssemblyReference( - ctok, - assemblyReference, - ResolveAssemblyReferenceMode.Speculative - ) - ) - else - None) - - match searchResult with - | Some(OkResult(warns, [ r ])) -> OkResult(warns, Choice1Of2 r.resolvedPath) - | _ -> - #if !NO_TYPEPROVIDERS - match tcImports.TryFindProviderGeneratedAssemblyByName(ctok, simpleAssemName) with - | Some assembly -> OkResult([], Choice2Of2 assembly) - | None -> + match tcImports.TryFindProviderGeneratedAssemblyByName(ctok, simpleAssemName) with + | Some assembly -> OkResult([], Choice2Of2 assembly) + | None -> #endif - // As a last resort, try to find the reference without an extension - match - tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef( - ILAssemblyRef.Create(simpleAssemName, None, None, false, None, None) - ) - with - | Some resolvedPath -> OkResult([], Choice1Of2 resolvedPath) - | None -> - - ErrorResult([], Failure(FSIstrings.SR.fsiFailedToResolveAssembly (simpleAssemName))) - - match overallSearchResult with - | ErrorResult _ -> null - | OkResult _ -> - let res = CommitOperationResult overallSearchResult - - match res with - | Choice1Of2 assemblyName -> - if simpleAssemName <> "Mono.Posix" && progress then - fsiConsoleOutput.uprintfn "%s" (FSIstrings.SR.fsiBindingSessionTo (assemblyName)) - - if isRunningOnCoreClr then + // As a last resort, try to find the reference without an extension + match + tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef( + ILAssemblyRef.Create(simpleAssemName, None, None, false, None, None) + ) + with + | Some resolvedPath -> OkResult([], Choice1Of2 resolvedPath) + | None -> + + ErrorResult([], Failure(FSIstrings.SR.fsiFailedToResolveAssembly (simpleAssemName))) + + match overallSearchResult with + | ErrorResult _ -> null + | OkResult _ -> + let res = CommitOperationResult overallSearchResult + + match res with + | Choice1Of2 assemblyName -> + if simpleAssemName <> "Mono.Posix" && progress then + fsiConsoleOutput.uprintfn "%s" (FSIstrings.SR.fsiBindingSessionTo (assemblyName)) + + if isRunningOnCoreClr then + assemblyLoadFrom assemblyName + else + try + let an = AssemblyName.GetAssemblyName(assemblyName) + an.CodeBase <- assemblyName + Assembly.Load an + with _ -> assemblyLoadFrom assemblyName - else - try - let an = AssemblyName.GetAssemblyName(assemblyName) - an.CodeBase <- assemblyName - Assembly.Load an - with _ -> - assemblyLoadFrom assemblyName - | Choice2Of2 assembly -> assembly + | Choice2Of2 assembly -> assembly with e -> stopProcessingRecovery e range0 diff --git a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs index 4fab401b9c6..359e6ceaee5 100644 --- a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs +++ b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs @@ -35,13 +35,14 @@ module ``Interactive tests`` = ] [] - [] - [] - let ``Evaluation of multiple sessions should succeed`` (useMultiEmit) = + [] + [] + [] + let ``Evaluation of multiple sessions should succeed`` (useMultiEmit1, useMultiEmit2) = - let args : string array = [| if useMultiEmit then "--multiemit+" else "--multiemit-"|] - use sessionOne = new FSharpScript(additionalArgs=args) - use sessionTwo = new FSharpScript(additionalArgs=args) + let args useMultiEmit : string array = [| if useMultiEmit then "--multiemit+" else "--multiemit-"|] + use sessionOne = new FSharpScript(additionalArgs = args useMultiEmit1) + use sessionTwo = new FSharpScript(additionalArgs = args useMultiEmit2) sessionOne.Eval(""" module Test1 = @@ -63,6 +64,33 @@ module Test2 = Assert.Equal(typeof, value2.ReflectionType) Assert.Equal("Execute - Test2.test2 - 27", value2.ReflectionValue :?> string) + [] + [] + [] + let ``Currently executing dynamic assembly can be resolved by simple name and full name`` useMultiEmit = + let args = [| if useMultiEmit then "--multiemit+" else "--multiemit-" |] + use session = new FSharpScript(additionalArgs = args) + let simpleNameResult = session.Eval("""System.Reflection.Assembly.GetExecutingAssembly().GetName().Name""") |> getValue + let fullNameResult = session.Eval("""System.Reflection.Assembly.GetExecutingAssembly().FullName""") |> getValue + System.Reflection.Assembly.Load(string simpleNameResult.Value.ReflectionValue) |> ignore + System.Reflection.Assembly.Load(string fullNameResult.Value.ReflectionValue) |> ignore + + [] + let ``Multiple sessions should have unique assembly names`` () = + let args useMultiEmit : string array = [| if useMultiEmit then "--multiemit+" else "--multiemit-"|] + use session1 = new FSharpScript(additionalArgs = args true) + use session2 = new FSharpScript(additionalArgs = args false) + use session3 = new FSharpScript(additionalArgs = args true) + use session4 = new FSharpScript(additionalArgs = args false) + + let names = + [ for session in [session1; session2; session3; session4] do + let result = session.Eval("""System.Reflection.Assembly.GetExecutingAssembly().GetName().Name""") |> getValue + result.Value.ReflectionValue |> string ] + + printfn "%A" names + Assert.True(names |> List.distinct = names, "Assembly names are not unique across sessions") + module ``External FSI tests`` = [] let ``Eval object value``() = 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 69842b9e059..05184b39f89 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -20,8 +20,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][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 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@3502-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3511-805::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@2225::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 6e41547cd11..1173c379230 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -27,8 +27,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+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@3502-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3511-805::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@2225::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 4e7b5396676..86b659b117b 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -20,8 +20,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][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 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@3502-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3511-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::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 431d4e5512a..3e073df93b3 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -27,8 +27,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+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@3502-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3511-849::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@2225::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.