dbus2 / zbus

Rust D-Bus crate.
Other
341 stars 75 forks source link

[bug] test suite failing for all features #903

Closed werdahias closed 1 month ago

werdahias commented 1 month ago

In Debian we test all features separately and all enabled . However, even the features where tests worked on 3.x fail now:

error[E0106]: missing lifetime specifier
  --> src/connection/socket/vsock.rs:54:34
   |
54 |     type ReadHalf = tokio_vsock::ReadHalf;
   |                                  ^^^^^^^^ expected named lifetime parameter
   |
help: consider introducing a named lifetime parameter
   |
54 |     type ReadHalf<'a> = tokio_vsock::ReadHalf<'a>;
   |                  ++++                        ++++

error[E0106]: missing lifetime specifier
  --> src/connection/socket/vsock.rs:55:35
   |
55 |     type WriteHalf = tokio_vsock::WriteHalf;
   |                                   ^^^^^^^^^ expected named lifetime parameter
   |
help: consider introducing a named lifetime parameter
   |
55 |     type WriteHalf<'a> = tokio_vsock::WriteHalf<'a>;
   |                   ++++                         ++++

error[E0726]: implicit elided lifetime not allowed here
  --> src/connection/socket/vsock.rs:66:26
   |
66 | impl super::ReadHalf for tokio_vsock::ReadHalf {
   |                          ^^^^^^^^^^^^^^^^^^^^^ expected lifetime parameter
   |
help: indicate the anonymous lifetime
   |
66 | impl super::ReadHalf for tokio_vsock::ReadHalf<'_> {
   |                                               ++++

error[E0726]: implicit elided lifetime not allowed here
  --> src/connection/socket/vsock.rs:83:27
   |
83 | impl super::WriteHalf for tokio_vsock::WriteHalf {
   |                           ^^^^^^^^^^^^^^^^^^^^^^ expected lifetime parameter
   |
help: indicate the anonymous lifetime
   |
83 | impl super::WriteHalf for tokio_vsock::WriteHalf<'_> {
   |                                                 ++++

warning: hidden lifetime parameters in types are deprecated
  --> src/connection/socket/vsock.rs:54:34
   |
54 |     type ReadHalf = tokio_vsock::ReadHalf;
   |                     -------------^^^^^^^^
   |                     |
   |                     expected lifetime parameter
   |
note: the lint level is defined here
  --> src/lib.rs:1:9
   |
1  | #![deny(rust_2018_idioms)]
   |         ^^^^^^^^^^^^^^^^
   = note: `#[warn(elided_lifetimes_in_paths)]` implied by `#[warn(rust_2018_idioms)]`
help: indicate the anonymous lifetime
   |
54 |     type ReadHalf = tokio_vsock::ReadHalf<'_>;
   |                                          ++++

warning: hidden lifetime parameters in types are deprecated
  --> src/connection/socket/vsock.rs:55:35
   |
55 |     type WriteHalf = tokio_vsock::WriteHalf;
   |                      -------------^^^^^^^^^
   |                      |
   |                      expected lifetime parameter
   |
help: indicate the anonymous lifetime
   |
55 |     type WriteHalf = tokio_vsock::WriteHalf<'_>;
   |                                            ++++

error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> src/address/transport/mod.rs:146:39
    |
146 |             Transport::Vsock(addr) => VsockStream::connect(addr.cid(), addr.port())
    |                                       ^^^^^^^^^^^^^^^^^^^^ ----------  ----------- unexpected argument of type `u32`
    |                                                            |
    |                                                            expected `VsockAddr`, found `u32`
    |
note: associated function defined here
   --> /usr/share/cargo/registry/tokio-vsock-0.5.0/src/stream.rs:76:18
    |
76  |     pub async fn connect(addr: VsockAddr) -> Result<Self> {
    |                  ^^^^^^^
help: remove the extra argument
    |
146 -             Transport::Vsock(addr) => VsockStream::connect(addr.cid(), addr.port())
146 +             Transport::Vsock(addr) => VsockStream::connect(/* VsockAddr */)
    |

warning: unused import: `AsyncReadExt`
  --> src/connection/socket/vsock.rs:68:25
   |
68 |         use tokio::io::{AsyncReadExt, ReadBuf};
   |                         ^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `tokio::io::AsyncWriteExt`
  --> src/connection/socket/vsock.rs:90:13
   |
90 |         use tokio::io::AsyncWriteExt;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0061, E0106, E0726.
For more information about an error, try `rustc --explain E0061`.
warning: `zbus` (lib) generated 4 warnings
error: could not compile `zbus` (lib) due to 5 previous errors; 4 warnings emitted

This is for the tokio-vsock feature for example. To me this looks like missing feature guards, as even the default feature fails on its own.

zeenix commented 1 month ago

In Debian we test all features separately and all enabled . However, even the features where tests worked on 3.x fail now:

This is very strange for multiple reasons:

Are you sure, you've not modified/patched zbus on your end?

zeenix commented 1 month ago

cc @elmarco

plugwash commented 1 month ago

This was a screwup on the Debian side. Not an upstream problem. We were indeed patching the tokio-vsock dependency.

I have a patch to make zbus build with the new version of tokio-vsock, which I will post when I finish preparing the fixed rust-zbus package for Debian.

zeenix commented 1 month ago

Closing this in favor of #643