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

Bump jsonrpsee from 0.22.5 to 0.23.0 in /deepwell #1954

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 10, 2024

Bumps jsonrpsee from 0.22.5 to 0.23.0.

Release notes

Sourced from jsonrpsee's releases.

v0.23.0

[v0.23.0] - 2024-06-07

This is a new breaking release, and let's go through the changes.

hyper v1.0

jsonrpsee has been upgraded to use hyper v1.0 and this mainly impacts users that are using the low-level API and rely on the hyper::service::make_service_fn which has been removed, and from now on you need to manage the socket yourself.

The hyper::service::make_service_fn can be replaced by the following example template:

async fn start_server() {
  let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
loop {
let sock = tokio::select! {
res = listener.accept() => {
match res {
Ok((stream, _remote_addr)) => stream,
Err(e) => {
tracing::error!("failed to accept v4 connection: {:?}", e);
continue;
}
}
}
_ = per_conn.stop_handle.clone().shutdown() => break,
};
let svc = tower::service_fn(move |req: hyper::Request<hyper::body::Incoming>| {
  let mut jsonrpsee_svc = svc_builder
    .set_rpc_middleware(rpc_middleware)
    .build(methods, stop_handle);
  // https://github.com/rust-lang/rust/issues/102211 the error type can't be inferred
  // to be `Box<dyn std::error::Error + Send + Sync>` so we need to convert it to a concrete type
  // as workaround.
  jsonrpsee_svc
    .call(req)
    .await
    .map_err(|e| anyhow::anyhow!("{:?}", e))
});
tokio::spawn(jsonrpsee::server::serve_with_graceful_shutdown(
sock,
svc,
stop_handle.clone().shutdown(),
));

}
</tr></table>

... (truncated)

Changelog

Sourced from jsonrpsee's changelog.

[v0.23.0] - 2024-06-07

This is a new breaking release, and let's go through the changes.

hyper v1.0

jsonrpsee has been upgraded to use hyper v1.0 and this mainly impacts users that are using the low-level API and rely on the hyper::service::make_service_fn which has been removed, and from now on you need to manage the socket yourself.

The hyper::service::make_service_fn can be replaced by the following example template:

async fn start_server() {
  let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
loop {
let sock = tokio::select! {
res = listener.accept() => {
match res {
Ok((stream, _remote_addr)) => stream,
Err(e) => {
tracing::error!("failed to accept v4 connection: {:?}", e);
continue;
}
}
}
_ = per_conn.stop_handle.clone().shutdown() => break,
};
let svc = tower::service_fn(move |req: hyper::Request&lt;hyper::body::Incoming&gt;| {
  let mut jsonrpsee_svc = svc_builder
    .set_rpc_middleware(rpc_middleware)
    .build(methods, stop_handle);
  // https://github.com/rust-lang/rust/issues/102211 the error type can't be inferred
  // to be `Box&lt;dyn std::error::Error + Send + Sync&gt;` so we need to convert it to a concrete type
  // as workaround.
  jsonrpsee_svc
    .call(req)
    .await
    .map_err(|e| anyhow::anyhow!(&quot;{:?}&quot;, e))
});
tokio::spawn(jsonrpsee::server::serve_with_graceful_shutdown(
sock,
svc,
stop_handle.clone().shutdown(),
));

}
}
</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [jsonrpsee](https://github.com/paritytech/jsonrpsee) from 0.22.5 to 0.23.0.
- [Release notes](https://github.com/paritytech/jsonrpsee/releases)
- [Changelog](https://github.com/paritytech/jsonrpsee/blob/master/CHANGELOG.md)
- [Commits](paritytech/jsonrpsee@v0.22.5...v0.23.0)

---
updated-dependencies:
- dependency-name: jsonrpsee
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from emmiegit as a code owner June 10, 2024 06:33
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jun 10, 2024
@emmiegit
Copy link
Member

Error is:

#18 355.1 error[E0593]: closure is expected to take 3 arguments, but it takes 2 arguments
#18 355.1    --> src/api.rs:147:20
#18 355.1     |
#18 355.1 147 |             module.register_async_method($name, |params, state| async move {
#18 355.1     |                    ^^^^^^^^^^^^^^^^^^^^^        --------------- takes 2 arguments
#18 355.1     |                    |
#18 355.1     |                    expected closure that takes 3 arguments
#18 355.1 ...
#18 355.1 176 |     register!("ping", ping);
#18 355.1     |     ----------------------- in this macro invocation
#18 355.1     |
#18 355.1     = note: this error originates in the macro `register` (in Nightly builds, run with -Z macro-backtrace for more info)

Which seems to cause:

#18 355.1 
#18 355.1 error[E0609]: no field `database` on type `Arc<_, _>`
#18 355.1    --> src/api.rs:160:22
#18 355.1     |
#18 355.1 160 |                     .database
#18 355.1     |                      ^^^^^^^^ unknown field
#18 355.1 ...
#18 355.1 176 |     register!("ping", ping);
#18 355.1     |     ----------------------- in this macro invocation
#18 355.1     |
#18 355.1     = note: this error originates in the macro `register` (in Nightly builds, run with -Z macro-backtrace for more info)

Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 17, 2024

Superseded by #1960.

@dependabot dependabot bot closed this Jun 17, 2024
@dependabot dependabot bot deleted the dependabot/cargo/deepwell/jsonrpsee-0.23.0 branch June 17, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant