dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
506 stars 196 forks source link

Inline completion is broken? #10305

Open davidwengier opened 7 months ago

davidwengier commented 7 months ago

Found one of the possible causes of the Remote Invocation Exception we something see:

Repro: Type "@if", press Tab.

4199dfad-b915-4933-bb61-247fa619267b

Required property 'TextDocument' not found in JSON. Path ''.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext() in D:\Code\alt-razor\src\Razor\src\Microsoft.AspNetCore.Razor.LanguageServer\ClientConnection.cs:line 26
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.AspNetCore.Razor.LanguageServer.InlineCompletion.InlineCompletionEndpoint.<HandleRequestAsync>d__10.MoveNext() in D:\Code\alt-razor\src\Razor\src\Microsoft.AspNetCore.Razor.LanguageServer\InlineCompletion\InlineCompletionEndPoint.cs:line 104
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.<StartRequestAsync>d__20.MoveNext() in D:\NugetCache\microsoft.commonlanguageserverprotocol.framework\4.11.0-1.24214.4\contentFiles\cs\netstandard2.0\QueueItem.cs:line 150
davidwengier commented 6 months ago

Roslyn merged there side of this in https://github.com/dotnet/roslyn/pull/73282