Skip to content

Commit

Permalink
embed jsonrpc types from jsonrpc-core crate (#2801)
Browse files Browse the repository at this point in the history
We should not depend on jsonrpc-core anymore:

* The project just announced it's no longer actively maintained[^1],
  preferring their new implementation in `jsonrpsee`.
* The types are too strict: we would benefit from removing some
  `#[serde(deny_unknown_fields)]` annotations to allow language
  servers that disrespect the spec[^2].
* We don't use much of the project. Just the types out of core.
  These are easy to embed directly into the `helix-lsp` crate.

[^1]: paritytech/jsonrpc#674
[^2]: #2786
  • Loading branch information
the-mikedavis authored Jun 18, 2022
1 parent b13e534 commit 45ce1eb
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 19 deletions.
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion helix-lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ helix-core = { version = "0.6", path = "../helix-core" }
anyhow = "1.0"
futures-executor = "0.3"
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
jsonrpc-core = { version = "18.0", default-features = false } # don't pull in all of futures
log = "0.4"
lsp-types = { version = "0.93", features = ["proposed"] }
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion helix-lsp/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::{
jsonrpc,
transport::{Payload, Transport},
Call, Error, OffsetEncoding, Result,
};

use anyhow::anyhow;
use helix_core::{find_root, ChangeSet, Rope};
use jsonrpc_core as jsonrpc;
use lsp_types as lsp;
use serde::Deserialize;
use serde_json::Value;
Expand Down
Loading

0 comments on commit 45ce1eb

Please sign in to comment.