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

Issue 1204023003: remoting: Fix JSCompiler issues blocking ES6 transition. (Closed)

Created:
5 years, 6 months ago by James Hawkins
Modified:
5 years, 6 months ago
Reviewers:
garykac, Jamie
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

remoting: Fix JSCompiler issues blocking ES6 transition. * @suppress reportUnknownTypes for code using |arguments|, which is not well-handled by the JSCompiler type system. * Fix up ad hoc documentation into proper JSDoc annotation so the type system doesn't get hung up. R=garykac@chromium.org BUG=none Committed: https://crrev.com/71f8e5677f9fc34d75a25acf94a19e7615483afa Cr-Commit-Position: refs/heads/master@{#336044}

Patch Set 1 #

Patch Set 2 : Remove one. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -6 lines) Patch
M remoting/webapp/base/js/base.js View 3 chunks +3 lines, -0 lines 3 comments Download
M remoting/webapp/base/js/error.js View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/base/js/ipc.js View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/browser_test/bump_scroll_browser_test.js View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/js_proto/chrome_mocks.js View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/unittests/spy_promise_unittest.js View 2 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
James Hawkins
5 years, 6 months ago (2015-06-24 20:48:44 UTC) #1
garykac
Could you add more detail to the description. The current "Fix issues" comment is OK ...
5 years, 6 months ago (2015-06-24 22:02:39 UTC) #2
James Hawkins
On 2015/06/24 22:02:39, garykac wrote: > Could you add more detail to the description. The ...
5 years, 6 months ago (2015-06-24 22:05:42 UTC) #3
garykac
lgtm
5 years, 6 months ago (2015-06-24 22:36:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1204023003/20001
5 years, 6 months ago (2015-06-24 23:25:57 UTC) #6
commit-bot: I haz the power
Exceeded global retry quota
5 years, 6 months ago (2015-06-24 23:37:20 UTC) #8
Jamie
https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js File remoting/webapp/base/js/base.js (right): https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js#newcode68 remoting/webapp/base/js/base.js:68: * @suppress {reportUnknownTypes} Can you add something to the ...
5 years, 6 months ago (2015-06-24 23:50:18 UTC) #10
James Hawkins
https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js File remoting/webapp/base/js/base.js (right): https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js#newcode68 remoting/webapp/base/js/base.js:68: * @suppress {reportUnknownTypes} On 2015/06/24 23:50:18, Jamie wrote: > ...
5 years, 6 months ago (2015-06-25 00:00:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1204023003/20001
5 years, 6 months ago (2015-06-25 00:05:24 UTC) #13
Jamie
https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js File remoting/webapp/base/js/base.js (right): https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js#newcode68 remoting/webapp/base/js/base.js:68: * @suppress {reportUnknownTypes} On 2015/06/25 00:00:44, James Hawkins wrote: ...
5 years, 6 months ago (2015-06-25 00:10:49 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 6 months ago (2015-06-25 00:12:36 UTC) #15
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/71f8e5677f9fc34d75a25acf94a19e7615483afa Cr-Commit-Position: refs/heads/master@{#336044}
5 years, 6 months ago (2015-06-25 00:13:29 UTC) #16
James Hawkins
On 2015/06/25 00:10:49, Jamie wrote: > https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js > File remoting/webapp/base/js/base.js (right): > > https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js/base.js#newcode68 > ...
5 years, 6 months ago (2015-06-25 16:52:26 UTC) #17
Tyler Breisacher (Chromium)
On 2015/06/25 16:52:26, James Hawkins wrote: > On 2015/06/25 00:10:49, Jamie wrote: > > > ...
5 years, 6 months ago (2015-06-25 17:09:41 UTC) #18
Tyler Breisacher (Chromium)
5 years, 6 months ago (2015-06-25 17:12:03 UTC) #19
Message was sent while issue was closed.
On 2015/06/25 17:09:41, Tyler Breisacher (Chromium) wrote:
> On 2015/06/25 16:52:26, James Hawkins wrote:
> > On 2015/06/25 00:10:49, Jamie wrote:
> > >
> >
>
https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js...
> > > File remoting/webapp/base/js/base.js (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1204023003/diff/20001/remoting/webapp/base/js...
> > > remoting/webapp/base/js/base.js:68: * @suppress {reportUnknownTypes}
> > > On 2015/06/25 00:00:44, James Hawkins wrote:
> > > > On 2015/06/24 23:50:18, Jamie wrote:
> > > > > Can you add something to the CL description explaining why this is a
net
> > > win?
> > > > On
> > > > > the face of it, we're losing type checking here; I hope that's not
> > actually
> > > > the
> > > > > case, but either way, the CL should explain why we're doing it,
> especially
> > > > with
> > > > > no bug to refer to.
> > > > 
> > > > You're not losing type checking.  You're suppressing a warning for type
> > > > operations the compiler does not know about.  In every suppression in
this
> > CL,
> > > > the issue revolves around the use of |arguments|, whose type is not
> > > well-handled
> > > > by the JSCompiler (which I wrote in the description).
> > > 
> > > So am I right in thinking that the old compiler (or flags) did not enforce
> > this
> > > type check, but neither did it issue a warning,  whereas the new version
> > issues
> > > a warning, which we must suppress? If that's the case, then I have no
> > objection;
> > > it just wasn't clear without context that that's what's going on here.
> > 
> > +tbrei, can you provide any insights here?  My understanding is that there
was
> > no type checking for arguments in the ES5 mode, but it didn't complain
either.
> 
> > In ES6 mode we still have no type checking for arguments, but for some
reason
> or
> > other it shows up for the reportUnknownTypes pass.
> 
> I'll look into this. It's possible that we get slightly less-than-optimal
> typechecking coverage after ES6-to-ES5 transpilation. But in this case you're
> not using any ES6 features yet so that shouldn't happen.
> 
> In any case I don't think this is cause for concern. You will still get
> typechecking for the vast majority of the code, even in the methods that have
> that @suppress.

Filed https://github.com/google/closure-compiler/issues/1021

Powered by Google App Engine
This is Rietveld 408576698