You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2019/02/11 22:35:00 UTC

[jira] [Comment Edited] (THRIFT-4797) Generated Go code produces name collisions on imports

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

Jens Geyer edited comment on THRIFT-4797 at 2/11/19 10:34 PM:
--------------------------------------------------------------

[~qix]: Did you try to {{namespace}} them?


was (Author: jensg):
Did you try to {{namespace}} them?

> Generated Go code produces name collisions on imports
> -----------------------------------------------------
>
>                 Key: THRIFT-4797
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4797
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>    Affects Versions: 0.12.0
>            Reporter: Josh Yudaken
>            Priority: Major
>
> If two modules have the same name, the produced go code will not compile.
> For example:
> {code:java}
> import (
>   "github.com/sample/project/common"
>   "github.com/different/thing/common"
> ){code}
> In go the final component (commons) is used as the name so there is a collision.
> This can be fixed by aliasing the modules
> {code:java}
> import (
>   common_1 "github.com/sample/project/common"
>   common_2 "github.com/different/thing/common"
> ){code}
>  



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