We already had this discussion; see the thread titled "Unified sources have 
broken our #include hygiene"

> On Mar 19, 2019, at 3:48 PM, Said Abou-Hallawa <sabouhall...@apple.com> wrote:
> 
> I have been working on patches that require adding and removing cpp files 
> from WebCore/Sources.txt. Almost every time I add or remove a file, I hit 
> undefined symbol compilation error in some unrelated source or header file. 
> Because a group of source files are compiled in one unified source file, some 
> dependencies get hidden.  The same symbol is defined in another source or 
> header file. Once sources are moved to different unified sources, the problem 
> gets uncovered.
> 
> For example the file svg/graphics/filters/filters/SVGFEImage.h uses the class 
> TreeScope without forward declaring it or including its header file. Oddly 
> the source file svg/graphics/filters/filters/SVGFEImage.cpp compiles in the 
> trunk right now. If a file is added to or removed from WebCore/Sources.txt 
> such that this source is moved to another unified source, the compiler will 
> give an error that TreeScope is not defined.
> 
> Another example is <https://trac.webkit.org/changeset/243137 
> <https://trac.webkit.org/changeset/243137>> which fixes a compilation error 
> on GTK port. The same file was compiling fine on macOS but it failed on GTK.
> 
> Can we fix this issue? The fixes for such errors look very mysterious in the 
> patches. It can also cause build breaks because the ports do not compile the 
> same files.
> 
> One naive solution is to have the EWS bots compile without the unified source 
> builds. In this case, all the header and source files must have the required 
> forward declaration and/or the header file inclusion. So adding or removing 
> files should not affect the ability to compile any other source file.
> 
> Thanks,
> Said
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to