WebIDL's 'void' type is changing to 'undefined'
Categories
(Core :: DOM: Bindings (WebIDL), task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: jackalmage, Assigned: peterv)
References
Details
Attachments
(3 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Steps to reproduce:
As part of efforts to finally add an 'undefined' type to WebIDL (so methods/etc don't have to generalize their type to 'any'), it was decided to actually add 'undefined' as the type name, and so the previous function return signature 'void' is being removed for redundancy.
See https://github.com/heycam/webidl/pull/906 for details on the change.
This change will be merged shortly; this bug is a heads-up to adjust your IDL parser (see the PR for the changes to the grammar; it's quite small). You may wish to have a transitional period where you recognize 'void' and 'undefined' as synonyms, as specifications are moved over to the new syntax.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Comment 2•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:peterv, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
This is blocked on figuring out the spec part (https://github.com/heycam/webidl/issues/962) and implementing the union support (which I have mostly done).
Comment 4•2 years ago
|
||
This does not add union support for undefined
yet. Still, it should allow devs to copy-paste IDL from the spec without manually replacing undefined
to void
.
Assignee | ||
Comment 5•2 years ago
|
||
I don't think we should do this without the union support. I pushed my patches to try: https://treeherder.mozilla.org/jobs?repo=try&revision=8dabab23487a9aba857ac35b9dd9d07e7bcef2ef
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D107108
Assignee | ||
Comment 7•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Seems like this should be fairly close to landable, and would make people adding new code match the specs, which is nice...
Assignee | ||
Comment 9•2 years ago
|
||
Comment hidden (off-topic) |
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a62d45d03cf Switch WebIDL from void to undefined. r=edgar https://hg.mozilla.org/integration/autoland/rev/d65760500d06 Support undefined in union. r=edgar
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8a62d45d03cf
https://hg.mozilla.org/mozilla-central/rev/d65760500d06
Description
•