Summary: | Web Inspector: InjectedScriptSource_js and InjectedScriptCanvasModuleSource_js should be minified | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||||||||||||||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | andersca, buildbot, commit-queue, darin, eflews.bot, graouts, gyuyoung.kim, halton.huo, joepeck, kling, mrowe, paroga, rakuco, rniwa, simon.fraser, timothy, webkit-bug-importer, webkit-ews, zan | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||
OS: | All | ||||||||||||||||||||||
Attachments: |
|
Description
Ryosuke Niwa
2013-09-11 14:49:30 PDT
Applies to InjectedScriptSource_js too, which is also large. Also InspectorOverlayPage_html (which contains <style> and <script> that could be minified). Minifying with jsmin (keeping the license header) shows pretty good savings on disk: > 574K InjectedScriptCanvasModuleSource-before.h > 334K InjectedScriptCanvasModuleSource-after.h > > 280K InjectedScriptSource-before.h > 150K InjectedScriptSource-after.h I'll do a measurement with the command rniwa showed (need to do a release build and it takes a while to run the command on the binary). Inspector still looks good. Unfortunately this change to DerivedSources.make only really helps the few ports that use that script. Other ports will need to update their build scripts, or we should make one smart script that does everything. Created attachment 211493 [details]
[PATCH] Proposed Fix
Comment on attachment 211493 [details]
[PATCH] Proposed Fix
Oops, forgot ChangeLog.
Attachment 211493 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Total errors found: 11 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 211494 [details]
[PATCH] Proposed Fix
Attachment 211494 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Total errors found: 11 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Stats with rniwa's calculations: before: 95.61k 17e70 InjectedScriptCanvasModuleSource_js [NameNList, MangledNameNList, NList] after: 55.59k de60 InjectedScriptCanvasModuleSource_js [NameNList, MangledNameNList, NList] before: 46.77k bb10 InjectedScriptSource_js [NameNList, MangledNameNList, NList] after: 24.97k 63e0 InjectedScriptSource_js [NameNList, MangledNameNList, NList] I'm going to tackle InspectorOverlayPage.html JS/CSS minification in: <https://webkit.org/b/121270> Web Inspector: InspectorOverlayPage_html should have minified css and js Comment on attachment 211494 [details] [PATCH] Proposed Fix Rejecting attachment 211494 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: act-list-items-014.html [ ImageOnlyFailure Pass ] fast/regions/counters/extract-list-items-015.html [ ImageOnlyFailure Pass ] fast/regions/counters/extract-numbered-paragraphs-divs-002.html [ ImageOnlyFailure Pass ] Regressions: Unexpected text-only failures (1) inspector/console/command-line-api.html [ Failure ] ------------------------------------------------------------------------------ Failed to execute Tools/Scripts/new-run-webkit-tests at Tools/Scripts/run-webkit-tests line 100. Full output: http://webkit-queues.appspot.com/results/1862160 Created attachment 211497 [details]
Archive of layout-test-results from webkit-cq-02 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-02 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Comment on attachment 211494 [details] [PATCH] Proposed Fix Attachment 211494 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1845016 New failing tests: inspector/console/command-line-api.html Created attachment 211498 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.4
(In reply to comment #16) > Created an attachment (id=211498) [details] > Archive of layout-test-results from webkit-ews-05 for mac-mountainlion > > The attached test failures were seen while running run-webkit-tests on the mac-ews. > Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.4 Looks legit. I'll update the test and land it manually. - CONSOLE MESSAGE: line 1166: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s") + CONSOLE MESSAGE: line 208: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s") Oh, hmm, so because we minify but other ports don't right now that would be problematic. Really I just should remove the line number from outputting in that test, because it constantly needs to be updated. Comment on attachment 211494 [details] [PATCH] Proposed Fix Attachment 211494 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1871104 New failing tests: inspector/console/command-line-api.html Created attachment 211499 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Created attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html So, because of that failing test, I decided to go further: 1. No longer keep the license in the xxd output. Its just wasted space 2. Minify in other ports, should keep the test passing. 3. Fix InspectorOverlayPage.html here, instead of <https://webkit.org/b/121270> Since they are so related, might as well do them at the same time. *** Bug 121270 has been marked as a duplicate of this bug. *** Stats for InspectorOverlayPage_html: before: 18.13k 4880 InspectorOverlayPage_html [NameNList, MangledNameNList, NList] after: 13.97k 37e0 InspectorOverlayPage_html [NameNList, MangledNameNList, NList] And just the generated size on disk: 84K InspectorOverlayPage-after.h 109K InspectorOverlayPage-before.h Note this still includes a copyright comment at the top. Would be nice to strip that. Comment on attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html Attachment 211579 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1862242 Attachment 211579 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/inspector/console/command-line-api-expected.txt', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/DerivedSources.pri', u'Source/WebCore/GNUmakefile.am', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorOverlayPage.css', u'Source/WebCore/inspector/InspectorOverlayPage.html', u'Source/WebCore/inspector/InspectorOverlayPage.js', u'Source/WebCore/inspector/Scripts/cssmin.py', u'Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/cssmin.py:28: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/cssmin.py:34: whitespace before ')' [pep8/E202] [5]
Source/WebCore/inspector/Scripts/cssmin.py:33: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py:36: expected 2 blank lines, found 1 [pep8/E302] [5]
Total errors found: 15 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html Attachment 211579 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1819081 Comment on attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html View in context: https://bugs.webkit.org/attachment.cgi?id=211579&action=review > Source/WebCore/DerivedSources.pri:832 > +inspectorOverlayPage.depends $$INSPECTOR_OVERLAY_PAGE Missing `=`, should be: inspectorOverlayPage.depends = $$INSPECTOR_OVERLAY_PAGE Waiting on other bots. I'll continue to use the EWS to check their builds. Created attachment 211582 [details]
[PATCH] For Bots 1
Attachment 211582 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/inspector/console/command-line-api-expected.txt', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/DerivedSources.pri', u'Source/WebCore/GNUmakefile.am', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorOverlayPage.css', u'Source/WebCore/inspector/InspectorOverlayPage.html', u'Source/WebCore/inspector/InspectorOverlayPage.js', u'Source/WebCore/inspector/Scripts/cssmin.py', u'Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/cssmin.py:28: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/cssmin.py:34: whitespace before ')' [pep8/E202] [5]
Source/WebCore/inspector/Scripts/cssmin.py:33: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Total errors found: 14 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Hmm, looks like I'll need some help from EFL for CMakeLists.txt. The following build command is failing: > # Generate InjectedScriptSource.h > add_custom_command( > OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h > MAIN_DEPENDENCY inspector/InjectedScriptSource.js > COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/Scripts/jsmin.py <${WEBCORE_DIR}/inspector/InjectedScriptSource.js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.min.js > COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/inspector/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_WEBCORE_DIR}/InjectedScriptSource.h > VERBATIM) Failing with error: > Generating ../../DerivedSources/WebCore/InjectedScriptSource.h > Can't open file for read: /mnt/eflews/webkit/WebKit/WebKitBuild/Release/DerivedSources/WebCore/InjectedScriptSource.min.js No such file or directory at /mnt/eflews/webkit/WebKit/Source/WebCore/inspector/xxd.pl line 36. > make[2]: *** [DerivedSources/WebCore/InjectedScriptSource.h] Error 2 I would have though this would work, given what I've read about add_custom_command and COMMAND: <http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_custom_command> > add_custom_command(OUTPUT output1 [output2 ...] > COMMAND command1 [ARGS] [args1...] > [COMMAND command2 [ARGS] [args2...] ...] > [MAIN_DEPENDENCY depend] > [DEPENDS [depends...]] > [IMPLICIT_DEPENDS <lang1> depend1 ...] > [WORKING_DIRECTORY dir] > [COMMENT comment] [VERBATIM] [APPEND]) > > If more than one command is specified they will be executed in order. The optional ARGS argument is for backward compatibility and will be ignored. […] So I would have expected the first command to create DerivedSources/WebCore/InjectedScriptSource.min.js and it would exist with the second command. Apparently that is not the case. What would be the best way to fix this? Patrick Gansterer or Halton Huo, any ideas on how I could get what I want in the CMakeList file? Created attachment 211602 [details]
[PATCH] For Bots 2
Attachment 211602 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/inspector/console/command-line-api-expected.txt', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/DerivedSources.pri', u'Source/WebCore/GNUmakefile.am', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorOverlayPage.css', u'Source/WebCore/inspector/InspectorOverlayPage.html', u'Source/WebCore/inspector/InspectorOverlayPage.js', u'Source/WebCore/inspector/Scripts/cssmin.py', u'Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/cssmin.py:28: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/cssmin.py:34: whitespace before ')' [pep8/E202] [5]
Source/WebCore/inspector/Scripts/cssmin.py:33: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Total errors found: 14 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Removing the copyright comment saved another 1.5k in each: before: 95.61k 17e70 InjectedScriptCanvasModuleSource_js [NameNList, MangledNameNList, NList] after: 55.59k de60 InjectedScriptCanvasModuleSource_js [NameNList, MangledNameNList, NList] no copyright comment: 54.08k d850 InjectedScriptCanvasModuleSource_js [NameNList, MangledNameNList, NList] before: 46.77k bb10 InjectedScriptSource_js [NameNList, MangledNameNList, NList] after: 24.97k 63e0 InjectedScriptSource_js [NameNList, MangledNameNList, NList] no copyright comment: 23.44k 5dc0 InjectedScriptSource_js [NameNList, MangledNameNList, NList] Is there something I need to do to get the EFL EWS bots to run the last patch? Comment on attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html Attachment 211579 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/1861301 Comment on attachment 211602 [details] [PATCH] For Bots 2 Attachment 211602 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/1817271 Comment on attachment 211579 [details] [PATCH] Improved - All ports, update test, address InspectorOverlayPage.html Attachment 211579 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1878245 Comment on attachment 211602 [details] [PATCH] For Bots 2 Attachment 211602 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1911235 (In reply to comment #31) > Patrick Gansterer or Halton Huo, any ideas on how I could get what I want in the CMakeList file? Replace the " && " with "\nCOMMAND " is better style, since CMake can run more than one command for the target (http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:add_custom_command). But the problem is more that the redirection of the output ">" is missing in the CMakeLists.txt files. So no CMake problem AFAIKS ;-). I know that it's not your fault, but please also add the scripts (${WEBCORE_DIR}/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py and ${WEBCORE_DIR}/inspector/xxd.pl) to DEPENDS, so they get regenerated when the scripts change. Adding *.combined.html and *.min.js files to OUTPUT so a "make clean" will remove them. I'd create new add_custom_commands for the *.combined.html and *.min.js instead of adding them into the other one, but I have no strong opinion on it. (In reply to comment #40) > (In reply to comment #31) > > Patrick Gansterer or Halton Huo, any ideas on how I could get what I want in the CMakeList file? > > Replace the " && " with "\nCOMMAND " is better style, since CMake can run more than one command for the target (http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:add_custom_command). Yah that was my first attempt. > But the problem is more that the redirection of the output ">" is missing in the CMakeLists.txt files. So no CMake problem AFAIKS ;-). Aarrrrgghhhhh!!!! Thanks for pointing that out. =) > I know that it's not your fault, but please also add the scripts (${WEBCORE_DIR}/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py and ${WEBCORE_DIR}/inspector/xxd.pl) to DEPENDS, so they get regenerated when the scripts change. Adding *.combined.html and *.min.js files to OUTPUT so a "make clean" will remove them. Good ideas. > I'd create new add_custom_commands for the *.combined.html and *.min.js instead of adding them into the other one, but I have no strong opinion on it. I'm going to stick with a few COMMANDs now, because it keeps the lines together, like other port builds. Created attachment 211636 [details]
[PATCH] For Bots 3
Attachment 211636 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/inspector/console/command-line-api-expected.txt', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/DerivedSources.pri', u'Source/WebCore/GNUmakefile.am', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorOverlayPage.css', u'Source/WebCore/inspector/InspectorOverlayPage.html', u'Source/WebCore/inspector/InspectorOverlayPage.js', u'Source/WebCore/inspector/Scripts/cssmin.py', u'Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py', u'Source/WebCore/inspector/Scripts/jsmin.py']" exit_code: 1
Source/WebCore/inspector/Scripts/cssmin.py:28: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/cssmin.py:34: whitespace before ')' [pep8/E202] [5]
Source/WebCore/inspector/Scripts/cssmin.py:33: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:35: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:44: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:49: multiple statements on one line (semicolon) [pep8/E702] [5]
Source/WebCore/inspector/Scripts/jsmin.py:51: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:54: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:57: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:60: expected 2 blank lines, found 1 [pep8/E302] [5]
Source/WebCore/inspector/Scripts/jsmin.py:64: expected 1 blank line, found 0 [pep8/E301] [5]
Source/WebCore/inspector/Scripts/jsmin.py:78: at least two spaces before inline comment [pep8/E261] [5]
Source/WebCore/inspector/Scripts/jsmin.py:139: too many blank lines (2) [pep8/E303] [5]
Source/WebCore/inspector/Scripts/jsmin.py:163: too many blank lines (2) [pep8/E303] [5]
Total errors found: 14 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed <http://trac.webkit.org/changeset/155763>. |