Ermolay Romanov created THRIFT-4610:
---------------------------------------

             Summary: [GO] Include directive compiles to language-default import
                 Key: THRIFT-4610
                 URL: https://issues.apache.org/jira/browse/THRIFT-4610
             Project: Thrift
          Issue Type: Question
          Components: Go - Compiler
    Affects Versions: 0.11.0
            Reporter: Ermolay Romanov


Thrift IDL utilizing an `include` statement such as:
{code:java}
include "shared.thrift"{code}
creates a golang package that has:
{code:java}
import (
    ...
    "shared"
    ...
){code}
code.

 

In addition to that, if passing a package= directive to the CLI:
{code:java}
thrift --gen go:package=mommy{code}
the resulting code has references to the root "mommy" package — I think it 
replaces not only the gen-go package name with whatever is passed to the CLI 
but also the name of that import.

 

Expected: the code generator would pull needed imports and bundle them with the 
generated Go code, removing any need for importing anything further.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to