Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/http-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jsonrpsee-types = { workspace = true }
jsonrpsee-core = { workspace = true, features = ["client", "http-helpers"] }
rustls = { workspace = true, optional = true, features = ["logging", "std", "tls12", "ring"] }
rustls-platform-verifier = { workspace = true, optional = true }
serde = { workspace = true }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you remember why you added this feature everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I added serde/alloc because cargo hack CI runs with --no-default-features, and without it jsonrpsee-types fails to compile - serde's Cow and Box impls require the alloc feature when std isn't enabled. this was a latent issue that this PR's CI exposed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok sounds fair to me; I wonder why it came up now and not before hand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably because cargo hack is exercising --no-default-features + async-client (and other combos) that don’t get hit in the usual workspace test run. Also, CI is on rustc 1.92.0 now, which changes diagnostics formatting, so a few try build fixtures needed refresh

serde = { workspace = true, features = ["alloc"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["time"] }
Expand Down
4 changes: 4 additions & 0 deletions client/http-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ pub type HttpRequest<T = HttpBody> = jsonrpsee_core::http_helpers::Request<T>;
/// HTTP response with default body.
pub type HttpResponse<T = HttpBody> = jsonrpsee_core::http_helpers::Response<T>;

pub use jsonrpsee_core::middleware::layer::{RpcLogger, RpcLoggerLayer};
pub use jsonrpsee_core::middleware::{RpcServiceBuilder, RpcServiceT};
pub use transport::{HttpBackend, HttpTransportClient};

/// Custom TLS configuration.
#[cfg(feature = "tls")]
pub type CustomCertStore = rustls::ClientConfig;
Expand Down
2 changes: 1 addition & 1 deletion client/ws-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tracing-subscriber = { workspace = true }
jsonrpsee-test-utils = { path = "../../test-utils" }
tokio = { workspace = true, features = ["macros"] }
serde_json = { workspace = true }
serde = { workspace = true }
serde = { workspace = true, features = ["alloc"] }
rustls = { workspace = true, features = ["logging", "std", "tls12", "ring"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ workspace = true
async-trait = { workspace = true }
jsonrpsee-types = { workspace = true }
thiserror = { workspace = true }
serde = { workspace = true }
serde = { workspace = true, features = ["alloc"] }
serde_json = { workspace = true, features = ["std", "raw_value"] }
tracing = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hyper-util = { workspace = true, features = ["client", "client-legacy"]}
futures-channel = { workspace = true }
futures-util = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
serde = { workspace = true, features = ["alloc"] }
trybuild = { workspace = true }
tokio = { workspace = true, features = ["rt", "macros"] }
tower = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error: use of deprecated method `DeprecatedClient::async_method`: please use `new_method` instead
--> $DIR/rpc_deprecated_method.rs:63:20
--> tests/ui/incorrect/rpc/rpc_deprecated_method.rs:63:20
|
63 | assert_eq!(client.async_method().await.unwrap(), 16);
| ^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/rpc_deprecated_method.rs:4:9
--> tests/ui/incorrect/rpc/rpc_deprecated_method.rs:4:9
|
4 | #![deny(warnings)]
4 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(deprecated)]` implied by `#[deny(warnings)]`
4 changes: 2 additions & 2 deletions proc-macros/tests/ui/incorrect/rpc/rpc_empty_bounds.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0277]: the trait bound `<Conf as Config>::Hash: DeserializeOwned` is not satisfied
error[E0277]: the trait bound `<Conf as Config>::Hash: serde::de::DeserializeOwned` is not satisfied
--> tests/ui/incorrect/rpc/rpc_empty_bounds.rs:9:1
|
9 | #[rpc(server, client, namespace = "foo", client_bounds(), server_bounds())]
Expand All @@ -15,7 +15,7 @@ note: required by a bound in `request`
| ^^^^^^^^^^^^^^^^ required by this bound in `ClientT::request`
= note: this error originates in the attribute macro `rpc` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<Conf as Config>::Hash: Serialize` is not satisfied
error[E0277]: the trait bound `<Conf as Config>::Hash: serde::Serialize` is not satisfied
--> tests/ui/incorrect/rpc/rpc_empty_bounds.rs:9:1
|
9 | #[rpc(server, client, namespace = "foo", client_bounds(), server_bounds())]
Expand Down
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hyper = { workspace = true }
hyper-util = { workspace = true, features = ["server-auto", "tokio", "client-legacy"] }
http-body-util = { workspace = true }
tracing = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive", "alloc"] }
serde_json = { workspace = true }
soketto = { workspace = true, features = ["http"] }
tokio = { workspace = true, features = ["net", "rt-multi-thread", "macros", "time"] }
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hyper = { workspace = true }
hyper-util = { workspace = true, features = ["http1", "client", "client-legacy"] }
jsonrpsee = { path = "../jsonrpsee", features = ["server", "client-core", "http-client", "ws-client", "macros"] }
jsonrpsee-test-utils = { path = "../test-utils" }
serde = { workspace = true }
serde = { workspace = true, features = ["alloc"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
tokio-stream = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ workspace = true

[dependencies]
http = { workspace = true }
serde = { workspace = true }
serde = { workspace = true, features = ["alloc"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
Loading