Put xref data into Web IDL validation process
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
[Exposed=Window]
interface MyInterface {
// DOMMatrixInit is a dictionary that requires default value `{}`
// but our validator does not warn here because it does not know it's a dictionary
// as our IDL validation is currently completely independent from xref.
void method(optional DOMMatrixInit init);
};
The current setup is to parse IDL and immediately pass the results to validator.
My current thoughts:
- Parse IDL,
- Detect undefined references, with two possible ways...
- Extract directly from parser result data by abusing writer hooks. I locally have working code for this, but this creates a duplicate work because
core/dfn-finderalready does this by searching DOM tree... - Or, wait until xref and dfn-finder completes their work and somehow get the needed data from the DOM tree. Not sure how.
- Extract directly from parser result data by abusing writer hooks. I locally have working code for this, but this creates a duplicate work because
- Pass the undefined references to xref
- Convert them to WebIDL2-compatible format
- Pass the result to validator
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.
Research direction
The current flow parses IDL and immediately sends it to the validator; begin by tracing that flow alongside core/dfn-finder and the xref integration described in the issue. Define the handoff for undefined references and verify completion by confirming xref data reaches the WebIDL validator in the required compatible format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100