[v0.3] Specify behavior for fields#delete, fields#get-and-delete with invalid field name
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- api, documentation
Research direction
Start with the specified delete and get-and-delete definitions in the issue, then compare their invalid-name behavior with get() and the behavior currently returned by Wasmtime. Resolve whether delete silently succeeds or returns invalid-syntax, and whether get-and-delete propagates the corresponding error, then update the WASI specification and any affected conformance coverage.
Written by the indexing model from the issue text.
Description
Consider:
/// Delete all values for a name. Does nothing if no values for the name
/// exist.
///
/// Fails with `header-error.immutable` if the `fields` are immutable.
delete: func(name: field-name) -> result<_, header-error>;
/// Delete all values for a name. Does nothing if no values for the name
/// exist.
///
/// Returns all values previously corresponding to the name, if any.
///
/// Fails with `header-error.immutable` if the `fields` are immutable.
get-and-delete: func(name: field-name) -> result<list<field-value>, header-error>;
When passed an invalid field name, delete could silently succeed (like get does), because by definition there is no field with that name; the operation will not set any field of the fields object. Or it could return an invalid-syntax error, because it has the Result. Wasmtime currently returns an error.
Similar concerns for get-and-delete; I guess it should be specified as propagating any error, as if get() then delete().
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/WASI
-
[http] Request and Response's `new` method is reserved in many languages, inconsistent with sockets. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
WebAssembly/WASI#961 ·
-
P-http
Difficulty 1/5 Under an hour Newbie friendliness 90/100
WebAssembly/WASI#937 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
WebAssembly/WASI#909 ·
-
P-clocks S-inactive
Difficulty 1/5 Under an hour Newbie friendliness 68/100
WebAssembly/WASI#687 ·
-
P-random S-inactive
Difficulty 1/5 Under an hour Newbie friendliness 75/100
WebAssembly/WASI#701 ·
All issues in WebAssembly/WASI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100