🪙 Value text encoding ambiguities / quirks
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- wasm
- Domain
- compilers
Research direction
Start with the value definitions section in design/mvp/Explainer.md and compare its val rules with the WAVE mapping and the referenced value definitions. Trace the char, float, handle, and integer cases, then determine the intended grammar and validation behavior for each ambiguity. Done means the specification has an agreed, unambiguous treatment of the reported cases.
Written by the indexing model from the issue text.
Description
In looking at WAVE mapping to value defs (ref https://github.com/WebAssembly/component-model/pull/639#issuecomment-4292311870) I found some quirks in the val rules:
char- Allows unescaped single quote
(value char '''), which is unambiguous in context but seems awkward to parse and confusing to read (especially if you're used to Python!). - Rejects unescaped double-quote (
'"'), which is slightly annoying to me, personally. 🙂
- Allows unescaped single quote
- floats
f32is encoded ascore:f64which leaves rounding and overflow ambiguous, e.g.core:f64accepts1e99which will overflow anf32.f64canonrejectsnan:0xbut not-nan
- Handles in variants:
- Currently this would seem to be valid:
(value (option (future)) none), which is at least surprising if not actually wrong.
- Currently this would seem to be valid:
- Ints:
- Depending on how I squint it looks like
(value u64 -1)might be valid viacore:i64(wrapping tou64::MAX).
- Depending on how I squint it looks like
Separately: the bottom of the value definitions section describes value imports/exports but the Nope, I was looking in the wrong place.import/export defs are missing matching rules.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Contributor guide
No contributing guide indexed for this repository
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/component-model
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WebAssembly/component-model#609 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/component-model#724 · 9 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/component-model#695 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
WebAssembly/component-model#694 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
WebAssembly/component-model#677 · 1 comment ·
All issues in WebAssembly/component-model
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#8869 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EricSpencer00/Resilient#4824 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/jeo-maven-plugin#1758 ·
-
generics
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·