Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Issue 776273003: Filter out more spurious Promise-related type checking errors. (Closed)

Created:
6 years ago by Ben Kwa
Modified:
6 years ago
Reviewers:
fukino
CC:
chromium-reviews, vitalyp+closure_chromium.org, dbeam+watch-closure_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Filter out more spurious Promise-related type checking errors. - Expand the PromiseErrorFilter to allow multiple types of errors to be filtered out. - Add a new type of allowed error, namely errors from the compiler failing to unwrap the result of a returned Promise chain. Example: /** @return {!Promise<string>} */ var getStringAsync = function() { /** @return {!Promise<string>} */ var generateString = function() {return Promise.resolve('foo');}; return Promise.resolve().then(generateString); }; The compiler will emit an error that looks like ERROR - inconsistent return type found : Promise<Promise<string>> required: Promise<string> BUG=406995 Committed: https://crrev.com/e24723c00ae1257c67a47c5d48c3a4ad7a8e30f5 Cr-Commit-Position: refs/heads/master@{#307045}

Patch Set 1 #

Patch Set 2 : Provide a more succinct example. #

Total comments: 5

Patch Set 3 : Address feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -44 lines) Patch
M third_party/closure_compiler/error_filter.py View 1 2 2 chunks +108 lines, -44 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Ben Kwa
6 years ago (2014-12-04 18:51:53 UTC) #2
fukino
I'm anxious about if we can filter out unwrapping-promise errors one by one, but this ...
6 years ago (2014-12-05 04:53:50 UTC) #3
Ben Kwa
Done. Thanks! Regarding your reservations about the unscalability of this approach, I agree. But, I ...
6 years ago (2014-12-05 17:30:28 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/776273003/40001
6 years ago (2014-12-05 17:32:36 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-12-05 18:09:32 UTC) #7
commit-bot: I haz the power
6 years ago (2014-12-05 18:10:24 UTC) #8
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e24723c00ae1257c67a47c5d48c3a4ad7a8e30f5
Cr-Commit-Position: refs/heads/master@{#307045}

Powered by Google App Engine
This is Rietveld 408576698