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

Issue 922671 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Roll closure compiler to latest version Version: v20190106

Project Member Reported by dpa...@chromium.org, Jan 16 (6 days ago)

Issue description

I am attempting to update the Closure compiler to its latest version and encountering quite a few newly uncovered errors.

Will use this bug as a tracker to fix these errors before rolling the new version. Pasting the ones I've spotted so far below


../../ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js:188: ERROR - mismatch of the focus property type and the type of the property it overrides from superclass Element
original: function(this:Element, {preventScroll: boolean}=): undefined
override: function(this:PinKeyboardElement, number=, number=): undefined
  focus: function(opt_selectionStart, opt_selectionEnd) {
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


../../chrome/browser/resources/omnibox/omnibox_output.js:120: ERROR - mismatch of the matches property type and the type of the property it overrides from superclass Element
original: function(this:Element, string): boolean
override: Array<OutputMatch>
   get matches() {
                 ^

../../chrome/browser/resources/omnibox/omnibox_output.js:277: ERROR - mismatch of the matches property type and the type of the property it overrides from superclass Element
original: function(this:Element, string): boolean
override: Array<OutputMatch>
   get matches() {
                 ^

../../mojo/public/tools/bindings/generators/js_templates/lite/test/test.js:14: ERROR - initializing variable
found   : (null|{values: Array<string>})
required: {values: Array<string>}
  let result = await proxy.method1();
               ^^^^^^^^^^^^^^^^^^^^^

FAILED: gen/chrome/browser/resources/welcome/onboarding_welcome/google_apps/closure_compile.js 
python ../../third_party/closure_compiler/js_binary.py --compiler ../../third_party/closure_compiler/compiler/compiler.jar --output gen/chrome/browser/resources/welcome/onboarding_welcome/google_apps/closure_compile.js --deps gen/chrome/browser/resources/welcome/onboarding_welcome/google_apps/nux_google_apps.js_library --sources --checks-only --flags extra_annotation_name=attribute extra_annotation_name=demo extra_annotation_name=element extra_annotation_name=group extra_annotation_name=hero extra_annotation_name=homepage extra_annotation_name=status extra_annotation_name=submodule jscomp_error=accessControls jscomp_error=ambiguousFunctionDecl jscomp_error=checkTypes jscomp_error=checkVars jscomp_error=constantProperty jscomp_error=deprecated jscomp_error=externsValidation jscomp_error=globalThis jscomp_error=invalidCasts jscomp_error=missingProperties jscomp_error=missingReturn jscomp_error=nonStandardJsDocs jscomp_error=suspiciousCode jscomp_error=undefinedNames jscomp_error=undefinedVars jscomp_error=unknownDefines jscomp_error=uselessCode jscomp_error=visibility compilation_level=SIMPLE_OPTIMIZATIONS language_in=ECMASCRIPT_2017 language_out=ECMASCRIPT5_STRICT chrome_pass polymer_pass jscomp_off=duplicate --externs ../../third_party/closure_compiler/externs/chrome.js ../../third_party/closure_compiler/externs/polymer-1.0.js
../../chrome/browser/resources/welcome/onboarding_welcome/shared/app_chooser.js:272: ERROR - actual parameter 1 of AppChooserElement.prototype.updateBookmark_ does not match formal parameter
found   : {
  icon: string,
  id: number,
  name: string,
  url: string
}
required: {
  bookmarkId: (null|string),
  icon: string,
  id: number,
  name: string,
  selected: boolean,
  url: string
}
missing : [bookmarkId,selected]
mismatch: []
          this.updateBookmark_(app);
                               ^^^
 

Comment 1 by dpa...@chromium.org, Jan 16 (6 days ago)

Cc: steve...@chromium.org jdufault@chromium.org
@jdufault: Could you take a look at the ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js failure? It seems that the compiler no longer likes overriding a method (in this case focus())and changing its signature.

You can patch the following CL to try out the new compiler version
https://chromium-review.googlesource.com/c/chromium/src/+/1414350

Comment 2 by jdufault@chromium.org, Jan 16 (6 days ago)

Cc: alemate@chromium.org
alemate@ is probably most familiar with the file at this point, it has been years since I touched it
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7d48b0f35a81a3eef155061c377396fcc2fd7b2

commit a7d48b0f35a81a3eef155061c377396fcc2fd7b2
Author: manuk <manukh@chromium.org>
Date: Wed Jan 16 22:22:28 2019

[omnibox chrome:omnibox] Rename 'matches' to 'autocompleteMatches'

This change avoids a name conflict with HTML elements' native method matches.

Bug:  922671 
Change-Id: Id97f781cf4f46455a6ec2155a06c07aee1e6db25
Reviewed-on: https://chromium-review.googlesource.com/c/1415376
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623399}
[modify] https://crrev.com/a7d48b0f35a81a3eef155061c377396fcc2fd7b2/chrome/browser/resources/omnibox/omnibox_output.js

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75ed513036e0cab49e4a7a163278706d02c752bd

commit 75ed513036e0cab49e4a7a163278706d02c752bd
Author: Hector Carmona <hcarmona@chromium.org>
Date: Wed Jan 16 22:36:06 2019

Onboarding WebUI: Fix newly found closure compilation error.

Bug:  922671 
Change-Id: I0187a4a6534da3aba94399dd20a07f3308697bee
Reviewed-on: https://chromium-review.googlesource.com/c/1415970
Commit-Queue: Hector Carmona <hcarmona@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623410}
[modify] https://crrev.com/75ed513036e0cab49e4a7a163278706d02c752bd/chrome/browser/resources/welcome/onboarding_welcome/shared/app_chooser.js

Comment 5 by dpa...@chromium.org, Jan 16 (6 days ago)

Cc: sammiequon@chromium.org
@alemate, sammiequon: Candidate fix for ChromeOS pin_keyboard.js at https://chromium-review.googlesource.com/c/chromium/src/+/1416532.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 17 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/30faaba26cc0fa9230e482b1fab778fab111fa87

commit 30faaba26cc0fa9230e482b1fab778fab111fa87
Author: dpapad <dpapad@chromium.org>
Date: Thu Jan 17 01:51:42 2019

ChromeOS pin keyboard: Fix newly found Closure compilation error.

Overriding the native HTMLElement focus() method and changing its
signature is causing a compilation error, with the latest version of the
Closure compiler.

Fix by renaming the method to focusInput() which also reflects better
what it actually does.

Bug:  922671 
Change-Id: I050caac0e6139eeb1826ddc726f70e349750ca9f
Reviewed-on: https://chromium-review.googlesource.com/c/1416532
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623506}
[modify] https://crrev.com/30faaba26cc0fa9230e482b1fab778fab111fa87/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.html
[modify] https://crrev.com/30faaba26cc0fa9230e482b1fab778fab111fa87/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js
[modify] https://crrev.com/30faaba26cc0fa9230e482b1fab778fab111fa87/ui/webui/resources/cr_components/chromeos/quick_unlock/setup_pin_keyboard.js

Comment 7 by dpa...@chromium.org, Jan 17 (6 days ago)

Cc: joelhockey@chromium.org
@joelhockey: Could you take a look?

Discovered one more ChromeOS error pasting below

../../ui/file_manager/file_manager/common/js/unittest_util.js:117: ERROR - constant property chrome assigned a value more than once
  window.chrome = window.chrome || {};
  ^^^^^^^^^^^^^

1 error(s), 0 warning(s), 98.0% typed


Project Member

Comment 9 by bugdroid1@chromium.org, Jan 17 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ca3572ce60c863555243530273a76983b7348019

commit ca3572ce60c863555243530273a76983b7348019
Author: Christopher Lam <calamity@chromium.org>
Date: Thu Jan 17 05:31:54 2019

[Mojo WebUI] Update for Closure Compiler roll.

Since the new Closure Compiler actually does Promise return type
checking, we can rely on type inference.

Bug:  922671 
Change-Id: I1a7cf0dc4bce5aa989e6bb66e113cb66122daa4c
Reviewed-on: https://chromium-review.googlesource.com/c/1416793
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623598}
[modify] https://crrev.com/ca3572ce60c863555243530273a76983b7348019/mojo/public/tools/bindings/generators/js_templates/lite/test/test.js

Comment 10 by dpa...@chromium.org, Jan 17 (5 days ago)

Cc: dstockwell@chromium.org
@dstockwell: Found one more error within the PDF viewer, pasting below. Could you take a look?

../../chrome/browser/resources/pdf/elements/viewer-ink-host/viewer-ink-host.js:260: ERROR - inconsistent return type
found   : {dataToSave: (ArrayBuffer|null), fileName: (null|string)}
required: (IThenable<{dataToSave: (ArrayBuffer|null), fileName: string}>|{dataToSave: (ArrayBuffer|null), fileName: string})
    return {
           ^

1 error(s), 0 warning(s), 94.1% typed

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c61ac8628a0888a8187e962dc980fbe9649b922

commit 2c61ac8628a0888a8187e962dc980fbe9649b922
Author: dpapad <dpapad@chromium.org>
Date: Thu Jan 17 20:02:09 2019

Roll closure compiler to v20190106.

chrome.js: 7ef3422e1e87480d560247d75fee181b4cac24d9 -> 816824e445eb7ccc97becd07bdaf638d71b2e543
chrome_extensions.js: 929b2621980a8e5c3ea373f40f6e92c4a56d51be -> 2837b8bb87e537debd24fa649c18426fba905457
polymer-1.0.js: 203ab5d7394ad4662eed051f28f6fd21404531b7 -> 2ad6ea7c43f23021245eeefc60cd476676a0e933

Bug:  922671 
Change-Id: Ie970d6e8f8b38a730bb30351f938a6f219037a1b
Reviewed-on: https://chromium-review.googlesource.com/c/1414350
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623809}
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/chrome/browser/resources/pdf/elements/viewer-ink-host/viewer-ink-host.js
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/third_party/closure_compiler/README.chromium
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/third_party/closure_compiler/compiler/compiler.jar
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/third_party/closure_compiler/externs/chrome.js
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/third_party/closure_compiler/externs/chrome_extensions.js
[modify] https://crrev.com/2c61ac8628a0888a8187e962dc980fbe9649b922/third_party/closure_compiler/externs/polymer-1.0.js

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d

commit 2a26a6a811b05f99c7c214c4e61fe8e03529bf3d
Author: Ian Clelland <iclelland@chromium.org>
Date: Thu Jan 17 20:29:35 2019

Revert "Roll closure compiler to v20190106."

This reverts commit 2c61ac8628a0888a8187e962dc980fbe9649b922.

Reason for revert: Breaks compile because of error in pending.js

[21256/69315] ACTION //mojo/public/js:bindings_lite(//build/toolchain/linux:clang_x64)
FAILED: gen/mojo/public/js/mojo_bindings_lite.js 
python ../../third_party/closure_compiler/js_binary.py --compiler ../../third_party/closure_compiler/compiler/compiler.jar --output gen/mojo/public/js/mojo_bindings_lite.js --deps gen/mojo/public/js/bindings_lite_sources.js_library --sources ../../mojo/public/js/bindings_lite.js --flags jscomp_error=accessControls jscomp_error=ambiguousFunctionDecl jscomp_error=checkTypes jscomp_error=checkVars jscomp_error=constantProperty jscomp_error=deprecated jscomp_error=externsValidation jscomp_error=globalThis jscomp_error=invalidCasts jscomp_error=missingProperties jscomp_error=missingReturn jscomp_error=nonStandardJsDocs jscomp_error=suspiciousCode jscomp_error=undefinedNames jscomp_error=undefinedVars jscomp_error=unknownDefines jscomp_error=uselessCode jscomp_error=visibility compilation_level=ADVANCED_OPTIMIZATIONS language_in=ECMASCRIPT_2017 language_out=ECMASCRIPT5_STRICT generate_exports --externs ../../third_party/closure_compiler/externs/chrome.js ../../third_party/closure_compiler/externs/polymer-1.0.js ../../third_party/closure_compiler/externs/mojo_core.js ../../third_party/closure_compiler/externs/pending.js
../../third_party/closure_compiler/externs/pending.js:120: ERROR - Variable Clipboard declared more than once. First occurrence: externs.zip//w3c_clipboard.js
function Clipboard() {}
         ^^^^^^^^^

1 error(s), 0 warning(s)


See https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/linux-rel/15802


Original change's description:
> Roll closure compiler to v20190106.
> 
> chrome.js: 7ef3422e1e87480d560247d75fee181b4cac24d9 -> 816824e445eb7ccc97becd07bdaf638d71b2e543
> chrome_extensions.js: 929b2621980a8e5c3ea373f40f6e92c4a56d51be -> 2837b8bb87e537debd24fa649c18426fba905457
> polymer-1.0.js: 203ab5d7394ad4662eed051f28f6fd21404531b7 -> 2ad6ea7c43f23021245eeefc60cd476676a0e933
> 
> Bug:  922671 
> Change-Id: Ie970d6e8f8b38a730bb30351f938a6f219037a1b
> Reviewed-on: https://chromium-review.googlesource.com/c/1414350
> Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
> Reviewed-by: calamity <calamity@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#623809}

TBR=calamity@chromium.org,dpapad@chromium.org

Change-Id: I80058e72fa3b9273d8cc949d5343b2ecad56c7fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  922671 
Reviewed-on: https://chromium-review.googlesource.com/c/1418731
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Auto-Submit: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623818}
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/chrome/browser/resources/pdf/elements/viewer-ink-host/viewer-ink-host.js
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/third_party/closure_compiler/README.chromium
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/third_party/closure_compiler/compiler/compiler.jar
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/third_party/closure_compiler/externs/chrome.js
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/third_party/closure_compiler/externs/chrome_extensions.js
[modify] https://crrev.com/2a26a6a811b05f99c7c214c4e61fe8e03529bf3d/third_party/closure_compiler/externs/polymer-1.0.js

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 18 (4 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93c4fdd5076e94ad8075a345a8159b0551f57742

commit 93c4fdd5076e94ad8075a345a8159b0551f57742
Author: dpapad <dpapad@chromium.org>
Date: Fri Jan 18 18:06:16 2019

[Reland] Roll closure compiler to v20190106.

chrome.js: 7ef3422e1e87480d560247d75fee181b4cac24d9 -> 816824e445eb7ccc97becd07bdaf638d71b2e543
chrome_extensions.js: 929b2621980a8e5c3ea373f40f6e92c4a56d51be -> 2837b8bb87e537debd24fa649c18426fba905457
polymer-1.0.js: 203ab5d7394ad4662eed051f28f6fd21404531b7 -> 2ad6ea7c43f23021245eeefc60cd476676a0e933

Bug:  922671 
Change-Id: I83d79945b56d2b8fdcc12682edc60b626a7e40b4
Reviewed-on: https://chromium-review.googlesource.com/c/1418940
Reviewed-by: calamity <calamity@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624201}
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/chrome/browser/resources/pdf/elements/viewer-ink-host/viewer-ink-host.js
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/README.chromium
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/compiler/compiler.jar
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/externs/chrome.js
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/externs/chrome_extensions.js
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/externs/pending.js
[modify] https://crrev.com/93c4fdd5076e94ad8075a345a8159b0551f57742/third_party/closure_compiler/externs/polymer-1.0.js

Comment 14 by dpa...@chromium.org, Jan 18 (4 days ago)

Status: Fixed (was: Assigned)

Comment 15 by dpa...@chromium.org, Jan 19 (4 days ago)

Forgot to say thanks to everyone who quickly acted upon fixing errors in various parts of the code. Thank you!
Project Member

Comment 16 by bugdroid1@chromium.org, Yesterday (29 hours ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5a45f1d615a82fbc418a33e56f0ee9f9aff1554

commit a5a45f1d615a82fbc418a33e56f0ee9f9aff1554
Author: Christopher Lam <calamity@chromium.org>
Date: Tue Jan 22 01:23:06 2019

[Closure Compiler] Add compiler as a dependency to the compile.

Bug:  922671 
Change-Id: I85d5d3744f06a77d7656dde90f2c8100785101d6
Reviewed-on: https://chromium-review.googlesource.com/c/1420501
Commit-Queue: calamity <calamity@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624710}
[modify] https://crrev.com/a5a45f1d615a82fbc418a33e56f0ee9f9aff1554/third_party/closure_compiler/compile_js.gni

Sign in to add a comment