-
Notifications
You must be signed in to change notification settings - Fork 125
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
Remove sync api jsonrpsee #699
Conversation
node-api/src/error/mod.rs
Outdated
@@ -8,7 +8,7 @@ | |||
|
|||
//! General node-api Error implementation. | |||
|
|||
use alloc::{string::String, vec::Vec}; | |||
use alloc::{boxed::Box, string::String, vec::Vec}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy warning - error was too long for being unconstrained.
@@ -30,58 +30,6 @@ use sp_version::RuntimeVersion; | |||
/// Api to talk with substrate-nodes | |||
/// | |||
/// It is generic over the `Request` trait, so you can use any rpc-backend you like. | |||
/// | |||
/// # Custom Client Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the custom client example, because it was not easily possible to make it compile for both sync and async features and is already described in the README https://github.com/scs/substrate-api-client#rpc-client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
6e512a8
to
16109de
Compare
fix tests update ci cargo fmt fix compile error fix clippy remove compile error and ensure jsonrpsee is only exported when not sync api clean up dependencies move keystore_tests.rs to sync examples update .lock remove unneeded deps clean up sync example toml clean up async example toml remove sync part from async exmaple speed up example add box around dynamic error values readd spacing use async code smart speed up example make author_test actually async add sleep add some sleeps to avoid future error remove obsolete async naming update README update README update CI
As decided in #692, this PR removes the sync interface for the jsonrpsee client. Because now not all feauters are compatible with each other anymore (jsonrpsee may not be built with sync interface), the examples were split up between sync and async. This allows to distinguish the build and test them separately.
The following has been changed:
- changed jsonrpsee examples to purely async ones
- moved ws und tungstentite examples to the sync folder since they officially only support sync.
- removed futures from jsonrpsee because tokio should be used instead for consistency
block_on
because the default version is async. Since the api behind it is a dummy client, block_on should be fine.closes #692