Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3697

Dart generator does not name imports

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Dart - Compiler
    • Labels:
      None

      Description

      PROBLEM

      The example below results in a Dart analyzer error since the reference to b.Foo is ambiguous in the generated code.

      FIX

      Name imports for dependencies to make references explicit.

      EXAMPLE

      thrift -r --gen dart a.thrift

      a.thrift

      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
      }
      

      b.thrift

      namespace dart b
      
      /**@ Foo in b*/
      struct Foo {
      	1:string name
      }
      

        Attachments

          Activity

            People

            • Assignee:
              markerickson-wk Mark Erickson
              Reporter:
              markerickson-wk Mark Erickson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: