searchbox_api.js is failing minification for some reason |
|||||||||
Issue description
Not sure why, assigning to treib@ who has changed this file most recently.
$ echo $GN_DEFINES
is_component_build=true ffmpeg_branding="Chrome" proprietary_codecs=true enable_nacl=false dcheck_always_on=true use_goma=true is_clang=true disable_incremental_isolated_processes=true is_debug=false target_os="android"
$ ninja -C out_android/Release chrome_public_apk_incremental -j 2000
[6236/23247] ACTION //chrome/renderer:resources_grit(//build/toolchain/android:clang_arm)
/tmp/tmpFRzn79.js:16: ERROR - Parse error. Semi-colon expected
native function Focus();
^
1 error(s), 0 warning(s)
Traceback (most recent call last):
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 47, in <module>
result = Minify(sys.stdin.read())
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 39, in Minify
return result
File "/usr/lib/python2.7/tempfile.py", line 427, in __exit__
self.close()
File "/usr/lib/python2.7/tempfile.py", line 418, in close
self.unlink(self.name)
OSError: [Errno 2] No such file or directory: '/tmp/tmpmAJpea.js'
Minification failed, using original source
/tmp/tmp1OXKq9.js:16: ERROR - Parse error. Semi-colon expected
native function Focus();
^
1 error(s), 0 warning(s)
Traceback (most recent call last):
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 47, in <module>
result = Minify(sys.stdin.read())
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 39, in Minify
return result
File "/usr/lib/python2.7/tempfile.py", line 427, in __exit__
self.close()
File "/usr/lib/python2.7/tempfile.py", line 418, in close
self.unlink(self.name)
OSError: [Errno 2] No such file or directory: '/tmp/tmpOcZX1r.js'
Minification failed, using original source
/tmp/tmpBNXoWv.js:16: ERROR - Parse error. Semi-colon expected
native function Focus();
^
1 error(s), 0 warning(s)
Traceback (most recent call last):
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 47, in <module>
result = Minify(sys.stdin.read())
File "/d/code/chrome/src/third_party/closure_compiler/js_minify.py", line 39, in Minify
return result
File "/usr/lib/python2.7/tempfile.py", line 427, in __exit__
self.close()
File "/usr/lib/python2.7/tempfile.py", line 418, in close
self.unlink(self.name)
OSError: [Errno 2] No such file or directory: '/tmp/tmpStbxSf.js'
Minification failed, using original source
,
Sep 6 2016
Looks like the minifier doesn't know the "native" keyword (which I think is some V8-specific thing)? Not sure what to do about that. +dbeam who AFAIK has been working on JS minification - any ideas?
,
Sep 6 2016
,
Sep 7 2016
,
Sep 7 2016
i'm not sure that jscompiler really supports the `native` keyword
,
Sep 13 2016
There is issue 631937 for re-writing the searchbox v8 extension as a Gin class. As a side-effect, that would get rid of the "native" keyword and thus probably resolve this issue.
,
Sep 13 2016
Build spam is typically p0 despite not actually being that severe as a matter of project health (easy for other messages to get lost), so if someone could pick this up sooner than later that'd be appreciated. +build folk.
,
Sep 13 2016
Please take a look at https://codereview.chromium.org/2337253002. I have reduced the output on failure to a single line saying that the original source is being used. I think this is reasonable balance between spam and telling developer's too little. This, of course, does not get resolve the failure to minify, but that should be dealt with by issue 631937 .
,
Oct 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2dfa9b2034b9e982fa119f70cc8d324b0a0a4485 commit 2dfa9b2034b9e982fa119f70cc8d324b0a0a4485 Author: aberent <aberent@chromium.org> Date: Mon Oct 24 09:38:31 2016 Remove minification spam searchbox_api.js uses a Chrome extension to Javascript. This is not understood by the Closure compiler, so was giving errors when grit attempted to minify it. To prevent this don't minify this file. BUG= 644392 Review-Url: https://codereview.chromium.org/2337253002 Cr-Commit-Position: refs/heads/master@{#427033} [modify] https://crrev.com/2dfa9b2034b9e982fa119f70cc8d324b0a0a4485/tools/grit/grit/format/html_inline.py [modify] https://crrev.com/2dfa9b2034b9e982fa119f70cc8d324b0a0a4485/tools/grit/grit/format/minifier.py [modify] https://crrev.com/2dfa9b2034b9e982fa119f70cc8d324b0a0a4485/tools/grit/grit/node/include.py
,
Oct 24 2016
Closing now that we are no longer spamming the output. The actual problems with minifying searchbox_api.js should be fixed in the context of issue 631937 . |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by dalecur...@chromium.org
, Sep 6 2016