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

Issue 1834533002: Fix generated dart bindings for view_provider. (Closed)

Created:
4 years, 9 months ago by tonyg
Modified:
4 years, 9 months ago
Reviewers:
zra, rudominer, azani, jeffbrown
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, alhaad
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Fix generated dart bindings for view_provider. Previously: `NoSuchMethodError: method not found: 'view_token_mojom'` There's probably a bug in the dart bindings generator that imports of views.mojom aren't made available here. BUG= R=azani@chromium.org, jeffbrown@google.com, rudominer@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/31c5037ab2c63649632c9f2d4227ebe6f22015a4

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M mojo/dart/packages/mojo_services/lib/mojo/ui/view_provider.mojom.dart View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/ui/views/interfaces/view_provider.mojom View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
tonyg
Would anyone mind rolling this mojo_services pub after this lands?
4 years, 9 months ago (2016-03-23 22:57:02 UTC) #3
azani
lgtm
4 years, 9 months ago (2016-03-23 23:08:46 UTC) #4
azani
lgtm lgtm
4 years, 9 months ago (2016-03-23 23:08:46 UTC) #5
rudominer
lgtm Can you elaborate on the situation that caused you to get the `NoSuchMethodError: method ...
4 years, 9 months ago (2016-03-23 23:14:26 UTC) #6
jeffbrown
lgtm, definitely looks like a bug in mojom since it has no problem resolving types ...
4 years, 9 months ago (2016-03-23 23:15:23 UTC) #8
tonyg
On 2016/03/23 23:14:26, rudominer wrote: > lgtm > > Can you elaborate on the situation ...
4 years, 9 months ago (2016-03-23 23:18:39 UTC) #9
tonyg
Committed patchset #2 (id:20001) manually as 31c5037ab2c63649632c9f2d4227ebe6f22015a4 (presubmit successful).
4 years, 9 months ago (2016-03-23 23:20:41 UTC) #11
rudominer
4 years, 9 months ago (2016-03-23 23:21:26 UTC) #12
Message was sent while issue was closed.
On 2016/03/23 23:18:39, tonyg wrote:
> On 2016/03/23 23:14:26, rudominer wrote:
> > lgtm
> > 
> > Can you elaborate on the situation that caused you to get the
> > `NoSuchMethodError: method not found: 'view_token_mojom'`.
> > 
> > If this is a bug in the Dart generator it is a serious bug we should fix.
> 
> The generated ViewProviderCreateViewParams does this:
> ```
>       result.viewOwner = decoder0.decodeInterfaceRequest(8, false,
> view_token_mojom.ViewOwnerStub.newFromEndpoint);
> ```
> 
> That treats "view_token_mojom" as a member or local variable. My changes adds:
> 
> ```
> import 'package:mojo_services/mojo/ui/view_token.mojom.dart' as
> view_token_mojom;
> 
> ```
> So that it is properly treated as a package.
> 
> ViewOwner was moved from views.mojom (which is directly imported) to
> view_token.mojom (which prior to this patch was imported only by views.mojom).
> This patch makes a transitive dependency explicit. Since this worked w/ the
C++
> bindings for flutter, my guess is that C++ bindings respect transitive deps,
but
> dart bindings don't.

The Dart bindings definitely are supposed to handle transitive imports. We think
there is a bug that Alex is looking into.

Powered by Google App Engine
This is Rietveld 408576698