-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve compiler error when serde is not a dependency of user project (#…
…481) (#498) Use `serde` directly instead of ask for user of the library to add it as a dependency. Tests are modified since this is a ui change. The doc comment gives an example using `#[rpc(server)]` instead of original `#[rpc]`, telling users that this attribute has an option to be used to configure it.
- Loading branch information
Showing
19 changed files
with
48 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
extern crate jsonrpc_core_client; | ||
#[macro_use] | ||
|
1 change: 0 additions & 1 deletion
1
derive/tests/run-pass/pubsub-dependency-not-required-for-vanilla-rpc.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
extern crate jsonrpc_core_client; | ||
#[macro_use] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: Invalid attribute parameter(s): 'Xalias'. Expected 'alias' | ||
--> $DIR/attr-invalid-meta-list-names.rs:8:2 | ||
| | ||
8 | /// Returns a protocol version | ||
| _____^ | ||
9 | | #[rpc(name = "protocolVersion", Xalias("alias"))] | ||
10 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ | ||
--> $DIR/attr-invalid-meta-list-names.rs:7:2 | ||
| | ||
7 | /// Returns a protocol version | ||
| _____^ | ||
8 | | #[rpc(name = "protocolVersion", Xalias("alias"))] | ||
9 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: Invalid attribute parameter(s): 'Xmeta'. Expected 'meta, raw_params' | ||
--> $DIR/attr-invalid-meta-words.rs:8:2 | ||
| | ||
8 | /// Returns a protocol version | ||
| _____^ | ||
9 | | #[rpc(name = "protocolVersion", Xmeta)] | ||
10 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ | ||
--> $DIR/attr-invalid-meta-words.rs:7:2 | ||
| | ||
7 | /// Returns a protocol version | ||
| _____^ | ||
8 | | #[rpc(name = "protocolVersion", Xmeta)] | ||
9 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: Invalid attribute parameter(s): 'Xname'. Expected 'name, returns' | ||
--> $DIR/attr-invalid-name-values.rs:8:2 | ||
| | ||
8 | /// Returns a protocol version | ||
| _____^ | ||
9 | | #[rpc(Xname = "protocolVersion")] | ||
10 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ | ||
--> $DIR/attr-invalid-name-values.rs:7:2 | ||
| | ||
7 | /// Returns a protocol version | ||
| _____^ | ||
8 | | #[rpc(Xname = "protocolVersion")] | ||
9 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: rpc attribute should have a name e.g. `name = "method_name"` | ||
--> $DIR/attr-missing-rpc-name.rs:8:2 | ||
| | ||
8 | /// Returns a protocol version | ||
| _____^ | ||
9 | | #[rpc] | ||
10 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ | ||
--> $DIR/attr-missing-rpc-name.rs:7:2 | ||
| | ||
7 | /// Returns a protocol version | ||
| _____^ | ||
8 | | #[rpc] | ||
9 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
error: Expected only a single rpc attribute per method | ||
--> $DIR/multiple-rpc-attributes.rs:8:2 | ||
--> $DIR/multiple-rpc-attributes.rs:7:2 | ||
| | ||
8 | /// Returns a protocol version | ||
7 | /// Returns a protocol version | ||
| _____^ | ||
9 | | #[rpc(name = "protocolVersion")] | ||
10 | | #[rpc(name = "protocolVersionAgain")] | ||
11 | | fn protocol_version(&self) -> Result<String>; | ||
8 | | #[rpc(name = "protocolVersion")] | ||
9 | | #[rpc(name = "protocolVersionAgain")] | ||
10 | | fn protocol_version(&self) -> Result<String>; | ||
| |_________________________________________________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate serde; | ||
extern crate jsonrpc_core; | ||
#[macro_use] | ||
extern crate jsonrpc_derive; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
error: Maximum supported number of params is 16 | ||
--> $DIR/too-many-params.rs:8:2 | ||
--> $DIR/too-many-params.rs:7:2 | ||
| | ||
8 | /// Has too many params | ||
7 | /// Has too many params | ||
| _____^ | ||
9 | | #[rpc(name = "tooManyParams")] | ||
10 | | fn to_many_params( | ||
11 | | &self, | ||
12 | | a: u64, b: u64, c: u64, d: u64, e: u64, f: u64, g: u64, h: u64, i: u64, j: u64, | ||
13 | | k: u64, l: u64, m: u64, n: u64, o: u64, p: u64, q: u64, | ||
14 | | ) -> Result<String>; | ||
8 | | #[rpc(name = "tooManyParams")] | ||
9 | | fn to_many_params( | ||
10 | | &self, | ||
11 | | a: u64, b: u64, c: u64, d: u64, e: u64, f: u64, g: u64, h: u64, i: u64, j: u64, | ||
12 | | k: u64, l: u64, m: u64, n: u64, o: u64, p: u64, q: u64, | ||
13 | | ) -> Result<String>; | ||
| |________________________^ |