[ https://issues.apache.org/jira/browse/THRIFT-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14901519#comment-14901519 ]
Hudson commented on THRIFT-3338: -------------------------------- SUCCESS: Integrated in Thrift #1658 (See [https://builds.apache.org/job/Thrift/1658/]) THRIFT-3338 Stray underscore in generated go when service name starts with "New" (jensg: rev 293e2f450b22a993516c7703645540e72e7d3e85) * compiler/cpp/src/generate/t_go_generator.cc > Stray underscore in generated go when service name starts with "New" > -------------------------------------------------------------------- > > Key: THRIFT-3338 > URL: https://issues.apache.org/jira/browse/THRIFT-3338 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler > Affects Versions: 1.0 > Environment: OS X, go1.4.2 > Reporter: Patrick Mahoney > Assignee: Jens Geyer > Priority: Minor > Attachments: > 0001-THRIFT-3338-Stray-underscore-in-generated-go-when-se.patch > > > Running against Thrift master branch at revision > [ff4a8ed|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=commit;h=ff4a8edd50621fb6aab7dbbf6968d4322700ed7d], > a service with a name starting with "New" results in some generated code > having an extra underscore, and thus not correctly referring to a defined > datatype. > In the example below, to simple services are created, one names "Something" > and the other "Newsomething". > Note in the "Newsomething" service, the generated type is > {{newsomethingProcessorFunc}} while in {{NewNewsomething_Processor}} it is > referred to as {{newsomething_ProcessorFunc}} which fails to compile. > {code} > ################################ > # file s.thrift > service Something { > void func(1: i64 i) > } > service Newsomething { > void func(1: i64 i) > } > ################################ > $ thrift thrift -out gen --gen go s.thrift > ################################ > # file gen/s/something.go > func NewSomethingProcessor(handler Something) *SomethingProcessor { > ... > self7.processorMap["func"] = &somethingProcessorFunc{handler: handler} > ... > } > type somethingProcessorFunc struct { > ... > ################################ > # file gen/s/newsomething.go > func NewNewsomething_Processor(handler Newsomething_) *Newsomething_Processor > { > ... > self2.processorMap["func"] = &newsomething_ProcessorFunc{handler: > handler} > ... > } > type newsomethingProcessorFunc struct { > ... > {code} > {code} > $ thrift --version > Thrift version 1.0.0-dev > $ go version > go version go1.4.2 darwin/amd64 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)