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-4797) Generated Go code produces name collisions on imports
Date Mon, 11 Feb 2019 22:35:00 GMT

    [ 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)

Mime
View raw message