Open Bug 1797857 Opened 2 years ago

Extend the "Go to header file"/"Go to source file" mechanism to support WPT `.headers` files and xpcshell/mochitest `^headers^` files.


(Webtools :: Searchfox, enhancement)



(Not tracked)


(Reporter: asuth, Unassigned)


WPT's test server supports .headers files and our xpcshell/mochitests (or really anything built on our testing JS http server) supports ^headers^ files.

To aid discoverability of this mechanism, it would be great to build on our existing "Go to header file"/"Go to source file" mechanism that automatically links .h/.cpp pairings to support this as well. Even better would be for these edges to be defined in an extensible way that allows defining arbitrary file-mangling transforms like this where we can define multiple such relationships via per-file-info.toml that allows:

  • Custom labeling of the names (ex: "header", "source", "HTTP headers")
  • Optionally adding a doc link like those I provide in the first paragraph so that someone wondering what the "HTTP headers" file is could be provided relevant context that's part of more comprehensive documentation.

Note that what I'm proposing here is intended to be a relatively simple mechanism that can be easily added but is limited in capabilities. As I've discussed elsewhere in bugs in the vicinity of bug 1727789, there are also cases like XPIDL files where we potentially have a much more complicated set of files where we have explicit semantic information about what's going on provided by explicit indexers, and this mechanism is not intended to handle those cases. The mechanism I propose here is strictly for very straightforward and consistent mappings which would likely be suppressed when more sophisticated semantic data is available for files.

You need to log in before you can comment on or make changes to this bug.