[svgwg] [svg2] "edit:excludefromidl" inconsistently applied during build (#676)

tidoust has just created a new issue for https://github.com/w3c/svgwg:

== [svg2] "edit:excludefromidl" inconsistently applied during build ==
[Reffy](https://github.com/tidoust/reffy) crawls specs daily and extacts the IDL they contain. These IDL extracts are incorporated in Web Platform Tests, through pull requests that are automatically created whenever a change is detected in an IDL extract. We seem to be hitting a minor but annoying and recurring issue with SVG2, which we initially thought was a bug in Reffy, but that rather seems to be a bug with the generation of the SVG2 spec, see: https://github.com/tidoust/reffy/issues/133

In short, SVG2 defines some IDL for implementations that do not support HTML in [Extensions to the Document interface](https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions). In the source code, that IDL is [flagged with `edit:excludefromidl`](https://github.com/w3c/svgwg/blob/master/master/struct.html#L2768), which should do two things when the spec is generated if I read the [processing code](https://github.com/w3c/svgwg/blob/master/tools/publish/processing.js#L415) correctly:
1. Add an `export` class to the corresponding IDL fragment in the generated document. This seems to work fine.
2. Exclude the IDL fragment from the IDL index in [Appendix A](https://svgwg.org/svg2-draft/idl.html). That does not seem to be done consistently.

The IDL fragment (which starts with `// must only be implemented in certain implementations`) currently incorrectly appears in Appendix A. More importantly, if you look at the [history of the crawling outcomes for the SVG2 spec](https://github.com/tidoust/reffy-reports/commits/master/whatwg/idl/SVG.idl), you'll note that the IDL fragment seems to come and go over time:
- 13 April 2019: the IDL fragment starts appearing in the IDL index
- 28 January 2019: the IDL fragment disappears from the IDL index
- 22 January 2019: the IDL fragment starts appearing in the IDL index
- 10 January 2019: the IDL fragment disappears from the IDL index
- 8 January 2019: the IDL fragment starts appearing in the IDL index
- etc.

I do not know what triggers this erratic behavior since, as far as I can tell, the source code for that section and the processing code used to generate the spec haven't changed during that period. Could you look into it?

(FWIW, it's fine for me if you want the fragment to appear in the IDL index in the end: I'd just tell Reffy not to use the IDL index and to re-create it excluding IDL fragments flagged with an `export` class name)

Please view or discuss this issue at https://github.com/w3c/svgwg/issues/676 using your GitHub account

Received on Wednesday, 17 April 2019 16:37:34 UTC