1
0
Fork 0
mirror of https://github.com/sourcegraph/jsonrpc2.git synced 2026-08-18 02:58:12 +02:00
Commit graph

114 commits

Author SHA1 Message Date
Geoffrey
ef3958a4a6
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 13:04:07 +00:00
Geoffrey
d46ed886f3
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 12:07:57 +00:00
Geoffrey
9019f6e600
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 11:13:40 +00:00
Geoffrey
be4a8725ae
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 10:20:48 +00:00
Geoffrey
36e5598e7f
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 09:29:46 +00:00
Geoffrey
16f26d21b0
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 08:40:35 +00:00
Geoffrey
ce09e50023
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 07:53:24 +00:00
Geoffrey
d4b220e45b
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 07:07:59 +00:00
Geoffrey
f0930690df
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 06:25:03 +00:00
Geoffrey
78318483e0
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 05:43:54 +00:00
Geoffrey
a24a6a9b5b
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 05:04:41 +00:00
Geoffrey
23e201d6e6
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 04:27:11 +00:00
Geoffrey
63f1765fda
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 03:51:24 +00:00
Geoffrey
96540da979
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 03:17:24 +00:00
Geoffrey
6e67b435e1
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 02:45:10 +00:00
Geoffrey
635095dfaf
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 02:14:54 +00:00
Geoffrey
178d26be02
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 01:46:24 +00:00
Geoffrey
db6ba50b76
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 01:19:41 +00:00
Geoffrey
a06c2fe08d
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 00:55:02 +00:00
Geoffrey
76bd566dc2
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 00:32:03 +00:00
Geoffrey
8f5e8e6e34
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-07-01 00:10:48 +00:00
Geoffrey
e1dfb8dc52
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 23:51:24 +00:00
Geoffrey
91c0ad4dc1
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 23:33:34 +00:00
Geoffrey
ac0aba9029
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 23:17:37 +00:00
Geoffrey
18aa560cca
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 23:03:30 +00:00
Geoffrey
b976e9d75e
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 22:51:17 +00:00
Geoffrey
2c3d9920c6
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 22:40:44 +00:00
Geoffrey
16f236a529
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 22:31:49 +00:00
Geoffrey
b84e21cca7
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 22:25:06 +00:00
Geoffrey
b1c1c177b0
Fix for CI failure on go-fix-modernize--270b1737-ed47-45a7-86f7-80feb79e95f9 2026-06-30 22:20:08 +00:00
Geoffrey
3d270f1593
go: upgrade to Go 1.26.4 and run go fix ./... 2026-06-30 20:26:31 +00:00
dependabot[bot]
4756698b1e
Bump actions/checkout from 5 to 6 in the github-actions group (#93) 2025-12-02 09:01:38 +02:00
dependabot[bot]
ef3ea8b2ea
Bump actions/setup-go from 5 to 6 in the github-actions group (#92)
Bumps the github-actions group with 1 update: [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-go` from 5 to 6
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-02 20:55:33 +02:00
dependabot[bot]
3c4c92ad61
Bump actions/checkout from 4 to 5 in the github-actions group (#91)
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 13:36:38 +02:00
Sam Herrmann
ddb146fd0d
Cancel Handler context when connection closes (#90) 2025-08-19 16:19:52 +02:00
Kevin Gillette
2cc94179e1
transparently simplify control flow (#83) 2025-02-17 16:55:54 +02:00
Noah S-C
534fd43609
Merge pull request #80 from sourcegraph/nsc/lsifgo-to-scipgo
chore: use scip-go instead of lsif-go for precise indexing in CI
2024-02-23 16:31:37 +00:00
Noah S-C
4963d1c241 chore: use scip-go instead of lsif-go for precise indexing in CI 2024-02-23 15:34:49 +00:00
dependabot[bot]
dd69e185fa
Bump the github-actions group with 2 updates (#79)
Updates `actions/checkout` from 1 to 4

Updates `actions/setup-go` from 2 to 5

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 12:16:40 +02:00
Joyce
bf47ec21a6
ci: Create dependabot.yml (#78)
Signed-off-by: Joyce <joycebrum@google.com>
2024-01-10 12:06:38 +02:00
Will Dollman
cd64a673da
Merge pull request #75 from diogoteles08/patch-1
Docs: Create Security Policy
2023-09-25 12:04:20 +01:00
Will Dollman
943e53c8e9
Update SECURITY.md
Co-authored-by: Vincent <evict@users.noreply.github.com>
2023-09-25 11:53:41 +01:00
Will Dollman
e4e2e6324c Update security policy to use email for reporting 2023-09-25 11:50:00 +01:00
Diogo Teles Sant'Anna
510183e882
Create Security Policy 2023-09-11 14:51:22 -03:00
Diogo Teles Sant'Anna
8a0bf06edf
ci: set minimal permissions to GitHub workflows (#73)
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
2023-08-30 09:07:57 +02:00
Fazlul Shahriar
b9c1fbdb96
Fix logging of received response messages (#71)
As documented: OnRecv causes all requests received on conn to invoke
f(req, nil) and all responses to invoke f(req, resp).

Since OnRecv is called with both *Request and *Response being non-nil
when we're handling a response, we need to check that *Response is
non-nil before we check *Request is non-nil. This change just swaps the
two cases in the switch statement to fix the issue. For consistency,
I've swapped the cases for OnSend also, even when it's not needed.
2023-07-14 13:00:57 +02:00
Keegan Carruthers-Smith
5d80b29f44
conn: do not lock sending when closing (#70)
The sending mutex may be blocked due to the underlying conn blocking. If
that happens then we can't call close since close also attempts to hold
the sending mutex. Sending mutex is only used for serializing sends and
doesn't protect the fields close reads/writes. I believe we introduced
locking it so we would return ErrClosed. This commit instead introduces
a check in send which rechecks if we have since closed while attempting
to send.

Test Plan: expanded the test coverage
2023-06-07 08:40:20 +02:00
Sam Herrmann
040dc22f8a
Add package example test (#68) 2023-03-01 06:46:15 +02:00
Sam Herrmann
ae88a5e7c0
Always omit params member from request when empty (#67)
With this commit, the JSON encoding of `Request` always omits the params
member when calling `Conn.Call`, `Conn.DispatchCall`, or `Conn.Notify`
with the `params` argument set to `nil`. This change also removes the
`OmitNilParams` call option that was added in commit 8012d496 (#62).

As of this commit, if users desire to send a JSON-RPC request with a
`params` value of `null`, then they may do so by explicitly setting the
`params` argument of `Conn.Call`/`Conn.DispatchCall`/`Conn.Notify` to
`json.RawMessage("null")`.
2023-02-22 10:53:44 +02:00
Sam Herrmann
6864d8cc6d
Omit data field from error when empty (#66)
The JSON-RPC 2.0 specification allows the data member of an error object
to be omitted. Before this commit, if Error.Data was nil then the JSON
encoding was "null". That means that the data member was included in
every JSON-RPC error object, even when the data member was not
explicitly set.

This commit adds the omitempty struct tag to the Error.Data field,
meaning that the data member is omitted from the JSON encoding unless
explicitly set with the Error.SetError() method. Beware that this is a
breaking change for clients that may have strict null checks on the data
member.
2023-02-12 14:52:17 +02:00