Closed Bug 1790502 Opened 2 years ago Closed 2 years ago

Add "script" (.js) and "module" (.mjs) "checks" for the "tests" repo and, if possible, the mozilla-central repo

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

References

Details

We don't have any JS checks right now. The tests repo currently has a "script" style source file https://github.com/mozsearch/mozsearch/blob/master/tests/tests/files/some_javascript.js that could have checks add it to it (or from a few other JS files) but we'll also need to add an ".mjs" style file as well. Checks would look like https://github.com/mozsearch/mozsearch/blob/master/tests/tests/checks/inputs/analysis/rust/simple.rs/simple_Loader_new__json but the JS symbol style is #someAttr.

General docs about this are in https://github.com/mozsearch/mozsearch/blob/master/docs/testing-checks.md

As I say in https://bugzilla.mozilla.org/show_bug.cgi?id=1789329#c4 I'm not sure production checks are a great idea right now just because code refactoring can easily break things. Options in this space would be:

  • Explicitly check in some files into mozilla-central that are like "hey, this is a smoke test for searchfox, don't remove these!"
  • For production use some metrics to determine if some kind of broad systemic regression happened for JS.

I'm going to mark this fixed. I added a few basic JS checks with module support to the tree as part of my fix for bug 1789329 and a little extra coverage in bug 1792322. My plan here had been a little more extensive to get script checks, but in bug 1792322 my changes to have the JS analyzer emit warnings arguably provide us with a better quality ratchet. It just took a lot of iteration to quiet all the existing warnings. As part of bug 1740290 I think it will make sense to add more explicit checks, but as I've noted in commit messages, adding more checks now won't actually make things easier as every check input/snapshot will need to change.

Assignee: nobody → bugmail
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.