Compilation errors in new application due to zbus dependency upgrade
Problem
Error logs from compilation:
error[E0277]: the trait bound `DocumentID: Basic` is not satisfied
--> /home/kavin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/documents/mod.rs:500:16
|
500 | self.0.call_versioned("GetHostPaths", &(doc_ids,), 5).await
| ^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Basic` is not implemented for `DocumentID`
--> /home/kavin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/app_id.rs:98:1
|
98 | pub struct DocumentID(String);
| ^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `Basic`:
&B
BusName<'_>
ErrorName<'_>
InterfaceName<'_>
MemberName<'_>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and 35 others
= note: required for `HashMap<DocumentID, file_path::FilePath>` to implement `zbus::zvariant::Type`
note: required by a bound in `proxy::Proxy::<'a>::call_versioned`
--> /home/kavin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.11.0/src/proxy.rs:195:40
|
188 | pub(crate) async fn call_versioned<R>(
| -------------- required by a bound in this associated function
...
195 | R: for<'de> Deserialize<'de> + Type,
| ^^^^ required by this bound in `Proxy::<'a>::call_versioned`
I believe this can be fixed by upgrading the rfd crate as the latest version as it doesn't require ashpd anymore.
Steps To Reproduce
Steps to reproduce the behavior:
-
dx new path, select router + desktop -
cargo run
Expected behavior
Compilation works.
Screenshots
Environment:
- Dioxus version: 0.7.2
- Rust version: 1.92.0
- OS info: Linux
- App platform: desktop
Questionnaire
This looks like a duplicate of https://github.com/DioxusLabs/dioxus/issues/5203 which has been fixed upstream. Try running cargo update
This looks like a duplicate of #5203 which has been fixed upstream. Try running
cargo update
Unfortunately running cargo update doesn't seem to fix the issue, you still get the same error as the linked issue, however running the set of commands in https://github.com/DioxusLabs/dioxus/issues/5203#issuecomment-3734813207 seems to fix this temporarily. Maybe #5204 can truly fix this?
I used druid in past months and I'm investigating dioxus now. I know everything about druid but I want to switch to more modern library. I try to install druid in linux I'm getting version mismatch problems about ashpd library. This kind of problems happens all the time in dioxus? I try to install 0.6 version of dioxus cli but I got different error. My dioxus journey not started well but I believe these problems will be fixed soon. Thanks.
Pinning zvariant seems to fix this issue zvariant = "=5.8.0"
I'm not sure it's due to the same issue, but although pinning zvariant = "=5.8.0" makes the app compile, it immediately fails with missing libxdo.so.3.
NOTE: I'm on wayland (niri) specifically, and even if I install xdo and xdotool (using arch linux) a new problem arises:
[linux] (WebKitWebProcess:40476): Gtk-WARNING **: cannot open display:
[linux] ** (app-name+hash:40340): ERROR **: <date>: readPIDFromPeer: Unexpected short read from PID socket. (This usually means the auxiliary process crashed immediately. Investigate that instead!)
[dev] Application [linux] exited with error: signal: 5 (SIGTRAP) (core dumped)
Fixed by #5204