bikeshed
bikeshed copied to clipboard
Can't describe `required [EnforceRange] typename attributeName`
This stems from https://github.com/w3c/webcodecs/pull/488
STR
- Have a fragment like this:
<xmp class='idl'>
dictionary PlaneLayout {
required [EnforceRange] unsigned long offset;
required [EnforceRange] unsigned long stride;
};
</xmp>
: <dfn dict-member for=PlaneLayout>offset</dfn>
:: The offset in bytes where the given plane begins within a {{BufferSource}}.
: <dfn dict-member for=PlaneLayout>stride</dfn>
:: The number of bytes, including padding, used by each row of the plane within
a {{BufferSource}}.
Expected
- it works, everything is linked appropriately
Actual
$ bikeshed --die-on=warning spec index.src.html index.html
LINK ERROR: No 'idl-name' refs found for '[EnforceRange] unsigned long'.
<a data-link-type="idl-name" data-lt="[EnforceRange] unsigned long">[EnforceRange] unsigned long</a>
✘ Did not generate, due to errors exceeding the allowed error level.
make: *** [index.html] Error 2
bikeshed
attempts to reference a type that's [EnforceRange] unsigned long
and that's not a thing.
Instead, we have to write:
<xmp class='idl'>
dictionary PlaneLayout {
[EnforceRange] required unsigned long offset;
[EnforceRange] required unsigned long stride;
};
</xmp>
: <dfn dict-member for=PlaneLayout>offset</dfn>
:: The offset in bytes where the given plane begins within a {{BufferSource}}.
: <dfn dict-member for=PlaneLayout>stride</dfn>
:: The number of bytes, including padding, used by each row of the plane within
a {{BufferSource}}.
with [EnforceRange]
and required
swapped, which is incorrect WebIDL.