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

Can Celasun commented on THRIFT-4610:
-------------------------------------

>From "thrift --help":
{code:java}
  -r[ecurse]  Also generate included files
{code}
So yes, you need to include it.

> [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
>            Priority: Critical
>
> 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 an import of 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. *So it basically tries to import itself.*
>  
> 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