Skip to content

Commit

Permalink
build(deps): bump github.com/creachadair/jrpc2 from 0.14.0 to 0.15.0 (#…
Browse files Browse the repository at this point in the history
…503)

* build(deps): bump github.com/creachadair/jrpc2 from 0.14.0 to 0.15.0

Bumps [github.com/creachadair/jrpc2](https://github.com/creachadair/jrpc2) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/creachadair/jrpc2/releases)
- [Commits](creachadair/jrpc2@v0.14.0...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Reflect breaking changes

See creachadair/jrpc2@cc566c1

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Radek Simko <radek.simko@gmail.com>
  • Loading branch information
dependabot[bot] and radeksimko authored May 11, 2021
1 parent 7ae1492 commit c4ea46f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.13

require (
github.com/apparentlymart/go-textseg v1.0.0
github.com/creachadair/jrpc2 v0.14.0
github.com/creachadair/jrpc2 v0.15.0
github.com/fsnotify/fsnotify v1.4.9
github.com/google/go-cmp v0.5.5
github.com/google/uuid v1.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creachadair/jrpc2 v0.14.0 h1:iwEJCgb6hKFAPECaB9fKOsKoO13EBtNdhUTvkJsVwhc=
github.com/creachadair/jrpc2 v0.14.0/go.mod h1:gaeysmTjY/kHSaCEjxF1pHXl8bc0X5otQPnQiA6r9Xk=
github.com/creachadair/jrpc2 v0.15.0 h1:N+h9sDKPkUuS0qqOaSQbrBMvpPBPDcv/Vh36iZujW4c=
github.com/creachadair/jrpc2 v0.15.0/go.mod h1:gaeysmTjY/kHSaCEjxF1pHXl8bc0X5otQPnQiA6r9Xk=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/diagnostics/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (n *Notifier) PublishHCLDiags(ctx context.Context, dirPath string, diags ma

func (n *Notifier) notify() {
for d := range n.diags {
if err := jrpc2.PushNotify(d.ctx, "textDocument/publishDiagnostics", lsp.PublishDiagnosticsParams{
if err := jrpc2.ServerFromContext(d.ctx).Notify(d.ctx, "textDocument/publishDiagnostics", lsp.PublishDiagnosticsParams{
URI: d.uri,
Diagnostics: n.mergeDiags(d.uri, d.source, d.diags),
}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/handlers/cancel_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func CancelRequest(ctx context.Context, params lsp.CancelParams) error {
return err
}

jrpc2.CancelRequest(ctx, id)
jrpc2.ServerFromContext(ctx).CancelRequest(id)
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions internal/langserver/handlers/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (lh *logHandler) Initialize(ctx context.Context, params lsp.InitializeParam
lsctx.SetExperimentalFeatures(ctx, out.Options.ExperimentalFeatures)

if len(out.UnusedKeys) > 0 {
jrpc2.PushNotify(ctx, "window/showMessage", &lsp.ShowMessageParams{
jrpc2.ServerFromContext(ctx).Notify(ctx, "window/showMessage", &lsp.ShowMessageParams{
Type: lsp.Warning,
Message: fmt.Sprintf("Unknown configuration options: %q", out.UnusedKeys),
})
Expand All @@ -120,7 +120,7 @@ func (lh *logHandler) Initialize(ctx context.Context, params lsp.InitializeParam
for _, rawPath := range cfgOpts.ModulePaths {
modPath, err := resolvePath(rootDir, rawPath)
if err != nil {
jrpc2.PushNotify(ctx, "window/showMessage", &lsp.ShowMessageParams{
jrpc2.ServerFromContext(ctx).Notify(ctx, "window/showMessage", &lsp.ShowMessageParams{
Type: lsp.Warning,
Message: fmt.Sprintf("Ignoring module path %s: %s", rawPath, err),
})
Expand Down
6 changes: 3 additions & 3 deletions internal/langserver/progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func Begin(ctx context.Context, title string) error {
return nil
}

return jrpc2.PushNotify(ctx, "$/progress", lsp.ProgressParams{
return jrpc2.ServerFromContext(ctx).Notify(ctx, "$/progress", lsp.ProgressParams{
Token: token,
Value: lsp.WorkDoneProgressBegin{
Kind: "begin",
Expand All @@ -29,7 +29,7 @@ func Report(ctx context.Context, message string) error {
return nil
}

return jrpc2.PushNotify(ctx, "$/progress", lsp.ProgressParams{
return jrpc2.ServerFromContext(ctx).Notify(ctx, "$/progress", lsp.ProgressParams{
Token: token,
Value: lsp.WorkDoneProgressReport{
Kind: "report",
Expand All @@ -44,7 +44,7 @@ func End(ctx context.Context, message string) error {
return nil
}

return jrpc2.PushNotify(ctx, "$/progress", lsp.ProgressParams{
return jrpc2.ServerFromContext(ctx).Notify(ctx, "$/progress", lsp.ProgressParams{
Token: token,
Value: lsp.WorkDoneProgressEnd{
Kind: "end",
Expand Down

0 comments on commit c4ea46f

Please sign in to comment.