Roll closure compiler to latest version Version: v20190106 |
||||||
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);
^^^
,
Jan 16
(6 days ago)
alemate@ is probably most familiar with the file at this point, it has been years since I touched it
,
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
,
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
,
Jan 16
(6 days ago)
@alemate, sammiequon: Candidate fix for ChromeOS pin_keyboard.js at https://chromium-review.googlesource.com/c/chromium/src/+/1416532.
,
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
,
Jan 17
(6 days ago)
@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
,
Jan 17
(6 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cedd7c50592675cdc2bb7057154e58f2865355e2 commit cedd7c50592675cdc2bb7057154e58f2865355e2 Author: Joel Hockey <joelhockey@chromium.org> Date: Thu Jan 17 04:17:41 2019 Fix filemanager JS bugs found by latest closure Bug: 922671 Change-Id: Ifb51ca3a6279e7e6b4b0d855a02edadd16f35584 Reviewed-on: https://chromium-review.googlesource.com/c/1415055 Reviewed-by: Noel Gordon <noel@chromium.org> Commit-Queue: Joel Hockey <joelhockey@chromium.org> Cr-Commit-Position: refs/heads/master@{#623573} [modify] https://crrev.com/cedd7c50592675cdc2bb7057154e58f2865355e2/ui/file_manager/file_manager/background/js/background.js [modify] https://crrev.com/cedd7c50592675cdc2bb7057154e58f2865355e2/ui/file_manager/file_manager/background/js/volume_manager_impl.js [modify] https://crrev.com/cedd7c50592675cdc2bb7057154e58f2865355e2/ui/file_manager/file_manager/common/js/unittest_util.js
,
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
,
Jan 17
(5 days ago)
@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
,
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
,
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
,
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
,
Jan 18
(4 days ago)
,
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!
,
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 |
||||||
Comment 1 by dpa...@chromium.org
, Jan 16 (6 days ago)