You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Andrey Petko (Jira)" <ji...@apache.org> on 2019/11/20 10:48:00 UTC

[jira] [Updated] (THRIFT-5019) Multiple import same namespace for go included files

     [ https://issues.apache.org/jira/browse/THRIFT-5019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Petko updated THRIFT-5019:
---------------------------------
    Description: 
When I include two files with same namespace for go language:
{code:java}
include "common/Exceptions.thrift"
include "common/Typedefs.thrift"{code}
And generate it for golang in result in import I have import of this namespace twice:
{code:java}
import(
   "bytes"
   "context"
   "reflect"
   "fmt"
   "github.com/apache/thrift/lib/go/thrift"
   "my_namespace"
   "my_namespace"
)
{code}
And when I try to use I have an error because of this:
"'my_namespace' redeclared as imported package name"

  was:
When I include two files with same namespace for go language:
{code:java}
include "common/Exceptions.thrift"
include "common/Typedefs.thrift"{code}
And generate it for golang in result in import I have import of this namespace twice:
{code:java}
import(
   "bytes"
   "context"
   "reflect"
   "fmt"
   "github.com/apache/thrift/lib/go/thrift"
   "my_namespace"
   "my_namespace"
)
{code}
And when I try to use I have an error because of this.


> Multiple import same namespace for go included files
> ----------------------------------------------------
>
>                 Key: THRIFT-5019
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5019
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.12.0, 0.13.0
>            Reporter: Andrey Petko
>            Priority: Major
>             Fix For: 0.12.0, 0.13.0
>
>
> When I include two files with same namespace for go language:
> {code:java}
> include "common/Exceptions.thrift"
> include "common/Typedefs.thrift"{code}
> And generate it for golang in result in import I have import of this namespace twice:
> {code:java}
> import(
>    "bytes"
>    "context"
>    "reflect"
>    "fmt"
>    "github.com/apache/thrift/lib/go/thrift"
>    "my_namespace"
>    "my_namespace"
> )
> {code}
> And when I try to use I have an error because of this:
> "'my_namespace' redeclared as imported package name"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)