Bug 240540 - [CMake][Visual Studio] PrivateHeaders/JavaScriptCore/InspectorProtocolObjects.h isn't regenerated in incremental builds
Summary: [CMake][Visual Studio] PrivateHeaders/JavaScriptCore/InspectorProtocolObjects...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 14:33 PDT by Fujii Hironori
Modified: 2022-05-18 19:29 PDT (History)
12 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2022-05-17 15:01 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-05-17 14:33:00 PDT
[CMake][Visual Studio] PrivateHeaders/JavaScriptCore/InspectorProtocolObjects.h isn't regenerated in incremental builds

Reported in bug#240326 comment#14.

This looks like same with the following bug:
  Bug 240297 – [CMake][VS] PrivateHeaders/WebCore/WebCoreJSBuiltinInternals.h is not updated in incremental build
Comment 1 Fujii Hironori 2022-05-17 15:01:07 PDT
Created attachment 459517 [details]
Patch
Comment 2 Yury Semikhatsky 2022-05-17 15:14:04 PDT
Looking at Source/JavaScriptCore/CMakeLists.txt the dependency chain looks correct to me but I see that there are two entries like this:

```
MAIN_DEPENDENCY ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
```

one is for C++ bindings and the other is for inspector UI. At the same time Cmake documentation for MAIN_DEPENDENCY says[1]:

```
MAIN_DEPENDENCY
<...> Each source file may have at most one command specifying it as its main dependency. <...>
```

I wonder if that causes InspectorProtocolObjects.h to not be properly recompiled. Fujii, what do you think?


[1] https://cmake.org/cmake/help/latest/command/add_custom_command.html
Comment 3 Fujii Hironori 2022-05-17 17:18:56 PDT
Do you mean a change like this?
https://gist.github.com/fujii/af58b4f46bbaac0aa91c072072a2a975

This change doesn't fix this bug.
Comment 4 Yury Semikhatsky 2022-05-17 17:22:02 PDT
(In reply to Fujii Hironori from comment #3)
> Do you mean a change like this?
> https://gist.github.com/fujii/af58b4f46bbaac0aa91c072072a2a975
> 
> This change doesn't fix this bug.

Yes, just my guess.
Comment 5 EWS 2022-05-18 19:29:20 PDT
Committed r294462 (250724@main): <https://commits.webkit.org/250724@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 459517 [details].