Move window identifiers and similar to a new ashpd-handles crate#321
Draft
A6GibKm wants to merge 13 commits intobilelmoussaoui:masterfrom
Draft
Move window identifiers and similar to a new ashpd-handles crate#321A6GibKm wants to merge 13 commits intobilelmoussaoui:masterfrom
A6GibKm wants to merge 13 commits intobilelmoussaoui:masterfrom
Conversation
3ee4713 to
ec736e7
Compare
995d560 to
de8e40c
Compare
Owner
|
can you rebase? |
ec736e7 to
8d225db
Compare
Collaborator
Author
|
Would it be possible to run CI? Before the rebase this was compiling, but locally I am getting issues compiling zvariant with the gvariant feature. |
8d225db to
73f1fe8
Compare
10d5f14 to
5534cd5
Compare
Collaborator
Author
|
ci passes now. this is prob not ready, but good enough for a review. |
Moves windows identifiers, tokens, and AppIDs to a separate crate. We move AppIDs since they are required by activation tokens and otherwise we would need a third-crate to avoid a dependency cycle. Some interesting changes from their original versions: - We need a custom Error type to avoid dependency cycles - We use zvariant instead of zbus::zvariant The reasons to do this split is that - This allows to decouple ashpd releases from gtk-rs-core. It would be possible to release a new version of ashpd-handles as soon as there is a gtk-rs-core release. - This would allow to depend on gtk-rs-core's main branch in a follow-up without that much hassle backporting. This allows ashpd users to test new bindings in gtk-rs's main branch. Do note however, that users of the gtk4 feature (to implement From<Color> to gdk::RGBA) and the glib feature (to implement GEnum on enums) will still run into the same issue. - Simplifies testing the feature matrix by moving most of them to a smaller crate. - Someone might make use of these abstraction without using ashpd.
This is a dependency of zbus anyways.
Otherwise compilation fails with:
```
error[E0004]: non-exhaustive patterns: `&zvariant_utils::signature::Signature::Maybe(_)` not covered
--> /var/home/deathwish/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zvariant-5.8.0/src/de.rs:198:11
|
198 | match signature {
| ^^^^^^^^^ pattern `&zvariant_utils::signature::Signature::Maybe(_)` not covered
|
note: `zvariant_utils::signature::Signature` defined here
--> /var/home/deathwish/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zvariant_utils-3.2.1/src/signature/mod.rs:42:1
|
42 | pub enum Signature {
| ^^^^^^^^^^^^^^^^^^
...
99 | Maybe(Child),
| ----- not covered
= note: the matched value is of type `&zvariant_utils::signature::Signature`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
217 ~ Signature::Structure { .. } => de.deserialize_seq(visitor),
218 ~ &zvariant_utils::signature::Signature::Maybe(_) => todo!(),
|
```
wip: Add zbus_macros to client instead
This also fixes the issue and does not add a dependency that was not
there from the start.
9915d2c to
ebb841a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO:
Depends on #320.