thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (THRIFT-5019) Multiple import same namespace for go included files
Date Thu, 21 Nov 2019 21:37:00 GMT

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

Jens Geyer edited comment on THRIFT-5019 at 11/21/19 9:36 PM:
--------------------------------------------------------------

Just wanted to mention that the behaviour is questionable, but more or less a known issue.
It also affects next to all languages, not only Go. The unwritten law is that a namespace
cannot span across multiple Thrift IDLfiles. If we are going to call this a bug, then we should
be consequent and fix it everywhere.


was (Author: jensg):
Just wanted to mention that the behaviour is questionable, but more or less a known issue.
It also affects next to all languages, not only Go. The unwritten law is that a namespace
cannot go across multiple Thrift IDLfiles. If we are going to call this a bug, then we should
be consequent and fix it everywhere.

> 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
>          Components: Go - Compiler
>    Affects Versions: 0.12.0, 0.13.0
>            Reporter: Andrey Petko
>            Assignee: Duru Can Celasun
>            Priority: Major
>             Fix For: 0.14.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)

Mime
View raw message