Summary: | [Qt] Auto-generate WebKit2 forwarding headers | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andras Becsi <abecsi> | ||||||||
Component: | WebKit2 | Assignee: | Andras Becsi <abecsi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | christian.webkit, darin, hausmann, kbalazs, ossy, vestbo, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | Qt, QtTriaged | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Andras Becsi
2010-08-26 09:26:31 PDT
Created attachment 65576 [details]
proposed patch
Comment on attachment 65576 [details]
proposed patch
The patch needs a typo fix in the ChangeLog and a comment fix in the script, so setting cq-.
Nonetheless comments are appreciated.
How is this platform-independent? It seems to be completely missing the point of the forwarding headers, and in fact is not useful on Mac and Windows for precisely the reason that forwarding headers are currently used. If it were possible to invoke a script located in WebKitTools/Scripts that walks over the source trees of every project then it would be possible to directly include headers from the other projects and there would be no reason to even use forwarding headers on Mac and Windows. Seems like Andras has somewhat misinterpreted why do we need forwarding headers on Mac but this is a step forward anyway. It would not be hard to extend the script with a switch that means it should copy the needed headers instead of generating a forwarding header for them. Then we would have the headers in one directory for each framework and use them as now we use *framework*/ForwardingHeaders (packaging with the libraries as I can imagine). The essence is that we can save the trouble of maintaining the forwarding headers manually (for building and packaging as well). (In reply to comment #3) > How is this platform-independent? It seems to be completely missing the point of the forwarding headers, and in fact is not useful on Mac and Windows for precisely the reason that forwarding headers are currently used. If it were possible to invoke a script located in WebKitTools/Scripts that walks over the source trees of every project then it would be possible to directly include headers from the other projects and there would be no reason to even use forwarding headers on Mac and Windows. Now I see that my first comment did underexplain my intention with this patch. In the current form the script truly seems missing the point on Mac and Windows, and I shouldn't have set the blocker (sorry for the confusion), but as Balazs points out it is not hard to extend it with a switch, so it copies every header instead of crawling the sources and creating forwarding headers, so it can also mimic the current behaviour of the Mac and Windows WebKit2 builds. I also see that the main cause we need these headers on Qt is because the build systems of Mac and Windows force a clumsy way of using framework style includes on other ports. This issue should be addressed in the first place by fixing the build systems and directly include headers and if the Mac and Windows build systems need framework style headers, then they should generate or copy them themselves, so this script would be useless in the current form. Since this way of fixing the problem seems to stall for almost two months now, and this issue is blocking us from being able to properly focus on on the implementation of WebKit2, I think this could be a (hopefully) temporary way of auto-generating the headers. Andras, you should read this bug: https://bugs.webkit.org/show_bug.cgi?id=44802. At least I have realized that the mac production builds for a particular framework should not have dependencies from any other directory. Created attachment 65913 [details]
proposed patch v2
Moved the script to the WebKit2 directory so there is no build time dependency to WebKitTools/Scripts, and generate forwarding headers with paths relative to the given framework directories since these are already added to the include paths.
Attachment 65913 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKitTools/MiniBrowser/qt/BrowserWindow.h:33: Alphabetical sorting problem. [build/include_order] [4]
WebKitTools/MiniBrowser/qt/BrowserWindow.h:34: Alphabetical sorting problem. [build/include_order] [4]
WebKitTools/MiniBrowser/qt/BrowserWindow.h:37: Alphabetical sorting problem. [build/include_order] [4]
Total errors found: 3 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 65914 [details]
proposed patch v3
Rearranged headers to comply to the style guide.
Committed r66592: <http://trac.webkit.org/changeset/66592> Comment on attachment 65914 [details]
proposed patch v3
Clearing flags.
|