Bug 163868 - [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
Summary: [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Minor
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-23 08:07 PDT by Michael Catanzaro
Modified: 2016-11-01 05:23 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.56 KB, patch)
2016-10-23 08:09 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (4.57 KB, patch)
2016-10-23 20:07 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (4.88 KB, patch)
2016-10-23 20:08 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (4.23 KB, patch)
2016-10-23 20:29 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (8.72 KB, patch)
2016-10-31 19:58 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (8.71 KB, patch)
2016-10-31 21:07 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 Michael Catanzaro 2016-10-23 08:07:57 PDT
We used to have a ninja build that was silent until the final stages of the build, when generating GtkDoc. That's no longer the case:

[0/4006] Generate bindings (WebCoreBindings)
Preprocess IDL
[34/4006] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
[35/3990] Generate bindings (WebKitTestRunnerBindings)
[197/3988] Building CXX object Source/...vaScriptCore.dir/b3/B3BasicBlock.cpp.o^C

I don't think this extra output is helpful. It could be hidden behind some debug or verbose build flag, or just removed.
Comment 1 Michael Catanzaro 2016-10-23 08:09:40 PDT
Created attachment 292545 [details]
Patch
Comment 2 Fujii Hironori 2016-10-23 08:27:14 PDT
preprocess-idls.pl is executed unnecessarily because of
WriteFileIfChanged of preprocess-idls.pl, which is not useful
anymore but harmful for CMake-based port.
This is a bug I plan to fix.
Comment 3 Fujii Hironori 2016-10-23 08:34:06 PDT
I can not test you patch now. I think your patch does not solve following output:

> [34/4006] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
> [35/3990] Generate bindings (WebKitTestRunnerBindings)

Isn't it?
Comment 4 Michael Catanzaro 2016-10-23 09:52:53 PDT
(In reply to comment #3)
> I can not test you patch now. I think your patch does not solve following
> output:
> 
> > [34/4006] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
> > [35/3990] Generate bindings (WebKitTestRunnerBindings)
> 
> Isn't it?

Hm, you must be right; I didn't try a clean build.
Comment 5 Fujii Hironori 2016-10-23 19:54:24 PDT
I tested your patch.
This is a incremental build log without any source code change.

> fujii@localhost $ ./Tools/Scripts/build-webkit --gtk --debug --64-bit
> [0/949] Generate bindings (WebCoreBindings)
> [2/38] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
> [3/22] Generate bindings (WebCoreTestSupportBindings)
> [4/10] Generate bindings (WebKitTestRunnerBindings)
> [7/7] cd /home/fujii/work/webkit/w1/WebKitBuild/Debug/Tools/T...rivedSources/ForwardingHeaders --platform gtk --platform soup
> 
> ====================================================================
>  WebKit is now built (00m:02s). 
>  To run MiniBrowser with this newly-built code, use the
>  "Tools/Scripts/run-minibrowser" script.
> ====================================================================
> fujii@localhost $

Your patch does not suppress the build log because I specify
USES_TERMINAL option.
Comment 6 Fujii Hironori 2016-10-23 20:07:16 PDT
Created attachment 292574 [details]
Patch
Comment 7 Fujii Hironori 2016-10-23 20:08:59 PDT
Created attachment 292575 [details]
Patch
Comment 8 Fujii Hironori 2016-10-23 20:29:53 PDT
Created attachment 292576 [details]
Patch

* Preserve BYPRODUCTS option which is needed for Ninja
Comment 9 Fujii Hironori 2016-10-24 00:52:55 PDT
Michael,

I think the output of generate-bindings-all.pl is helpful to know
which IDL bindings are regenerated.
Are the following four lines annoying? That is issued by Ninja.

> [0/949] Generate bindings (WebCoreBindings)
> [2/38] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
> [3/22] Generate bindings (WebCoreTestSupportBindings)
> [4/10] Generate bindings (WebKitTestRunnerBindings)
Comment 10 Michael Catanzaro 2016-10-24 10:08:59 PDT
(In reply to comment #9)
> Michael,
> 
> I think the output of generate-bindings-all.pl is helpful to know
> which IDL bindings are regenerated.
> Are the following four lines annoying? That is issued by Ninja.
> 
> > [0/949] Generate bindings (WebCoreBindings)
> > [2/38] Generate bindings (WebKitTestRunnerInjectedBundleBindings)
> > [3/22] Generate bindings (WebCoreTestSupportBindings)
> > [4/10] Generate bindings (WebKitTestRunnerBindings)

I don't see why it's helpful. I would indeed prefer these to be silenced.
Comment 11 Fujii Hironori 2016-10-24 19:53:27 PDT
For example, a new IDL StaticRange.idl was added in
<http://trac.webkit.org/changeset/207670>.  If a new IDL is
added, supplemental_dependency.tmp will be updated.

In this case, non-CMake-based port (Mac port) regenerates all
bindings. See this build log:

https://build.webkit.org/builders/Apple%20El%20Capitan%20Debug%20%28Build%29/builds/11132/steps/compile-webkit/logs/stdio

On the other hand, in CMake-based port regenerating bindings
which is needed.

https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug%20%28Build%29/builds/64008/steps/compile-webkit/logs/stdio

> [1/3] InputEvent.idl
> [2/3] StaticRange.idl
> [3/3] DOMWindow.idl

We can confirmed three IDL files was processed by seeing build log of
BuildBot.
Comment 12 Michael Catanzaro 2016-10-25 04:51:55 PDT
But the buildbots print verbose output. I don't mind if it shows up in the logs on the buildbot, I just don't want to see it on a separate line when running ninja myself. :)

We should also clean up GtkDoc to not do this, but that's a preexisting issue.
Comment 13 Fujii Hironori 2016-10-25 23:32:08 PDT
I'll try to find a solution.
Comment 14 Fujii Hironori 2016-10-31 19:58:12 PDT
Created attachment 293519 [details]
Patch
Comment 15 Michael Catanzaro 2016-10-31 20:15:32 PDT
Comment on attachment 293519 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=293519&action=review

> Source/cmake/WebKitMacros.cmake:48
> +option(SHOW_PROGRESS_OF_GENERATE_BINDINGS "Show progress of generating bindings" ON)

OK, thanks. But please name it SHOW_BINDINGS_GENERATION_PROGRESS and change the default to OFF. Then it can be turned on on the bots.
Comment 16 Fujii Hironori 2016-10-31 21:07:48 PDT
Created attachment 293525 [details]
Patch

Thank you for review.
* Renamed to SHOW_BINDINGS_GENERATION_PROGRESS
* Set OFF as default SHOW_BINDINGS_GENERATION_PROGRESS
* Enable SHOW_BINDINGS_GENERATION_PROGRESS unless interactive Ninja build
Comment 17 Fujii Hironori 2016-10-31 21:16:03 PDT
Comment on attachment 293525 [details]
Patch

Oops. I mistakenly clear r+ flag.
Comment 18 Michael Catanzaro 2016-11-01 05:00:29 PDT
Comment on attachment 293525 [details]
Patch

Thank you for working on this!
Comment 19 WebKit Commit Bot 2016-11-01 05:23:43 PDT
Comment on attachment 293525 [details]
Patch

Clearing flags on attachment: 293525

Committed r208220: <http://trac.webkit.org/changeset/208220>
Comment 20 WebKit Commit Bot 2016-11-01 05:23:48 PDT
All reviewed patches have been landed.  Closing bug.