-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Validate IDLs in idl_test() #18382
Validate IDLs in idl_test() #18382
Conversation
7539f5d
to
e92ccf5
Compare
e92ccf5
to
98070dc
Compare
@lukebjerring I expect any invalid IDL would immediately fail on CI, but this setup with |
I guess we could try and set something up as part of / parallel to the lint, running over all the .idls in interfaces/. Maybe we should do both? |
Being able to run any Node.js script on CI may help, as it seems everything is in Python now... |
resources/idlharness.js
Outdated
return this.add_dependency_idls_parsed(WebIDL2.parse(raw_idls), options); | ||
}; | ||
|
||
IdlArray.prototype.add_dependency_idls_parsed = function(parsed_idls, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be internal_add_dependency_idls
if consistent with the add_idls
method(s).
I don't like that name, but consistency is good.
Seems like Taskcluster's not running any tests (for FF / Chrome). Looks like my changes to add the
So, probably mostly the requirement of a default value? |
Why are the GitHub Actions things always failing and sending tons of failure mails to me 🤔 |
@jugglinmike might know. I noticed that started today too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nit
Here's a diff of full runs: https://wpt.fyi/results/?diff&filter=ADC&q=idlharness&run_id=306750001&run_id=315860003 And the affected tests: https://wpt.fyi/results/?diff&filter=ADC&run_id=275490002&run_id=306730001 Both make it look like this change will be fine. My only concern is that it will make lots of idlharness.js tests that were previously entirely passing have one failing subtest, which will cause bugs to be automatically filed in at least Chromium. @Hexcles is there anything we need to do to prepare for that? |
@foolip that's a lot of new failures... IIUC, this error indicates that something is wrong with the underlying IDL. Is the issue widespread among various IDLs, or are there a few common root causes that are referenced by a lot of other IDLs? It'd be great it's the latter and we could fix them before (or together with) landing this. |
Also the error messages are really long, e.g.
Note that the example error ends with an ellipsis. It's not truncated by the wpt.fyi UI, but most likely by wptrunner and the actual message is even longer. This line will be duplicated in the results and baselines of all the affected idlharness tests. |
Most of the validation errors are going to be for @saschanaz could we filter out at least the first two cases in wpt and enable them once specs have been updated? I think we'll need this ability on an ongoing basis, as webidl2.js supports validating something before specs have updated, indeed as a way to find which specs need updating. |
I want to also say that while the messages are verbose, it's a joy to see such clear error messages. That's certainly not always the case :) |
@foolip I can certainly implement opt-out for those validations, but would be happier if we had a bot that automatically send a PR to fix those problems. Currently I have an autofixer https://github.com/saschanaz/webidl-updater/ but no bot. |
A bot would be great, but even with the best of tooling I think you'll find that some specs require a lot of pinging to get anyone to review, so the whole process would be at least a few weeks. If we need to upgrade webidl2.js during a syntax transition, that would be an issue. But maybe we could do an ad-hoc filtering in those cases by string matching rather than a more robust opt-out supported by webidl2.js itself. |
@saschanaz sending PRs automatically would be great, filed saschanaz/webidl-updater#1 with some tips. |
Co-Authored-By: Philip Jägenstedt <philip@foolip.org>
3fc49eb
to
d360c2a
Compare
Do you know how many failing validate subtests there would be if this were landed now? |
@foolip Based on https://wpt.fyi/results/?diff&filter=ADC&q=idlharness&run_id=331930007&run_id=331880009 I think it will be zero. |
That diff doesn't include the new subtests even as passing, are you sure you compared the right two runs? |
Oops, it seems something wrong was there. Got a new diff: https://wpt.fyi/results/?diff&filter=ADC&q=idlharness&run_id=331930007&run_id=324240015 It shows five failures:
|
@saschanaz it sounds like this PR will make #12231 redundant then (namespace clashes)? |
@lukebjerring Right, while this doesn't check member uniqueness yet. |
That looks right, searching for |
I believe those failures are few enough, and all have good issues filed, that we should merge this, to catch new problems as they trickle in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validationIgnored
mechanism looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master
Related to #16267
Does not close the issue yet because the current deployed webidl2.js version is old.