Conversation
The HTML spec does not follow the markup conventions to properly type and associate definitions, so it needs special handling. A lot is encoded in the ids of the definition elements, but not all the data (e.g. no distinction between attributes and methods), and there are many exceptions to the general conventions on id building. Figuring out the right output requires additional knowledge that is available through the WebIDL fragments embedded in the spec, so we make use of that.
tidoust
reviewed
Jun 29, 2020
Member
tidoust
left a comment
There was a problem hiding this comment.
See inline for one main comment on ES modules, and a few nits.
The whole thing is rather ugly and seems easy to "break", but there is unfortunately not much that can be done about it. Good thing to have written tests, including one that checks that things won't break if the HTML spec starts following the convention used in other specs.
tidoust
reviewed
Jun 30, 2020
tidoust
approved these changes
Jun 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HTML spec does not follow the markup conventions to properly type and associate definitions, so it needs special handling.
A lot is encoded in the ids of the definition elements, but not all the data (e.g. no distinction between attributes and methods), and there are many exceptions to the general conventions on id building.
Figuring out the right output requires additional knowledge that is available through the WebIDL fragments embedded in the spec, so we make use of that.
The diff of the generated definitions is large (2000+ definitions have a changed type), so a bit hard to meaningfully review. I think the result is statistically much better, so even if there are regressions hidden in the middle, that's probably still an overall improvement.
I'm separately looking into whether the said improved definitions can be upstreamed into the HTML spec.