This was actually something I wanted to bring up at the contributors meeting 
especially since I was bit by this recently with some CMake changes that busted 

It would be nicer to move our tooling to clang. Include what you use is 
something I think would be of great use as well. CMake has built in support for 
a number of static checks

My thoughts were to have a `build-webkit –static-analysis` flag that would do 
non-unified builds as well as potentially adding in dummy .cpp files for 
headers without an associated .cpp. It would run clang-tidy and 

From: webkit-dev <> On Behalf Of Darin Adler
Sent: Saturday, September 1, 2018 7:26 PM
To: Simon Fraser <>
Cc: WebKit Development <>
Subject: Re: [webkit-dev] Unified sources have broken our #include hygiene

On Sep 1, 2018, at 5:14 PM, Simon Fraser 
<<>> wrote:

Unified sources allow you to get away without #including all the files you need 
in a .cpp file, because some earlier file in the group has probably already 
included them for you.

This means that when you add a new file to the build, and the unified sources 
get shuffled around, you end up with a long list of build breakages, some 
platform-specific, that you can only fix by repeating EWS trials.


We knew this was going to happen when evaluated the proposal before we switched 
to unified sources. I believe you can find some discussion of it in webkit-dev.

How can we solve this?

I don’t think we should try to solve it.

To me at the moment, this seems to be a minor irritation. Even without unified 
sources, it’s common to get includes wrong for platforms other than the one you 
are testing on and find this out only when building on EWS.

I would be OK having an EWS server that builds various platforms without 
unified sources, but while it might help it might also hurt, adding more EWS 
results to interpret for each patch, and also finding theoretical problems that 
don’t affect any platform.

If there’s a tool that can figure out what files need to be included by 
analyzing source code, and that works well enough to be practical, I’d love to 
arrange it so that we can use that instead of having programmers have to write 
their own include statements. I’ve long been interested in 
<> and wondered whether we could use it, but it 
sort of does the opposite, and the “multiple platforms” problem could well make 
even that tool impractical for us.

— Darin
webkit-dev mailing list

Reply via email to