Bug 198853

Summary: [CMake][Win] CombinedDomains.json is generated twice in JavaScriptCore_CopyPrivateHeaders and JavaScriptCore projects
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: CMakeAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, don.olmstead
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
none
Patch none

Description Fujii Hironori 2019-06-14 00:34:45 PDT
[CMake][Win] CombinedDomains.json is generated twice in JavaScriptCore_CopyPrivateHeaders and JavaScriptCore projects

Here is the excerpt from build log:

> 8>------ Build started: Project: JavaScriptCore_CopyPrivateHeaders, Configuration: Debug x64 ------
> 8>Generating ../../JavaScriptCore/DerivedSources/CombinedDomains.json
> 25>------ Build started: Project: JavaScriptCore (JavaScriptCore\JavaScriptCore), Configuration: Debug x64 ------
> 25>Generating ../../JavaScriptCore/DerivedSources/CombinedDomains.json

This causes unnecessary re-invoking generate-inspector-protocol-bindings.py in incremental builds because generated InspectorBackendDispatchers.cpp file becomes older than input CombinedDomains.json file.
Comment 1 Fujii Hironori 2019-06-14 00:36:39 PDT
Uploaded full build log: https://gist.github.com/fujii/f5b9c0875f50de7f3e1fe244f65fa200
Comment 2 Fujii Hironori 2019-06-14 00:51:02 PDT
Created attachment 372111 [details]
WIP Patch

The fundamental issue of this bug was fixed in CMake side.
https://gitlab.kitware.com/cmake/cmake/issues/16767

However, JavaScriptCore_CopyPrivateHeaders needs to have a direct
or indirect dependency of JavaScriptCore for CMake eliminating
duplicated custom commands.
Comment 3 Don Olmstead 2019-06-14 10:19:21 PDT
Patch is fine I'm just thinking maybe you should put a comment on why its there. Seems like any WEBKIT_COPY_FILES needs to have a direct dependency if any of the headers contain derived sources.
Comment 4 Fujii Hironori 2019-06-19 01:53:22 PDT
I don't see any other issues.
Comment 5 Fujii Hironori 2019-06-19 02:15:37 PDT
Created attachment 372445 [details]
Patch
Comment 6 WebKit Commit Bot 2019-06-19 08:07:37 PDT
Comment on attachment 372445 [details]
Patch

Clearing flags on attachment: 372445

Committed r246587: <https://trac.webkit.org/changeset/246587>
Comment 7 WebKit Commit Bot 2019-06-19 08:07:39 PDT
All reviewed patches have been landed.  Closing bug.