Skip to content

Commit a1c3bbe

Browse files
authored
Rename jsonrpc-client to jsonrpc-core-client (paritytech#416)
* Fix test build * Rename jsonrpc-client to jsonrpc-core-client Because of crates.io collision with `jsonrpc_client` * Update README
1 parent 7b797ae commit a1c3bbe

File tree

16 files changed

+24
-21
lines changed

16 files changed

+24
-21
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace]
22
members = [
33
"core",
4-
"client",
4+
"core-client",
55
"http",
66
"ipc",
77
"derive",

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Transport-agnostic `core` and transport servers for `http`, `ipc`, `websockets`
1717

1818
## Sub-projects
1919
- [jsonrpc-core](./core) [![crates.io][core-image]][core-url]
20+
- [jsonrpc-core-client](./core-client) [![crates.io][core-client-image]][core-client-url]
2021
- [jsonrpc-http-server](./http) [![crates.io][http-server-image]][http-server-url]
2122
- [jsonrpc-ipc-server](./ipc) [![crates.io][ipc-server-image]][ipc-server-url]
2223
- [jsonrpc-tcp-server](./tcp) [![crates.io][tcp-server-image]][tcp-server-url]
@@ -28,6 +29,8 @@ Transport-agnostic `core` and transport servers for `http`, `ipc`, `websockets`
2829

2930
[core-image]: https://img.shields.io/crates/v/jsonrpc-core.svg
3031
[core-url]: https://crates.io/crates/jsonrpc-core
32+
[core-client-image]: https://img.shields.io/crates/v/jsonrpc-core-client.svg
33+
[core-client-url]: https://crates.io/crates/jsonrpc-core-client
3134
[http-server-image]: https://img.shields.io/crates/v/jsonrpc-http-server.svg
3235
[http-server-url]: https://crates.io/crates/jsonrpc-http-server
3336
[ipc-server-image]: https://img.shields.io/crates/v/jsonrpc-ipc-server.svg
@@ -101,7 +104,7 @@ fn main() {
101104
### Client support
102105

103106
```rust
104-
use jsonrpc_client::local;
107+
use jsonrpc_core_client::local;
105108
use jsonrpc_core::futures::future::{self, Future, FutureResult};
106109
use jsonrpc_core::{Error, IoHandler, Result};
107110
use jsonrpc_derive::rpc;

client/Cargo.toml renamed to core-client/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
authors = ["Parity Technologies <admin@parity.io>"]
33
description = "Transport agnostic JSON-RPC 2.0 client implementation."
4-
documentation = "https://docs.rs/jsonrpc-client/"
4+
documentation = "https://docs.rs/jsonrpc-core-client/"
55
edition = "2018"
66
homepage = "https://github.com/paritytech/jsonrpc"
77
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
88
license = "MIT"
9-
name = "jsonrpc-client"
9+
name = "jsonrpc-core-client"
1010
repository = "https://github.com/paritytech/jsonrpc"
1111
version = "11.0.0"
1212

@@ -27,7 +27,7 @@ serde_json = "1.0"
2727

2828
[dev-dependencies]
2929
jsonrpc-derive = { version = "11.0", path = "../derive" }
30-
jsonrpc-client = { version = "11.0", path = "." }
30+
jsonrpc-core-client = { version = "11.0", path = "." }
3131
serde = "1.0"
3232
tokio = "0.1"
3333

client/src/lib.rs renamed to core-client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ pub mod local {
285285
#[cfg(test)]
286286
mod tests {
287287
use futures::prelude::*;
288-
use jsonrpc_client::local;
288+
use jsonrpc_core_client::local;
289289
use jsonrpc_core::{IoHandler, Result};
290290
use jsonrpc_derive::rpc;
291291

derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ proc-macro-crate = "0.1.3"
2020

2121
[dev-dependencies]
2222
jsonrpc-core = { version = "11.0", path = "../core" }
23-
jsonrpc-client = { version = "11.0", path = "../client" }
23+
jsonrpc-core-client = { version = "11.0", path = "../core-client" }
2424
jsonrpc-pubsub = { version = "11.0", path = "../pubsub" }
2525
jsonrpc-tcp-server = { version = "11.0", path = "../tcp" }
2626
log = "0.4"

derive/examples/std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A simple example
22
#![deny(missing_docs)]
3-
use jsonrpc_client::local;
3+
use jsonrpc_core_client::local;
44
use jsonrpc_core::futures::future::{self, Future, FutureResult};
55
use jsonrpc_core::{Error, IoHandler, Result};
66
use jsonrpc_derive::rpc;

derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
//! Client Example
128128
//!
129129
//! ```
130-
//! use jsonrpc_client::local;
130+
//! use jsonrpc_core_client::local;
131131
//! use jsonrpc_core::futures::future::{self, Future, FutureResult};
132132
//! use jsonrpc_core::{Error, IoHandler, Result};
133133
//! use jsonrpc_derive::rpc;

derive/src/to_client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ pub fn generate_client_module(methods: &[MethodRegistration], item_trait: &syn::
3636
)
3737
})
3838
.unzip();
39-
let client_name = crate_name("jsonrpc-client")?;
39+
let client_name = crate_name("jsonrpc-core-client")?;
4040
Ok(quote! {
4141
/// The generated client module.
4242
pub mod gen_client {
43-
use #client_name as _jsonrpc_client;
43+
use #client_name as _jsonrpc_core_client;
4444
use super::*;
4545
use _jsonrpc_core::{
4646
Call, Error, ErrorCode, Id, MethodCall, Params, Request,
@@ -49,7 +49,7 @@ pub fn generate_client_module(methods: &[MethodRegistration], item_trait: &syn::
4949
use _jsonrpc_core::futures::{future, Future, Sink};
5050
use _jsonrpc_core::futures::sync::oneshot;
5151
use _jsonrpc_core::serde_json::{self, Value};
52-
use _jsonrpc_client::{RpcChannel, RpcError, RpcFuture, RpcMessage};
52+
use _jsonrpc_core_client::{RpcChannel, RpcError, RpcFuture, RpcMessage};
5353

5454
/// The Client.
5555
#[derive(Clone)]

derive/tests/run-pass/client_only.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern crate serde;
22
extern crate jsonrpc_core;
3-
extern crate jsonrpc_client;
3+
extern crate jsonrpc_core_client;
44
#[macro_use]
55
extern crate jsonrpc_derive;
66
extern crate log;

derive/tests/run-pass/pubsub-dependency-not-required-for-vanilla-rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern crate serde;
22
extern crate jsonrpc_core;
3-
extern crate jsonrpc_client;
3+
extern crate jsonrpc_core_client;
44
#[macro_use]
55
extern crate jsonrpc_derive;
66
extern crate log;

0 commit comments

Comments
 (0)