speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
https://speced.github.io/bikeshed
Creative Commons Zero v1.0 Universal
1.06k stars 196 forks source link

Incorrect auto-type in HTML spec #2382

Open jakearchibald opened 1 year ago

jakearchibald commented 1 year ago

https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source

From the refs database:

text:      DOM manipulation task source
type:      interface
spec:      html
shortname: html
level:     1
status:    snapshot
url:       https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source
export:    True
normative: True
for_:      []

I don't see why this is type: interface, since it isn't exported as an interface.

I wonder if it thinks it's an interface because it starts "DOM"? In which case, maybe terms containing spaces should never be auto-detected as interfaces?

jakearchibald commented 1 year ago

The only suspect I can find is https://github.com/tabatkins/bikeshed/blob/main/bikeshed/unsortedJunk.py#L545, but that would type as "function" rather than interface.

domenic commented 1 year ago

This is due to Shepherd (or Bikeshed?) guessing that any definition that starts with "DOM" is an interface.

We've asked multiple times (https://github.com/whatwg/html/pull/6360#issuecomment-773533763, https://github.com/whatwg/wattsi/pull/149) for Shepherd to stop applying these heuristics to HTML. But so far the maintainers have refused to do so. It's very frustrating.

jakearchibald commented 1 year ago

Hah, I tried the same data-dfn-type="dfn" fix and ran into the same issues.

jyasskin commented 1 year ago

If the problem is in Shepherd, it'll be fixed by #1761, which @tabatkins is actively working on again.