-
Notifications
You must be signed in to change notification settings - Fork 195
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
compose: Use GVariantDict
, not manual hash table
#3760
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
rpmostree_context_get_rpmmd_repo_commit_metadata (self->corectx)); | ||
g_variant_dict_insert_value ( | ||
self->metadata, "rpmostree.rpmmd-repos", | ||
rpmostree_context_get_rpmmd_repo_commit_metadata (self->corectx)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we double referencing here?
There's a dedicated type for a mapping from "string to variant" in `GVariantDict`. Use it instead of rolling our own with `GHashTable`. The advantage here is improved ergonomics from the C side; e.g. we can directly pass C strings for values and have the variant allocated internally. But more importantly, this is prep for oxidizing things here because we can pass `GVariantDict` to/from Rust easily, not so with `GHashTable`.
dbc756e
to
f89f5cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. CI failure might be related, though don't see offhand where the issue is.
Yeah, the CI failure is definitely related, but I don't yet understand it either. Not critical, will come back to this some point later. |
@cgwalters: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@cgwalters: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
There's a dedicated type for a mapping from "string to variant" in
GVariantDict
. Use it instead of rolling our own withGHashTable
.The advantage here is improved ergonomics from the C side; e.g.
we can directly pass C strings for values and have the variant
allocated internally.
But more importantly, this is prep for oxidizing things here because
we can pass
GVariantDict
to/from Rust easily, not so withGHashTable
.