You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mark Erickson (JIRA)" <ji...@apache.org> on 2016/02/28 23:45:18 UTC

[jira] [Commented] (THRIFT-3697) Dart generator does not name imports

    [ https://issues.apache.org/jira/browse/THRIFT-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171219#comment-15171219 ] 

Mark Erickson commented on THRIFT-3697:
---------------------------------------

https://github.com/markerickson-wf/thrift/pull/18/files

> Dart generator does not name imports
> ------------------------------------
>
>                 Key: THRIFT-3697
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3697
>             Project: Thrift
>          Issue Type: Bug
>            Reporter: Mark Erickson
>            Assignee: Mark Erickson
>
> h4. PROBLEM
> The example below results in a Dart analyzer error since the reference to b.Foo is ambiguous in the generated code.
> h4. FIX
> Name imports for dependencies to make references explicit.
> h4. EXAMPLE
> {code}thrift -r --gen dart a.thrift{code}
> a.thrift
> {code}
> include "b.thrift"
> namespace dart a
> /**@ Foo in a*/
> struct Foo {
> 	1:string name
> }
> /**@ Bar in a*/
> struct Bar {
> 	1:Foo aFoo,
> 	2:b.Foo bFoo
> }
> {code}
> b.thrift
> {code}
> namespace dart b
> /**@ Foo in b*/
> struct Foo {
> 	1:string name
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)