From 3cca140822c63b6a1343da79a58ed68c39f931ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 07:26:43 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/creachadair/jrpc2 from 0.17.0 to 0.18.0 Bumps [github.com/creachadair/jrpc2](https://github.com/creachadair/jrpc2) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/creachadair/jrpc2/releases) - [Commits](https://github.com/creachadair/jrpc2/compare/v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: github.com/creachadair/jrpc2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1a445760..77092423 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg v1.0.0 - github.com/creachadair/jrpc2 v0.17.0 + github.com/creachadair/jrpc2 v0.18.0 github.com/fsnotify/fsnotify v1.4.9 github.com/google/go-cmp v0.5.6 github.com/google/uuid v1.2.0 // indirect diff --git a/go.sum b/go.sum index a89e43f8..40cebf81 100644 --- a/go.sum +++ b/go.sum @@ -73,8 +73,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.17.0 h1:F+wTIeYVndkoE6CC9ikJN/jtw17AbbskSLD+MZf2ArI= -github.com/creachadair/jrpc2 v0.17.0/go.mod h1:gaeysmTjY/kHSaCEjxF1pHXl8bc0X5otQPnQiA6r9Xk= +github.com/creachadair/jrpc2 v0.18.0 h1:eri9qZeiVwPSVTLqUk0MYixlzdBMdaEBi9AgrihuGIA= +github.com/creachadair/jrpc2 v0.18.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= From f2350b17d004fca64e5f375d17a694c528635ce9 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 14 Jun 2021 09:08:01 +0100 Subject: [PATCH 2/2] reflect breaking API changes --- internal/langserver/handlers/service.go | 2 +- internal/langserver/langserver.go | 6 ++++-- internal/langserver/session/types.go | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/langserver/handlers/service.go b/internal/langserver/handlers/service.go index 2d4d1828..16d5883b 100644 --- a/internal/langserver/handlers/service.go +++ b/internal/langserver/handlers/service.go @@ -416,7 +416,7 @@ func (svc *service) Assigner() (jrpc2.Assigner, error) { return convertMap(m), nil } -func (svc *service) Finish(status jrpc2.ServerStatus) { +func (svc *service) Finish(_ jrpc2.Assigner, status jrpc2.ServerStatus) { if status.Closed() || status.Err != nil { svc.logger.Printf("session stopped unexpectedly (err: %v)", status.Err) } diff --git a/internal/langserver/langserver.go b/internal/langserver/langserver.go index 545688a5..b89b8657 100644 --- a/internal/langserver/langserver.go +++ b/internal/langserver/langserver.go @@ -160,8 +160,10 @@ func Server(svc server.Service, opts *jrpc2.ServerOptions) (*singleServer, error } return &singleServer{ - srv: jrpc2.NewServer(assigner, opts), - finishFunc: svc.Finish, + srv: jrpc2.NewServer(assigner, opts), + finishFunc: func(status jrpc2.ServerStatus) { + svc.Finish(assigner, status) + }, }, nil } diff --git a/internal/langserver/session/types.go b/internal/langserver/session/types.go index 8e25ea1d..7575676d 100644 --- a/internal/langserver/session/types.go +++ b/internal/langserver/session/types.go @@ -9,7 +9,7 @@ import ( type Session interface { Assigner() (jrpc2.Assigner, error) - Finish(jrpc2.ServerStatus) + Finish(jrpc2.Assigner, jrpc2.ServerStatus) SetLogger(*log.Logger) }