Bug 154938 - Generated sources triggers when not required
Summary: Generated sources triggers when not required
Status: RESOLVED DUPLICATE of bug 163774
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 16:35 PST by Don Olmstead
Modified: 2016-10-30 19:10 PDT (History)
5 users (show)

See Also:


Attachments
VS Log of WebCore rebuilding some derived sources (2.00 MB, text/plain)
2016-03-07 16:44 PST, Don Olmstead
no flags Details
VS Log of WebCore not rebuilding derived sources (176.55 KB, text/plain)
2016-03-07 16:45 PST, Don Olmstead
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2016-03-02 16:35:18 PST
I'm finding that the generated sources steps, such as the IDL generation, will rerun fully when making local modifications to source code. This is when building Visual Studio projects but might be more prevalent.

I believe Chrome has separate projects for the generated sources steps so this might be the best way to go.
Comment 1 Don Olmstead 2016-03-07 16:44:41 PST
Created attachment 273238 [details]
VS Log of WebCore rebuilding some derived sources

Here is a verbose log from Visual Studio when changing a single file in the WebCore project. In this case its Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Comment 2 Don Olmstead 2016-03-07 16:45:57 PST
Created attachment 273239 [details]
VS Log of WebCore not rebuilding derived sources

Here are the Visual Studio logs after attempting another build on the WebCore project after a completed build
Comment 3 Don Olmstead 2016-03-07 16:47:42 PST
Here's some more information on what I'm seeing. So in this case I'm building WinCairo in Visual Studio 2015. To start I generate the project files using the following command.

perl Tools\Scripts build-webkit --wincairo --no-ninja --64-bit

From there I built the WebCore project explicitly by right clicking on it and selecting Build. If I build it again it does not rebuild. However if I add a printf to a random file within the WebCore project it will start rebuilding some generated sources that don't seem to have any bearing on this. Specifically I've been able to reproduce by modifying Source/WebCore/platform/win/LanguageWin.cpp, Source/WebCore/platform/graphics/FloatPoint.cpp, Source/WebCore/bindings/js/IDBBindingUtilities.cpp and Source/WebCore/platform/graphics/egl/GLContextEGL.cpp. When modifying any of those three files the output looks like this when its not verbose.

1>------ Build started: Project: _WTF_PreBuild, Configuration: Debug x64 ------
2>------ Build started: Project: _JavaScriptCore_PreBuild, Configuration: Debug x64 ------
3>------ Build started: Project: stageSharedScripts, Configuration: Debug x64 ------
4>------ Build started: Project: _WebCore_PreBuild, Configuration: Debug x64 ------
5>------ Build started: Project: WebCore (WebCore\WebCore), Configuration: Debug x64 ------
5>  Generating ../../DerivedSources/WebCore/FetchHeadersBuiltins.cpp, ../../DerivedSources/WebCore/FetchHeadersBuiltins.h
5>  Generating ../../DerivedSources/WebCore/FetchResponseBuiltins.cpp, ../../DerivedSources/WebCore/FetchResponseBuiltins.h
5>  Generating ../../DerivedSources/WebCore/MediaDevicesBuiltins.cpp, ../../DerivedSources/WebCore/MediaDevicesBuiltins.h
5>  Generating ../../DerivedSources/WebCore/NavigatorUserMediaBuiltins.cpp, ../../DerivedSources/WebCore/NavigatorUserMediaBuiltins.h
5>  Generating ../../DerivedSources/WebCore/RTCPeerConnectionBuiltins.cpp, ../../DerivedSources/WebCore/RTCPeerConnectionBuiltins.h
5>  Generating ../../DerivedSources/WebCore/RTCPeerConnectionInternalsBuiltins.cpp, ../../DerivedSources/WebCore/RTCPeerConnectionInternalsBuiltins.h
5>  Generating ../../DerivedSources/WebCore/ByteLengthQueuingStrategyBuiltins.cpp, ../../DerivedSources/WebCore/ByteLengthQueuingStrategyBuiltins.h
5>  Generating ../../DerivedSources/WebCore/CountQueuingStrategyBuiltins.cpp, ../../DerivedSources/WebCore/CountQueuingStrategyBuiltins.h
5>  Generating ../../DerivedSources/WebCore/ReadableStreamBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamBuiltins.h
5>  Generating ../../DerivedSources/WebCore/ReadableStreamControllerBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamControllerBuiltins.h
5>  Generating ../../DerivedSources/WebCore/ReadableStreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamInternalsBuiltins.h
5>  Generating ../../DerivedSources/WebCore/ReadableStreamReaderBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamReaderBuiltins.h
5>  Generating ../../DerivedSources/WebCore/StreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/StreamInternalsBuiltins.h
5>  Generating ../../DerivedSources/WebCore/WritableStreamBuiltins.cpp, ../../DerivedSources/WebCore/WritableStreamBuiltins.h
5>  Generating ../../DerivedSources/WebCore/WritableStreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/WritableStreamInternalsBuiltins.h
5>  GLContextEGL.cpp

Searching around for those files they all appear in WebCoreJSBuiltins.cpp. In CMake this seems to correspond with line 3729 of Source/WebCore/CMakeLists.txt.

ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/bindings/js/WebCoreJSBuiltins.cpp ${_objectName}Builtins.cpp)

Overall I think the issue is that there are some dependencies being expressed in CMake that are not necessarily true which is causing a lot of regeneration when there are changes.
Comment 4 Fujii Hironori 2016-10-30 19:10:35 PDT
I solved this problem in Bug 163774.

*** This bug has been marked as a duplicate of bug 163774 ***