While I don’t want to take away from what Darin is saying here about correct usage of forward declaration and <wtf/Forward.h>, I’d like to understand why we have two different compilation models supported in WebKit. Is there a reason both need to be supported? Can we remove one?
- Sam > On Jul 14, 2020, at 10:40 AM, Darin Adler <da...@apple.com> wrote: > > We need to be cautious about adding header includes to other headers. Adding > includes to .cpp files is likely fine and not a deeply consequential > decision, but adding to headers is something that can have a massive effect > on build times over time. > >> On Jul 13, 2020, at 10:44 PM, hironori.fu...@sony.com >> <mailto:hironori.fu...@sony.com> wrote: >> <>Modified: trunk/Source/WebCore/platform/graphics/ColorSerialization.h >> (264331 => 264332) >> >> --- trunk/Source/WebCore/platform/graphics/ColorSerialization.h >> 2020-07-14 05:17:20 UTC (rev 264331) >> +++ trunk/Source/WebCore/platform/graphics/ColorSerialization.h >> 2020-07-14 05:44:25 UTC (rev 264332) >> @@ -25,6 +25,8 @@ >> >> #pragma once >> >> +#include <wtf/text/WTFString.h> > This change is wrong. The header to include here is Forward.h, not > WTFString.h. Not super-harmful since WTFString.h is already so widely > included, but we need to be really cautious in headers. > >> Modified: trunk/Source/WebCore/svg/SVGParserUtilities.h (264331 => 264332) >> >> --- trunk/Source/WebCore/svg/SVGParserUtilities.h 2020-07-14 05:17:20 UTC >> (rev 264331) >> +++ trunk/Source/WebCore/svg/SVGParserUtilities.h 2020-07-14 05:44:25 UTC >> (rev 264332) >> @@ -24,6 +24,7 @@ >> #include "ParsingUtilities.h" >> #include <wtf/HashSet.h> >> #include <wtf/Vector.h> >> +#include <wtf/text/WTFString.h> > Same mistake. > > I’d really like to come up with some other system for reviewing adding > headers to *headers*. > > — Darin > _______________________________________________ > 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