New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644392 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 631937



Sign in to add a comment

searchbox_api.js is failing minification for some reason

Project Member Reported by dalecur...@chromium.org, Sep 6 2016

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
 
Labels: -OS-Linux

Comment 2 by treib@chromium.org, Sep 6 2016

Cc: dbeam@chromium.org
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?
Status: Assigned (was: Unconfirmed)

Comment 4 by dbeam@chromium.org, Sep 7 2016

Cc: aber...@chromium.org

Comment 5 by dbeam@chromium.org, Sep 7 2016

Cc: tbreisacher@chromium.org
i'm not sure that jscompiler really supports the `native` keyword

Comment 6 by treib@chromium.org, Sep 13 2016

Blockedon: 631937
Cc: treib@chromium.org
Owner: ----
Status: Available (was: Assigned)
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.
Components: Build
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.
Owner: aber...@chromium.org
Status: Started (was: Available)
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 .
Project Member

Comment 9 by bugdroid1@chromium.org, 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

Comment 10 Deleted

Status: Fixed (was: Started)
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