Stream: git-wasmtime

Topic: wasmtime / PR #9860 Add Default and Debug impls to SparseMap


view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 21:58):

wtachau opened PR #9860 from wtachau:add-debug-default-impls-sparse-map to bytecodealliance:main:

https://github.com/bytecodealliance/wasmtime/issues/9856

Add Default and Debug trait impls to SparseMap (for the latter, only impl Debug if K and V impl Debug).

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 21:58):

wtachau requested fitzgen for a review on PR #9860.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 21:58):

wtachau requested wasmtime-compiler-reviewers for a review on PR #9860.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:05):

pchickey requested cfallin for a review on PR #9860.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:09):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:09):

bjorn3 created PR review comment:

The sparse and dense fields are not exposed to the user and rather useless unless you know how the implementation lf SparseMap works. I would much rather prefer the Debug impl being like that of HashMap showing the logical mapping from keys to values. So for example { v0: "a", v2: "b" } for a SparseMap<Value, String>. This can be done using something like f.debug_map().entries(entries).finish() where entries is an iterator over the map entries.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:13):

wtachau updated PR #9860.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:13):

wtachau submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:13):

wtachau created PR review comment:

makes sense! updated.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:19):

cfallin submitted PR review:

LGTM, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:19):

cfallin has enabled auto merge for PR #9860.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:20):

wtachau edited PR #9860:

https://github.com/bytecodealliance/wasmtime/issues/9856

Add Default and Debug trait impls to SparseMap (for the latter, only impl Debug if K and V impl Debug).

closes #9856

view this post on Zulip Wasmtime GitHub notifications bot (Dec 18 2024 at 22:56):

cfallin merged PR #9860.


Last updated: Dec 23 2024 at 13:07 UTC