You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yinyin L (JIRA)" <ji...@apache.org> on 2015/03/03 20:00:07 UTC

[jira] [Created] (THRIFT-3021) Service remote tool does not import stub package with package prefix

Yinyin L created THRIFT-3021:
--------------------------------

             Summary: Service remote tool does not import stub package with package prefix
                 Key: THRIFT-3021
                 URL: https://issues.apache.org/jira/browse/THRIFT-3021
             Project: Thrift
          Issue Type: Bug
          Components: Go - Compiler
    Affects Versions: 0.9.2
         Environment: Go 1.4.2
            Reporter: Yinyin L
            Priority: Minor


When generating code with package_prefix option, the generated service remote tool does not import generated package with given package prefix.

For example, generate Go code for the following thrift:
{noformat}
namespace go testpkgprefix.api.thrift_gen

service TestPkgPrefix {
	string echo(1: required string msg);
}
{noformat}

with command:

{noformat}
thrift --gen go:package_prefix=repo.local/user/ -out src/repo.local/user -v idl/testpkgprefix.thrift
{noformat}

The resulted Go code will resides in {{src/repo.local/user/testpkgprefix/api/thrift_gen}}.

But the import statement of service remote tool ( {{src/repo.local/user/testpkgprefix/api/thrift_gen/test_pkg_prefix-remote/test_pkg_prefix-remote.go}} ) will be:
{noformat}
import (
	... // skip
	"testpkgprefix/api/thrift_gen"
	... // skip
{noformat}
instead of:
{noformat}
import (
	... // skip
	"repo.local/user/testpkgprefix/api/thrift_gen"
	... // skip
{noformat}

This issue prevents some tool which does full build (build with ./...) from function normally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)