Open Bug 1657712 Opened 4 years ago

Remove support for include directory resolution from the IPDL compiler

Categories

(Core :: IPC, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

Details

You can pass in a set of directories to the IPDL compiler via the -I command line option. If you do something like 'include protocol PFoo', it will search through these directories for a file named PFoo.ipdl and use the first one that it finds. As seen in bug 1657504, this can result in odd behavior if there's a PFoo.ipdl in the include directories and a different PFoo.ipdl specified on the command line.

This might also cause some dependencies of the build to be invisible to the build system. For example, I'm not sure what happens if PFoo.ipdl is somewhere in an include directory, but is never added to IPDL_SOURCES.

Anyways, given that we only ever invoke the IPDL compiler automatically when we know the complete set of IPDL files we're interested in, I think we should get rid of the -I option, and not scan directories to do resolve includes. I think instead the resolution procedure should scan through the actual set of IPDL files from the command line.

We'd probably want to check before doing anything that the basenames of all of the files passed in are unique. Then the error I added in bug 1657504 could be made into an assertion. I don't know if the build system already ensures that IPDL_SOURCES can't contain multiple files with the same non-directory name or not. It doesn't seem like something you'd want, but who knows. Maybe a check could be added there, too.

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