Skip to content

Breaking: Error object was misshaped, textdocumentsync double registered. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 19, 2017

Conversation

david-driscoll
Copy link
Member

  • Error didn't have the correct property attached to it. Renamed class to RpcError and updated property name to be Error
  • Fixed ErrorResponse to use two derived types, this is to ensure that both the result and error properties will be set correctly.
  • Fixed an problem where ITextDocumentSyncHandler was being registered twice for servers that support dynamic registration.

deploying as v0.5.0 cc @tintoy

I tested with a ProjectReference so things appear to be working in my project anyway.

@david-driscoll david-driscoll merged commit 3418b51 into master Oct 19, 2017
@tintoy
Copy link
Collaborator

tintoy commented Oct 19, 2017

Cheers - 0.5.0 is not indexed on NuGet yet so I can't install it, but I can confirm that 0.4.1 fixed the original problem in #22 (ServerCapabilities.HoverProvider is now correctly returned). Will give 0.5.0 a try when it becomes available.

@david-driscoll david-driscoll deleted the fix/error branch October 19, 2017 18:39
@david-driscoll
Copy link
Member Author

Looks to be indexed now.

@tintoy
Copy link
Collaborator

tintoy commented Oct 19, 2017

After upgrading to v0.5.0, my single-process example now crashes when shutting down with an unhandled TaskCanceledException. Works correctly when I roll back to v0.4.1, BTW. Nothing obvious looks amiss, and given the stack trace for the TaskCancelledException, it looks like it might be an unobserved task result?

System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at OmniSharp.Extensions.JsonRpc.OutputHandler.ProcessOutputQueue()
   at System.Threading.Thread.ThreadMain_ThreadStart()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

@tintoy
Copy link
Collaborator

tintoy commented Oct 19, 2017

Hooray for verbose logging!

[06:32:42 DBG] Unable to find shutdown, methods found include initialize:OmniSharp.Extensions.LanguageServer.LanguageServer, initialized:OmniSharp.Extensions.LanguageServer.LanguageServer, $/cancelRequest:OmniSharp.Extensions.LanguageServer.Handlers.CancelRequestHandler, workspace/didChangeConfiguration:Common.ConfigurationHandler, textDocument/hover:Common.HoverHandler, dummy:Common.DummyHandler

@tintoy
Copy link
Collaborator

tintoy commented Oct 19, 2017

Also:

[06:32:42 DBG] Unable to find exit, methods found include initialize:OmniSharp.Extensions.LanguageServer.LanguageServer, initialized:OmniSharp.Extensions.LanguageServer.LanguageServer, $/cancelRequest:OmniSharp.Extensions.LanguageServer.Handlers.CancelRequestHandler, workspace/didChangeConfiguration:Common.ConfigurationHandler, textDocument/hover:Common.HoverHandler, dummy:Common.DummyHandler

@david-driscoll
Copy link
Member Author

a crash on shutdown is the only way to shutdown I'm tell you!

@david-driscoll
Copy link
Member Author

At least the logging is useful... time to add some extra tests.

@tintoy
Copy link
Collaborator

tintoy commented Oct 19, 2017

Yeah for sure - logging saved my bacon several times while I was building the client :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants