RESOLVED FIXED 75345
Enable the [Supplemental] IDL on CMake
https://bugs.webkit.org/show_bug.cgi?id=75345
Summary Enable the [Supplemental] IDL on CMake
Kentaro Hara
Reported 2011-12-29 05:08:39 PST
We have enabled the [Supplemental] IDL on Chromium, AppleWebKit, GTK and Qt, and are planning to enable it on all build systems (Meta bug 72138). In this bug, we enable it on Efl.
Attachments
WIP patch to see if build passes (5.86 KB, patch)
2011-12-30 00:36 PST, Kentaro Hara
no flags
WIP patch to see if build passes (5.86 KB, patch)
2011-12-30 01:05 PST, Kentaro Hara
no flags
WIP patch to see if build passes (5.87 KB, patch)
2011-12-30 05:25 PST, Kentaro Hara
no flags
WIP patch to see if build passes (5.86 KB, patch)
2011-12-30 05:44 PST, Kentaro Hara
no flags
WIP patch to see if build passes (6.02 KB, patch)
2011-12-30 06:12 PST, Kentaro Hara
no flags
patch for review (8.79 KB, patch)
2011-12-30 06:56 PST, Kentaro Hara
no flags
Patch (8.76 KB, patch)
2011-12-30 07:27 PST, Kentaro Hara
no flags
Patch (8.47 KB, patch)
2011-12-30 08:01 PST, Kentaro Hara
no flags
Patch (8.11 KB, patch)
2011-12-30 08:10 PST, Kentaro Hara
no flags
patch for commit (8.12 KB, patch)
2011-12-30 15:45 PST, Kentaro Hara
no flags
patch for commit (8.12 KB, patch)
2011-12-30 15:46 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2011-12-30 00:36:04 PST
Created attachment 120784 [details] WIP patch to see if build passes
Gyuyoung Kim
Comment 2 2011-12-30 00:47:34 PST
Comment on attachment 120784 [details] WIP patch to see if build passes Attachment 120784 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/11058120
Kentaro Hara
Comment 3 2011-12-30 01:05:19 PST
Created attachment 120785 [details] WIP patch to see if build passes
Gyuyoung Kim
Comment 4 2011-12-30 01:18:03 PST
Comment on attachment 120785 [details] WIP patch to see if build passes Attachment 120785 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/10899111
Kentaro Hara
Comment 5 2011-12-30 05:25:40 PST
Created attachment 120793 [details] WIP patch to see if build passes
Gyuyoung Kim
Comment 6 2011-12-30 05:37:04 PST
Comment on attachment 120793 [details] WIP patch to see if build passes Attachment 120793 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/10899167
Kentaro Hara
Comment 7 2011-12-30 05:44:35 PST
Created attachment 120794 [details] WIP patch to see if build passes
Gyuyoung Kim
Comment 8 2011-12-30 05:54:37 PST
Comment on attachment 120794 [details] WIP patch to see if build passes Attachment 120794 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/11056155
Kentaro Hara
Comment 9 2011-12-30 06:12:29 PST
Created attachment 120796 [details] WIP patch to see if build passes
Raphael Kubo da Costa (:rakuco)
Comment 10 2011-12-30 06:39:12 PST
CC'ing dbates and paroga, as this is common infrastructure used by all ports which use CMake.
Patrick R. Gansterer
Comment 11 2011-12-30 06:46:38 PST
Comment on attachment 120796 [details] WIP patch to see if build passes View in context: https://bugs.webkit.org/attachment.cgi?id=120796&action=review > Source/WebCore/UseJSC.cmake:276 > + COMMAND echo ${IDL_FILES_LIST} | tr " " \\n > ${IDL_FILES_TMP} > + COMMAND cat ${IDL_FILES_TMP} the commands won't work on windows platform (e.g. ther is no cat) Maybe this can be written with the CMake FILE() and STRING() commands or better: add the required functionality into the perl scripts
Kentaro Hara
Comment 12 2011-12-30 06:50:35 PST
Comment on attachment 120796 [details] WIP patch to see if build passes View in context: https://bugs.webkit.org/attachment.cgi?id=120796&action=review >> Source/WebCore/UseJSC.cmake:276 >> + COMMAND cat ${IDL_FILES_TMP} > > the commands won't work on windows platform (e.g. ther is no cat) > Maybe this can be written with the CMake FILE() and STRING() commands > or better: add the required functionality into the perl scripts Actually, this cat is just for debugging. I'll remove it in the following patch. Thanks!
Kentaro Hara
Comment 13 2011-12-30 06:56:36 PST
Created attachment 120798 [details] patch for review
Patrick R. Gansterer
Comment 14 2011-12-30 06:58:13 PST
Comment on attachment 120798 [details] patch for review View in context: https://bugs.webkit.org/attachment.cgi?id=120798&action=review > Source/WebCore/ChangeLog:3 > + Enable the [Supplemental] IDL on Efl maybe you can change the efl to CMake? > Source/WebCore/UseJSC.cmake:275 > + COMMAND echo ${IDL_FILES_LIST} | tr " " \\n > ${IDL_FILES_TMP} same problem for echo and tr, they don't exist on windows :-/ > Source/WebCore/UseV8.cmake:263 > + COMMAND echo ${IDL_FILES_LIST} | tr " " \\n > ${IDL_FILES_TMP} here too
Kentaro Hara
Comment 15 2011-12-30 07:05:48 PST
(In reply to comment #14) > (From update of attachment 120798 [details]) Thanks, Patrick! > > Source/WebCore/UseJSC.cmake:275 > > + COMMAND echo ${IDL_FILES_LIST} | tr " " \\n > ${IDL_FILES_TMP} > > same problem for echo and tr, they don't exist on windows :-/ > > > Source/WebCore/UseV8.cmake:263 > > + COMMAND echo ${IDL_FILES_LIST} | tr " " \\n > ${IDL_FILES_TMP} > > here too OK, I'll fix it in the next patch. By the way, maybe should we need to make a change on PlatformBlackBerry.cmake at the same time? In other words, if we make a change on CMakefile.list, the change will affect UseJSC.cmake, UseV8.cmake and PlatformBlackBerry.cmake, right? But I'm not sure how I can confirm that my change on PlatformBlackBerry.cmake would be correct or not (since I do not have a BlackBerry build environment around me)...
Kentaro Hara
Comment 16 2011-12-30 07:27:10 PST
Patrick R. Gansterer
Comment 17 2011-12-30 07:36:33 PST
Comment on attachment 120800 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120800&action=review > Source/WebCore/UseJSC.cmake:270 > +FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST}) does not seem like a problem, but only FYI: This way IDL_FILES_TMP will be written at _every_ CMake run, so nothing should depend on it to avoid unnecessary rebuilds. > Source/WebCore/UseJSC.cmake:275 > + MAIN_DEPENDENCY ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_IDL_FILES} > + DEPENDS ${WEBCORE_DIR}/bindings/scripts/resolve-supplemental.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_IDL_FILES} sorry, missed in the last patch: MAIN_DEPENDENCY should contain only _ONE_ file. The "main dependency" will be used in IDE to provide a nicer interface. You can then right click on a IDL file and generate the corresponding h and cpp files. The MAIN_DEPENDENCY should be used only once in the project. All additional dependencies should be added to DEPENDS. The MAIN_DEPENDENCY does not need to be added to DEPENDS. > Source/WebCore/UseJSC.cmake:283 > + MAIN_DEPENDENCY ${_file} ${SUPPLEMENTAL_DEPENDENCY_FILE} too > Source/WebCore/UseV8.cmake:263 > + MAIN_DEPENDENCY ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_IDL_FILES} > + DEPENDS ${WEBCORE_DIR}/bindings/scripts/resolve-supplemental.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_IDL_FILES} too > Source/WebCore/UseV8.cmake:271 > + MAIN_DEPENDENCY ${_file} ${SUPPLEMENTAL_DEPENDENCY_FILE} too
Kentaro Hara
Comment 18 2011-12-30 07:48:35 PST
(In reply to comment #15) > (In reply to comment #14) > > (From update of attachment 120798 [details] [details]) > > By the way, maybe should we need to make a change on PlatformBlackBerry.cmake at the same time? In other words, if we make a change on CMakefile.list, the change will affect UseJSC.cmake, UseV8.cmake and PlatformBlackBerry.cmake, right? Correction: The change on CMakeLists.txt in this patch does not affect the current behavior of PlatformBlackBerry.cmake. Although we need to make a change to PlatformBlackBerry.cmake in the near future but do not have to do it in this patch.
Kentaro Hara
Comment 19 2011-12-30 07:56:33 PST
(In reply to comment #17) > (From update of attachment 120800 [details]) > > Source/WebCore/UseJSC.cmake:270 > > +FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST}) > > does not seem like a problem, but only FYI: This way IDL_FILES_TMP will be written at _every_ CMake run, so nothing should depend on it to avoid unnecessary rebuilds. Yeah... To make it better, is there any way to write "FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})" inside ADD_CUSTOM_COMMAND(...), like this? ADD_CUSTOM_COMMAND( OUTPUT ${IDL_FILES_TMP} COMMAND FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST}) # Syntax Error! ) ADD_CUSTOM_COMMAND( OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} DEPENDS ${IDL_FILES_TMP} COMMAND perl resolve-supplemental.pl ... )
Kentaro Hara
Comment 20 2011-12-30 08:01:17 PST
Patrick R. Gansterer
Comment 21 2011-12-30 08:03:18 PST
(In reply to comment #19) > (In reply to comment #17) > > (From update of attachment 120800 [details] [details]) > > > Source/WebCore/UseJSC.cmake:270 > > > +FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST}) > > > > does not seem like a problem, but only FYI: This way IDL_FILES_TMP will be written at _every_ CMake run, so nothing should depend on it to avoid unnecessary rebuilds. > > Yeah... To make it better, is there any way to write "FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})" inside ADD_CUSTOM_COMMAND(...), like this? > > ADD_CUSTOM_COMMAND( > OUTPUT ${IDL_FILES_TMP} > COMMAND FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST}) # Syntax Error! > ) > > ADD_CUSTOM_COMMAND( > OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} > DEPENDS ${IDL_FILES_TMP} > COMMAND perl resolve-supplemental.pl ... > ) Not really, you can write a CMake "script", but I don't think that we want this. IMHO it's not bad style to write this file as long as we know about possible problems.
Raphael Kubo da Costa (:rakuco)
Comment 22 2011-12-30 08:08:13 PST
Comment on attachment 120801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120801&action=review > Source/WebCore/UseJSC.cmake:269 > +SET(FIRST_IDL_FILE_FLAG 1) > +FOREACH (_idl ${WebCore_IDL_FILES}) > + IF (${FIRST_IDL_FILE_FLAG}) > + SET(FIRST_IDL_FILE_FLAG 0) > + SET(IDL_FILES_LIST "${WEBCORE_DIR}/${_idl}\n") > + ELSE () > + SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n") > + ENDIF () > +ENDFOREACH () Isn't FOREACH (_idl ${WebCore_IDL_Files}) SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n") ENDFOREACH () enough?
Kentaro Hara
Comment 23 2011-12-30 08:10:32 PST
Kentaro Hara
Comment 24 2011-12-30 08:11:16 PST
(In reply to comment #22) > (From update of attachment 120801 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120801&action=review > > > Source/WebCore/UseJSC.cmake:269 > > +SET(FIRST_IDL_FILE_FLAG 1) > > +FOREACH (_idl ${WebCore_IDL_FILES}) > > + IF (${FIRST_IDL_FILE_FLAG}) > > + SET(FIRST_IDL_FILE_FLAG 0) > > + SET(IDL_FILES_LIST "${WEBCORE_DIR}/${_idl}\n") > > + ELSE () > > + SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n") > > + ENDIF () > > +ENDFOREACH () > > Isn't > > FOREACH (_idl ${WebCore_IDL_Files}) > SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n") > ENDFOREACH () > > enough? Absolutely. Fixed it.
Raphael Kubo da Costa (:rakuco)
Comment 25 2011-12-30 08:21:44 PST
Informal r+ from the EFL side.
Daniel Bates
Comment 26 2011-12-30 10:38:27 PST
CC'ing Antonio Gomes and Rob Buis so that they can follow this change with respect to PlatformBlackBerry.cmake.
Daniel Bates
Comment 27 2011-12-30 10:39:09 PST
Comment on attachment 120802 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120802&action=review This looks good to me. > Source/WebCore/ChangeLog:35 > + * UseJSC.cmake: Described the above build. Nit: This remark doesn't read well (*). I would either remove this remark or revise it. One suggestion is: "Modified to reflect the new build flow as described above." (*) The remark doesn't read well because the word "describe" neither clarifies whether this patch modifies the file UseJSC.cmake nor what the modification is. (Although the presence of this line in the commit message indicates that either UseJSC.cmake was modified or newly added.) Moreover, the past tense usage of the word "describe" gives the impression that UseJSC.cmake either already implements or has a comment that describes the supplemental build flow ("new build flow"). Together these issues make it difficult to understand this remark. > Source/WebCore/ChangeLog:36 > + * UseV8.cmake: Exactly the same change as UseJSC.cmake, except for "JS" or "V8". Nit: Since the purpose of this remark is to indicate that a similar change to the build flow was made to file UseV8.cmake, I would just write "Ditto." > Source/WebCore/CMakeLists.txt:373 > webaudio/DelayNode.idl > + webaudio/DOMWindowWebAudio.idl Nit: These lines should be swapped such that this section of the list of IDL files is in sorted order according to the UNIX sort command.
Kentaro Hara
Comment 28 2011-12-30 15:45:09 PST
Created attachment 120821 [details] patch for commit
Kentaro Hara
Comment 29 2011-12-30 15:46:23 PST
Created attachment 120822 [details] patch for commit
Kentaro Hara
Comment 30 2011-12-30 15:48:02 PST
(In reply to comment #27) > (From update of attachment 120802 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120802&action=review > > This looks good to me. > > > Source/WebCore/ChangeLog:35 > > + * UseJSC.cmake: Described the above build. > > Nit: This remark doesn't read well (*). I would either remove this remark or revise it. One suggestion is: "Modified to reflect the new build flow as described above." > > (*) The remark doesn't read well because the word "describe" neither clarifies whether this patch modifies the file UseJSC.cmake nor what the modification is. (Although the presence of this line in the commit message indicates that either UseJSC.cmake was modified or newly added.) Moreover, the past tense usage of the word "describe" gives the impression that UseJSC.cmake either already implements or has a comment that describes the supplemental build flow ("new build flow"). Together these issues make it difficult to understand this remark. > > > Source/WebCore/ChangeLog:36 > > + * UseV8.cmake: Exactly the same change as UseJSC.cmake, except for "JS" or "V8". > > Nit: Since the purpose of this remark is to indicate that a similar change to the build flow was made to file UseV8.cmake, I would just write "Ditto." > > > Source/WebCore/CMakeLists.txt:373 > > webaudio/DelayNode.idl > > + webaudio/DOMWindowWebAudio.idl > > Nit: These lines should be swapped such that this section of the list of IDL files is in sorted order according to the UNIX sort command. dbates: Fixed them and committed. Thanks for the review.
WebKit Review Bot
Comment 31 2011-12-30 17:11:04 PST
Comment on attachment 120822 [details] patch for commit Clearing flags on attachment: 120822 Committed r103854: <http://trac.webkit.org/changeset/103854>
Ming Xie
Comment 32 2012-01-03 11:24:43 PST
As Antonio suggested, I tried this patch with our BlackBerry port which also uses CMake. Unfortunately, our local repository hasn't synced up with upstream to have all the required IDLs, and our upstream BlackBerry build port is not yet functional. Therefore, we couldn't really try out this patch with our port at this moment, and we will re-try this later.
Adam Barth
Comment 33 2012-01-03 11:54:25 PST
When is later?
Antonio Gomes
Comment 34 2012-01-03 12:04:40 PST
(In reply to comment #33) > When is later? We are upstreaming, so lets not get this bug blocked on us. It was very nice of kentaro to try to build his patch for BlackBerry port. We have a bug for tracking BlackBerry specific bits of his work, so if there is nothing else left here, it is good to go.. :)
Kentaro Hara
Comment 35 2012-01-03 17:00:26 PST
(In reply to comment #34) > (In reply to comment #33) > > When is later? > > We are upstreaming, so lets not get this bug blocked on us. > > It was very nice of kentaro to try to build his patch for BlackBerry port. We have a bug for tracking BlackBerry specific bits of his work, so if there is nothing else left here, it is good to go.. :) ming, tonikitoo: Thank you very much for the quick support. Do you mean that for the time being it is OK to commit the bug 75413 without confirming that the BlackBerry build passes? (The change of the bug 75413 is almost the same as the change that I've done for UseJSC.cmake and UseV8.cmake.) In fact, the bug 75413 is the last patch for enabling the [Supplemental] IDL on all build systems. In order to use the [Supplemental] IDL in WebKit, we need to enable it on *all* build systems. (If we start to use the [Supplemental] IDL in WebKit without committing the bug 75413, I am afraid that the BlackBerry build will be broken more because it cannot interpret the [Supplemental] IDL.)
Adam Barth
Comment 36 2012-01-03 17:05:17 PST
I think he's saying to go ahead and use [Supplemental] without committing bug 75413. They're in the process of bringing up their port. When they're ready, they'll take a look at bug 75413 and provide feedback / tweak it as necessary.
Kentaro Hara
Comment 37 2012-01-03 17:06:42 PST
(In reply to comment #36) > I think he's saying to go ahead and use [Supplemental] without committing bug 75413. They're in the process of bringing up their port. When they're ready, they'll take a look at bug 75413 and provide feedback / tweak it as necessary. Ah, I got it. Thanks.
Martin Robinson
Comment 38 2013-12-12 01:07:19 PST
I believe that cmake has had support for the supplemental IDL for a while now.
Note You need to log in before you can comment on or make changes to this bug.