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

Migrate core to futures=0.3 #565

Merged
merged 22 commits into from
Jul 28, 2020
Merged

Migrate core to futures=0.3 #565

merged 22 commits into from
Jul 28, 2020

Conversation

tomusdrw
Copy link
Contributor

@tomusdrw tomusdrw commented Jul 22, 2020

This is the first step towards #485 (also see #422). The PR rewrites jsonrpc-core & jsonrpc-derive & jsonrpc-core-client (but not transports) to be compatible with futures=0.3.

jsonrpc-derive is limited to return either Result<_> or BoxFuture<Result<_>> (see WrapFuture trait), supporting custom future types would require a bit more work. Actually it would be best to check out if we can integrate it with async_trait, so that the implementations can simply define async functions.

The transports (servers) currently run the futures in compat mode, they should be updated as well.

@tomusdrw tomusdrw added the feat label Jul 22, 2020
@tomusdrw tomusdrw requested a review from ascjones July 22, 2020 10:26
@tomusdrw tomusdrw removed the feat label Jul 22, 2020
Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

Braver than me tackling this beast. Looks good, only a few insubstantial comments.

core-client/transports/Cargo.toml Outdated Show resolved Hide resolved
core-client/transports/src/lib.rs Show resolved Hide resolved
core-client/transports/src/lib.rs Show resolved Hide resolved
core-client/transports/src/lib.rs Show resolved Hide resolved
ws/src/metadata.rs Show resolved Hide resolved
core/src/calls.rs Show resolved Hide resolved
core/src/io.rs Outdated Show resolved Hide resolved
derive/src/rpc_trait.rs Show resolved Hide resolved
pubsub/src/subscription.rs Outdated Show resolved Hide resolved
derive/Cargo.toml Outdated Show resolved Hide resolved
@tomusdrw
Copy link
Contributor Author

@ascjones I believe I've addressed all of your comments now, would you mind taking another look?

Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM.

@tomusdrw tomusdrw merged commit 99bd064 into master Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants