Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to rust 2021, macro tweak to compile #650

Closed
wants to merge 2 commits into from
Closed
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
7 changes: 4 additions & 3 deletions core-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-core-client"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Transport agnostic JSON-RPC 2.0 client implementation."
documentation = "https://docs.rs/jsonrpc-core-client/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-core-client"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

categories = [
"asynchronous",
Expand Down
7 changes: 4 additions & 3 deletions core-client/transports/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-client-transports"
version = "18.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably bump the major versions everywhere due to different compiler requirements.

Copy link
Author

Choose a reason for hiding this comment

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

do you mean minor or patch? 18.1.0 makes sense to me, as its compatible with 18.0.0
maybe even just 18.0.1 as this doesn't effect the behavior of the program

Copy link
Contributor

Choose a reason for hiding this comment

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

I actually really meant major. The thing is that we now suddenly require everyone to use a specific Rust compiler version which IMHO is a breaking change. But I'm not a semver expert, maybe @dvdplm has some suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

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

MSRV changes are generally considered breaking. v19! :)

Copy link
Author

Choose a reason for hiding this comment

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

Oh well, I can do that here, sure! But I know that many do not do this (I put in a lot of PRs across parity for this, and it so far has not been)
Happy to update across the board and reference this thread to justify.

Do note that it's not universally agreed that MSVR bump = breaking change.

authors = ["Parity Technologies <admin@parity.io>"]
description = "Transport agnostic JSON-RPC 2.0 client implementation."
documentation = "https://docs.rs/jsonrpc-client-transports/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-client-transports"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

categories = [
"asynchronous",
Expand Down
7 changes: 4 additions & 3 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-core"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Transport agnostic rust implementation of JSON-RPC 2.0 Specification."
documentation = "https://docs.rs/jsonrpc-core/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-core"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

categories = [
"asynchronous",
Expand Down
7 changes: 4 additions & 3 deletions derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-derive"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
documentation = "https://docs.rs/jsonrpc-derive/"
description = "High level, typed wrapper for `jsonrpc-core`"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-derive"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[lib]
proc-macro = true
Expand Down
6 changes: 3 additions & 3 deletions derive/src/to_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ pub fn generate_client_module(

/// The Client.
#[derive(Clone)]
pub struct Client#generics {
pub struct Client #generics {
inner: TypedClient,
#(#markers_decl),*
}

impl#generics Client#generics
impl #generics Client #generics
where
#(#where_clause),*
{
Expand All @@ -78,7 +78,7 @@ pub fn generate_client_module(
#(#client_methods)*
}

impl#generics From<RpcChannel> for Client#generics
impl #generics From<RpcChannel> for Client #generics

Choose a reason for hiding this comment

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

What would happen if you did not make these whitespace changes?

Copy link
Member

Choose a reason for hiding this comment

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

where
#(#where_clause2),*
{
Expand Down
7 changes: 4 additions & 3 deletions http/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-http-server"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Rust http server using JSONRPC 2.0."
documentation = "https://docs.rs/jsonrpc-http-server/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "server"]
license = "MIT"
name = "jsonrpc-http-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
futures = "0.3"
Expand Down
7 changes: 4 additions & 3 deletions ipc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-ipc-server"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "IPC server for JSON-RPC"
documentation = "https://docs.rs/jsonrpc-ipc-server/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-ipc-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
futures = "0.3"
Expand Down
7 changes: 4 additions & 3 deletions pubsub/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-pubsub"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Publish-Subscribe extension for jsonrpc."
documentation = "https://docs.rs/jsonrpc-pubsub/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "macros"]
license = "MIT"
name = "jsonrpc-pubsub"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
futures = { version = "0.3", features = ["thread-pool"] }
Expand Down
7 changes: 4 additions & 3 deletions server-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "jsonrpc-server-utils"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Server utils for jsonrpc-core crate."
documentation = "https://docs.rs/jsonrpc-server-utils/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-server-utils"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
bytes = "1.0"
Expand Down
7 changes: 4 additions & 3 deletions stdio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-stdio-server"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "STDIN/STDOUT server for JSON-RPC"
documentation = "https://docs.rs/jsonrpc-stdio-server/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-stdio-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
futures = "0.3"
Expand Down
7 changes: 4 additions & 3 deletions tcp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-tcp-server"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "TCP/IP server for JSON-RPC"
documentation = "https://docs.rs/jsonrpc-tcp-server/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-tcp-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
jsonrpc-core = { version = "18.0.0", path = "../core" }
Expand Down
7 changes: 4 additions & 3 deletions test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-test"
description = "Simple test framework for JSON-RPC."
version = "18.0.0"
description = "Simple test framework for JSON-RPC."
documentation = "https://docs.rs/jsonrpc-test/"
authors = ["Tomasz Drwięga <tomasz@parity.io>"]
license = "MIT"
homepage = "https://github.com/paritytech/jsonrpc"
repository = "https://github.com/paritytech/jsonrpc"
documentation = "https://docs.rs/jsonrpc-test/"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
jsonrpc-core = { version = "18.0.0", path = "../core" }
Expand Down
7 changes: 4 additions & 3 deletions ws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "jsonrpc-ws-server"
version = "18.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
description = "WebSockets server for JSON-RPC"
documentation = "https://docs.rs/jsonrpc-ws-server/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-ws-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "18.0.0"
edition = "2021"
rust-version = "1.56.1"

[dependencies]
futures = "0.3"
Expand Down