fix(deps): update rust crate zbus to v5
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| zbus | dependencies | major | 4 -> 5 |
Release Notes
dbus2/zbus (zbus)
v5.0.0: 🔖 zbus 5.0.0
- 👽️ Adapt to zvariant 5.0 API. This brings in massive performance improvements to message encoding and decoding.
- 💥 Breakinging changes:
- Message body signature now mandatory.
proxymacro respects visibility. This includes all types generated byproxy. Unfortunately this means that the existing code will have to set the visiblity explicitly topubif they were relying on the generated proxy to be public.- Drop support for
DBUS_COOKIE_SHA1auth mechanism. #727- It drags the
sha1crate as a dependency, which can be problematic for some users. #543 - It makes the handshake more complex, not allowing to pipeline all the commands.
- It's not widely used. If
EXTERNALis not an option, you might as well just useANONYMOUS.
- It drags the
- 🛂 Only support one authentication method at a time. Now that we're down to only two authentication mechanisms with one of them being no-authentication, this really makes sense since we can just autodetect what authentication method to use for a specific socket type on a specific platform. This also simplifies the handshake logic and will allow us to pipeline the whole client-side handshake in the future, when we can drop the xdg-dbus-proxy workarounds. #781
- Drop unnecessary lifetimes on genarated signal streams.
- Streamline Message & message::Builder constructors. They should be named the same and take the same type of arguments.
- proxy::Defaults now has typed values.
- Rename proxy::ProxyDefault to proxy::Defaults.
- 🔥 Drop API deprecated in 4.0.
- Minor changes in
fdoAPI.
- ✨ New features:
interfacenow generates a trait, <InterfaceType>Signals, that provides the same signal methods as user specifies but w/o theSignalEmitterargument (#871). The macro also generates 2 implementations of this trait for:- InterfaceRef<InterfaceType>, for emitting signals from outside the context of an interface method.
- SignalEmitter, for emitting signals from inside an interface methods.
- Add
SignalContext::emit. Add a new method to SignalContext that allows emitting a signal for a given interface and singal name. - Add Connection::graceful_shutdown.
- Add conn::AuthMechanism::as_str(). This gives you a static string representation of the mechanism. We'll use this in a following commit to avoid an allocation.
- Add Socket::auth_mechanism. The socket impl will now inform us which authentication mechanism should be used with it. The implementation can choose this based on the socket type and the target platform.
- Allow specifying visibility of interface-generated proxy. This implies that by default, it will be private.
- ObjectServer now implements Clone.
- 🚚 Renames and moves:
- Rename
SignalContexttoSignalEmitter. Since now this emits signals, this is a more appropriate name. We keep a deprecatedSignalContexttype alias as well as thesignal_contextattribute ofinterfacefor not completely breaking the existing code. - Move AuthMechanism from crate root to conn. We leave the
AuthMechanismin the root as deprecated.
- Rename
- 🚑️ Gracefully handle serial number wrap. When SERIAL_NUM wraps past u32::MAX back to zero, the conversion to NonZeroU32 panics. #946
- 🩹 Fix some lifetimes in Proxy API. We were unnecessarily constraining the lifetimes in some of
the
ProxyAPI. - ⚡️ Optimizations
- Only enable Guid::generate() if
p2pfeature is enabled. - Use relaxed load order for serial number fetch & add.
- msg::Header no longer allocates.
- Avoid deserialization of msg::Header needlessly.
- Only enable Guid::generate() if
- 🚩 Add
serde_bytesCargo feature. This is just a proxy feature forzvariant'sserde_bytesfeature. #1052 - 🚩 Feature-gate blocking API. Add a cargo feature called
blocking-apitozbus&zbus_macros. When enabled, thezbus::blockingmodule is available. When disabled,proxymacro ignores the value ofgen_blockingattribute and doesn't generate blocking proxy. This feature is enabled by default. - ➕ Add
caminofeature as proxy for zvariant feature of the same name. - ➖ Dependendies removed:
- Remove dependency on
sha1crate. - Drop direct dep on
futures-sink. randnow an optional dependency. It is only enabled ifp2pfeature is enabled. This means thatranddependency is dropped for typical users.
- Remove dependency on
- ⬆️ Updated dependencies:
- zvariant to 5.0.
- windows-sys to 0.59.
- tokio-vsock 5. #643
- ⬆️ Bump MSRV to 1.81.
- 📝 Documentation
- Tidy documentation across entire crate.
- Improve
blockingmodule docs. - Correct wrong documentation links.
- Remove a now incorrect warning from Message::header method.
- ✏️ Fix doc list item missing indentation.
- 🚨 Drop invalid cfg from documentation example.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
I'm inclined to wait till 1.83, since zbus does not support 1.81 any longer
Now that rust 1.83 has been released, is it time to do this upgrade?
Could not compile this crate now. I got following error messages.
error[E0432]: unresolved import `concurrent_queue::ForcePushError`
--> /home/kumiko/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-channel-2.3.0/src/lib.rs:50:41
|
50 | use concurrent_queue::{ConcurrentQueue, ForcePushError, PopError, PushError};
| ^^^^^^^^^^^^^^ no `ForcePushError` in the root
error[E0599]: no method named `force_push` found for struct `ConcurrentQueue` in the current scope
--> /home/kumiko/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-channel-2.3.0/src/lib.rs:313:34
|
313 | match self.channel.queue.force_push(msg) {
| ^^^^^^^^^^ method not found in `ConcurrentQueue<T>`
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `async-channel` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
My dependencies:
├── notify-rust v4.11.3
│ ├── log v0.4.22
│ ├── serde v1.0.217 (*)
│ └── zbus v4.4.0
│ ├── async-broadcast v0.7.2
│ │ ├── event-listener v5.3.1
│ │ │ ├── concurrent-queue v2.4.0
│ │ │ │ └── crossbeam-utils v0.8.17
│ │ │ │ └── cfg-if v1.0.0
│ │ │ ├── parking v2.2.0
│ │ │ └── pin-project-lite v0.2.13
│ │ ├── event-listener-strategy v0.5.3
│ │ │ ├── event-listener v5.3.1 (*)
│ │ │ └── pin-project-lite v0.2.13
│ │ ├── futures-core v0.3.31
│ │ └── pin-project-lite v0.2.13
│ ├── async-executor v1.11.0
│ │ ├── async-task v4.7.1
│ │ ├── concurrent-queue v2.4.0 (*)
│ │ ├── fastrand v2.0.1
│ │ ├── futures-lite v2.0.1
│ │ │ ├── fastrand v2.0.1
│ │ │ ├── futures-core v0.3.31
│ │ │ ├── futures-io v0.3.31
│ │ │ ├── memchr v2.7.4
│ │ │ ├── parking v2.2.0
│ │ │ └── pin-project-lite v0.2.13
│ │ └── slab v0.4.9
│ │ [build-dependencies]
│ │ └── autocfg v1.1.0
│ ├── async-fs v2.1.2
│ │ ├── async-lock v3.4.0
│ │ │ ├── event-listener v5.3.1 (*)
│ │ │ ├── event-listener-strategy v0.5.3 (*)
│ │ │ └── pin-project-lite v0.2.13
│ │ ├── blocking v1.6.1
│ │ │ ├── async-channel v2.3.0
│ │ │ │ ├── concurrent-queue v2.4.0 (*)
│ │ │ │ ├── event-listener v5.3.1 (*)
│ │ │ │ ├── event-listener-strategy v0.5.3 (*)
│ │ │ │ ├── futures-core v0.3.31
│ │ │ │ └── pin-project-lite v0.2.13
See https://github.com/rust-lang/cargo/issues/14059, I think we need to upgrade zbus.
@hoodie Is there something one can do to push this forward? I am interested in upgrading zbus across my dependency tree and notify-rust and tauri are still on 4.x :)
@thomaseizinger you just did. You reminded me of this PR. thanks
Thanks!