Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tidoust opened this issue Apr 17, 2019 · 4 comments
Closed

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

tidoust opened this issue Apr 17, 2019 · 4 comments
Assignees
Labels

Comments

@tidoust
Copy link
Member

tidoust commented Apr 17, 2019

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: w3c/reffy#133

In short, SVG2 defines some IDL for implementations that do not support HTML in Extensions to the Document interface. In the source code, that IDL is flagged with edit:excludefromidl, which should do two things when the spec is generated if I read the processing code 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. 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, 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)

@AmeliaBR AmeliaBR self-assigned this May 6, 2019
@AmeliaBR
Copy link
Contributor

AmeliaBR commented May 6, 2019

I'll take a look. My only guess is that the different results have something to do with whether the entire spec is being rebuilt or only chapters.

@AmeliaBR AmeliaBR added the Tools label May 6, 2019
@AmeliaBR
Copy link
Contributor

AmeliaBR commented May 9, 2019

Ok, I can confirm that if I do a full build (or any build that includes struct.html), the problematic interface gets excluded, but if I just touch another file & then rebuild, the idl.html page gets rebuilt without the exclusion.

Now I just need to figure out what to change in the code to get the exclusion happening even for partial builds.

@AmeliaBR AmeliaBR reopened this May 9, 2019
@AmeliaBR
Copy link
Contributor

AmeliaBR commented May 9, 2019

Fixed in master, but won't be deployed until the commit gets whitelisted on the server by @heycam.

@heycam
Copy link
Contributor

heycam commented May 9, 2019

Approved that change. Change will take effect next time someone pushes an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants