Closed Bug 1761689 Opened 2 years ago Closed 1 year ago

De-bitrot :billm's support for XPIDL constants/enums in C++ code and add test coverage

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

References

(Blocks 1 open bug)

Details

:billm had some enhancements to idl-analyze.py in https://github.com/mozsearch/mozsearch/pull/59 that never landed to support XPIDL enums. These changes (and in particular some refactoring cleanups) got a bit more bit-rotted by my changes in bug 1759064 (iterating on bug 1758394), but the core enhancements still stand. Aesthetically I think I probably favor the now-current emit_record over the PR's source/target taking positional arguments, but that could be easily addressed via using python's keyword-based arguments if we cared.

We can now easily add test coverage for this at the analysis record and crossref level, but I think it's probably also thinking about whether we can add a searchfox-tool pipeline stage that could shell out to our spidermonkey js shell and have it produce an example of what the context-menu's list of options will look like. That need not happen in this bug but I think that's a reasonable way to get us close to an end-to-end test without starting up a full browser, etc.

Blocks: 1774557

For bug 1776522 I'm touching the idl-analyze.py logic enough that it makes sense to do this at the same time.

The additional testing mechanism I describe is still interesting (although will be conceptually changed by bug 1776522) but definitely out of scope for this work. I think we can likely add the coverage in a non-duplicative way if/when we consider having the context-menu move towards using the "query" endpoint to express searches more semantically than building a symbol list. That said, the "structured" record will be growing very explicit relationship edges and that will inherently be something the insta-based tests will capture as long as the result includes the structured record.

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