Open Bug 1661067 Opened 4 years ago Updated 1 year ago

Switch to having the Python IPDL code generator emit (partial) searchfox analysis data instead of using the rust parser

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: asuth, Unassigned)

References

(Blocks 1 open bug)

Details

An idea that came up when discussing WebIDL indexing in https://bugzilla.mozilla.org/show_bug.cgi?id=1416899#c1 was that it's better to have the actual (Mozilla custom) code generators output the searchfox analysis data as an optional byproduct rather than having a completely parallel mechanism that may bit-rot. In particular, searchfox's IPDL data was entirely broken for an extremely long time until bug 1546848 put a small band-aid on the problem, but bug 1555857 still remains a serious lack of connectivity, and overall the inability to parse/mangle the async return value mechanism (where callbacks or a MozPromise are used, avoiding the need for an actor that just exists for a constructor/__delete__ lifecycle pair) is a huge problem for searchfox being able to be helpful when IPC is involved.

Note that https://github.com/mozsearch/mozsearch/blob/master/tools/src/bin/ipdl-analyze.rs may still need to exist as an additional processing step to help perform the the C++ mangling linkage that :billm discussed at https://bugzilla.mozilla.org/show_bug.cgi?id=1416899#c3. Specifically, at the current time, the IPDL codegen logic might want to emit just the "pretty" identifier and then ipdl-analyze.rs could perform a fixup/join to locate the appropriately mangled C++ "sym". Alternately, they can just get their own symbol mangling like I've done on the fancy branch. (See "srcsym" and "targetsym" in the fancy analysis docs and an example analysis output using the hacked up rust compiler gizmo.)

Yeah, it is a bit of a pain keeping the Rust IPDL parser up to date, even though the Python one doesn't get updated more than a couple of times a month. Especially for these larger things like the devirtualization, sync message checking, and preprocessing. Any efforts to use the Rust parser in the Firefox build have long ago stalled out, unfortunately.

Blocks: 1732574
See Also: → 1859884
You need to log in before you can comment on or make changes to this bug.