1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:14:43 -07:00

internal/lsp: client/registerCapapbility is a request, not a notification

Although they have null responses, client/[un]registerCapability messages
are RPCs from golps to the editor, not notifications.
(This bug had unknown impact.)

Change-Id: I3be2eb30b46f937b8ec29d1668f682b797d84be9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179157
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Peter Weinberger 2019-05-28 09:47:51 -04:00
parent 1a7b4747f5
commit d238219cc2

View File

@ -171,11 +171,11 @@ func (s *clientDispatcher) Configuration(ctx context.Context, params *Configurat
} }
func (s *clientDispatcher) RegisterCapability(ctx context.Context, params *RegistrationParams) error { func (s *clientDispatcher) RegisterCapability(ctx context.Context, params *RegistrationParams) error {
return s.Conn.Notify(ctx, "client/registerCapability", params) // Notify? (not Call?) return s.Conn.Call(ctx, "client/registerCapability", params, nil) // Call, not Notify
} }
func (s *clientDispatcher) UnregisterCapability(ctx context.Context, params *UnregistrationParams) error { func (s *clientDispatcher) UnregisterCapability(ctx context.Context, params *UnregistrationParams) error {
return s.Conn.Notify(ctx, "client/unregisterCapability", params) // Notify? (not Call?) return s.Conn.Call(ctx, "client/unregisterCapability", params, nil) // Call, not Notify
} }
func (s *clientDispatcher) ShowMessageRequest(ctx context.Context, params *ShowMessageRequestParams) (*MessageActionItem, error) { func (s *clientDispatcher) ShowMessageRequest(ctx context.Context, params *ShowMessageRequestParams) (*MessageActionItem, error) {