Bug 144488 - [cmake] Incremental build issue revealed by r183659
Summary: [cmake] Incremental build issue revealed by r183659
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 18530
  Show dependency treegraph
 
Reported: 2015-04-30 23:19 PDT by Csaba Osztrogonác
Modified: 2015-05-05 08:54 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-04-30 23:19:51 PDT
The EFL  build is broken after https://trac.webkit.org/changeset/183659
because of an incremental build issue revealed by this patch.

Dependencies seems to be set properly in cmake, but InspectorProtocolObjectes.h
isn't regenerated, but it should be. CombinedDomains.json which is the main
dependency of the generator script is regenerated and the build log says
that te generator is called, but the header isn't regenrated.

I can take a look on this bug on monday morning. If somebody 
has a quick fix before it, feel free to pick it up.
Comment 2 Joseph Pecoraro 2015-05-01 15:13:45 PDT
Good find =(. Your understanding of the steps looks correct as well.
Comment 3 Brian Burg 2015-05-01 16:16:55 PDT
I don't see anything obviously wrong either. It would help to see if CombinedDomains.json actually changed. The protocol generator will not touch output files if the generated output is the same. Another possibility is that there's a typo somewhere, and an old version of the header is being included instead of the newly generated one.
Comment 4 Csaba Osztrogonác 2015-05-04 01:19:25 PDT
Something is weird here ... I can't reproduce it with doing 
clean build on 183658 and then incremental build on 183659.

Unfortunately I didn't save the build directory of the bots,
but I remember that CombinedDomains.json was regenerated and
its content was correct, but the h/cpp files weren't regenerated.

I'll investigate this strange bug soon.
Comment 5 Joseph Pecoraro 2015-05-04 12:16:05 PDT
(In reply to comment #4)
> Something is weird here ... I can't reproduce it with doing 
> clean build on 183658 and then incremental build on 183659.

Yeah, I carefully read over the cmake build steps and everything looked correct.

Even if there was an exception during generation we should have failed the build step, so I am also baffled =)
Comment 6 Csaba Osztrogonác 2015-05-05 02:59:57 PDT
I found the problem. 

http://trac.webkit.org/changeset/182243/trunk/Source/JavaScriptCore/CMakeLists.txt changed the path of the generated sources from WebKitBuild/Release/DerivedSources/JavaScriptCore to WebKitBuild/Release/DerivedSources/JavaScriptCore/inspector , but the old InspectorProtocolObjectes.h is left in WebKitBuild/Release/DerivedSources/JavaScriptCore and caused incremental build issue a month later.

It isn't a build system bug, I don't think if we can handle this kind of
situations without adding a sophisticated mechanism to remove stale files.

Clean build solved the problem, so there is no problem since now.
Comment 7 Brian Burg 2015-05-05 08:54:17 PDT
(In reply to comment #6)
> I found the problem. 
> 
> http://trac.webkit.org/changeset/182243/trunk/Source/JavaScriptCore/
> CMakeLists.txt changed the path of the generated sources from
> WebKitBuild/Release/DerivedSources/JavaScriptCore to
> WebKitBuild/Release/DerivedSources/JavaScriptCore/inspector , but the old
> InspectorProtocolObjectes.h is left in
> WebKitBuild/Release/DerivedSources/JavaScriptCore and caused incremental
> build issue a month later.
> 
> It isn't a build system bug, I don't think if we can handle this kind of
> situations without adding a sophisticated mechanism to remove stale files.
> 
> Clean build solved the problem, so there is no problem since now.


Interesting, I think I have run into this before when I was modifying generator code for the same file. Maybe as a countermeasure, you can compute a hash of output directories and force a clean build if the hash changes. Not sure that this would be easy, though- isn't the "force clean" part of the builer interface, not CMake?