WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74900
Change the build flow of AppleWebKit and AppleWin to use the [Supplemental] IDL
https://bugs.webkit.org/show_bug.cgi?id=74900
Summary
Change the build flow of AppleWebKit and AppleWin to use the [Supplemental] IDL
Kentaro Hara
Reported
2011-12-19 17:36:27 PST
This is the final step for
bug 74599
. We change the build flow of AppleWebKit as follows, and thus enable the [Supplemental] IDL. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in
bug 72138
for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; }
Attachments
Patch
(34.82 KB, patch)
2011-12-19 17:48 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP patch to see if win build passes
(38.91 KB, patch)
2011-12-19 23:08 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP patch to see if win build passes
(38.91 KB, patch)
2011-12-20 02:14 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP: Please ignore this one-line patch
(1.19 KB, patch)
2011-12-20 04:36 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP patch to see if build succeeds
(40.80 KB, patch)
2011-12-20 17:11 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
WIP patch to see if build passes
(40.79 KB, patch)
2011-12-21 18:22 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2011-12-19 17:48:17 PST
Created
attachment 119964
[details]
Patch
Kentaro Hara
Comment 2
2011-12-19 23:08:38 PST
Created
attachment 119990
[details]
WIP patch to see if win build passes
Kentaro Hara
Comment 3
2011-12-20 02:14:24 PST
Created
attachment 120001
[details]
WIP patch to see if win build passes
Kentaro Hara
Comment 4
2011-12-20 04:36:13 PST
Created
attachment 120008
[details]
WIP: Please ignore this one-line patch
Kentaro Hara
Comment 5
2011-12-20 17:11:09 PST
Created
attachment 120119
[details]
WIP patch to see if build succeeds
Kentaro Hara
Comment 6
2011-12-21 18:22:03 PST
Created
attachment 120254
[details]
WIP patch to see if build passes
Kentaro Hara
Comment 7
2011-12-21 18:45:25 PST
It finally passed the win build. Review?
Adam Barth
Comment 8
2011-12-21 23:09:09 PST
(In reply to
comment #7
)
> It finally passed the win build. Review?
Yay!
Adam Barth
Comment 9
2011-12-21 23:15:40 PST
Comment on
attachment 120254
[details]
WIP patch to see if build passes View in context:
https://bugs.webkit.org/attachment.cgi?id=120254&action=review
I'm marking this R+, but I'm slightly unsure that we'll re-build JSDOMWindow.h when DOMWindowWebSocket.idl changes.
> Source/WebCore/ChangeLog:24 > + generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
Will this step correctly run if only the supplemental IDL file is changed?
Kentaro Hara
Comment 10
2011-12-21 23:27:20 PST
Comment on
attachment 120254
[details]
WIP patch to see if build passes View in context:
https://bugs.webkit.org/attachment.cgi?id=120254&action=review
>> Source/WebCore/ChangeLog:24 >> + generate-bindings.pl depends on $idl and supplemental_dependency.tmp; > > Will this step correctly run if only the supplemental IDL file is changed?
I confirmed that it correctly runs. This is because - generate-bindings.pl depends on $idl and supplemental_dependency.tmp - and supplemental_dependency.tmp depends on *all* IDL files. In other words, given that *any* of IDL files is updated, then generate-bindings.pl runs for *all* IDL files. Perhaps is this a problem? By the way, I found that generate-bindings.pl runs for DOMWindowWebSocket.idl and DOMWindowWebAudio.idl at every build even if no IDL files are updated. I am investigating the reason.
Adam Barth
Comment 11
2011-12-21 23:31:24 PST
> In other words, given that *any* of IDL files is updated, then generate-bindings.pl runs for *all* IDL files. Perhaps is this a problem?
That seems slightly unfortunate, but I think it's ok for this iteration. Once we get this working better, we'll probably want to improve that. One option is to write the output h/cpp file to a temp file and then only overwrite the real output file if the bytes differ. That will prevent us from having to rebuild all downstream dependencies.
Adam Barth
Comment 12
2011-12-21 23:33:00 PST
As simpler solution might be to shard supplemental_dependency.tmp by interface. We could have a DOMWindow.supplemental_dependencies file that JSDOMWindow.h would depend upon. That file would only get overwritten by resolve-dependencies if it changed.
Adam Barth
Comment 13
2011-12-21 23:33:44 PST
Anyway, I think its ok to move forward and get this system working with this approach. We can optimize the incremental builds after we have everything working.
Kentaro Hara
Comment 14
2011-12-21 23:35:19 PST
(In reply to
comment #13
)
> Anyway, I think its ok to move forward and get this system working with this approach. We can optimize the incremental builds after we have everything working.
I agree, thanks. I'll commit it after preventing generate-bindings.pl from running for DOMWindow*.idl at every build.
Kentaro Hara
Comment 15
2011-12-22 00:03:15 PST
(In reply to
comment #14
)
> (In reply to
comment #13
) > > Anyway, I think its ok to move forward and get this system working with this approach. We can optimize the incremental builds after we have everything working. > > I agree, thanks. I'll commit it after preventing generate-bindings.pl from running for DOMWindow*.idl at every build.
I found that the cause exists in generate-bindings.pl. In case where the generator is ObjC and generate-bindings.pl needs to generate empty .h and .cpp, it should generate DOM****.h and DOM****.cpp, but currently it generates ObjC****.h and ObjC****.cpp. Anyway, to make this patch simpler, I guess we should fix it in another patch. (Note: This is not a serious problem. Even if we commit the patch without fixing it, nothing bad happens except that generate-bindings.pl always runs for the two supplemental IDLs and generates empty .h and .cpp.) Committed. Thanks!
WebKit Review Bot
Comment 16
2011-12-22 03:25:16 PST
Comment on
attachment 120254
[details]
WIP patch to see if build passes Clearing flags on attachment: 120254 Committed
r103519
: <
http://trac.webkit.org/changeset/103519
>
WebKit Review Bot
Comment 17
2011-12-22 03:25:22 PST
All reviewed patches have been landed. Closing bug.
Adam Roben (:aroben)
Comment 18
2012-01-04 07:26:33 PST
Looks like this caused
bug 75546
.
Kentaro Hara
Comment 19
2012-01-23 08:56:54 PST
(In reply to
comment #11
)
> > In other words, given that *any* of IDL files is updated, then generate-
bindings.pl runs for *all* IDL files. Perhaps is this a problem? This has been becoming an issue in our team and I'd like to fix it.
> One option is to write the output h/cpp file to a temp file and then only overwrite the real output file if the bytes differ. That will prevent us from having to rebuild all downstream dependencies.
I'll take this approach.
Darin Adler
Comment 20
2012-01-23 09:50:37 PST
(In reply to
comment #19
)
> (In reply to
comment #11
) > > One option is to write the output h/cpp file to a temp file and then only overwrite the real output file if the bytes differ. That will prevent us from having to rebuild all downstream dependencies. > > I'll take this approach.
This can be harder than it sounds. If you do it in the most obvious way you can end up regenerating the .h and .cpp files over and over again. There has to be some other target used for make logic. Maybe that’s obvious to you, but I’ve run into that problem many times trying to do something like this.
Kentaro Hara
Comment 21
2012-01-23 09:56:41 PST
(In reply to
comment #20
)
> (In reply to
comment #19
) > > (In reply to
comment #11
) > > > One option is to write the output h/cpp file to a temp file and then only overwrite the real output file if the bytes differ. That will prevent us from having to rebuild all downstream dependencies. > > > > I'll take this approach. > > This can be harder than it sounds. If you do it in the most obvious way you can end up regenerating the .h and .cpp files over and over again. There has to be some other target used for make logic. Maybe that’s obvious to you, but I’ve run into that problem many times trying to do something like this.
I am not 100% sure but, as I mentioned in
bug 76836
, I guess that we can make the change simply by changing WriteData() in CodeGenerator*pm so that it writes .h/.cpp to a temp file and then overwrites the real .h/.cpp only when the bytes differ (We can prepare the subroutine that does it in CodeGenerator.pm and call it from WriteData() in each CodeGenerator*.pm). IMO, I'd like to avoid making a change on Makefiles because we need to touch various build scripts (make, cmake, qmake, GYP, ...)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug