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

Can Celasun commented on THRIFT-4261:
-------------------------------------

> Go projects always use `glide` as version management, which uses single 
> version for one library across the repository

No, they don't. There are about a dozen different dependency managers, all with 
their own quirks. Some people don't use any of them and simply rely on "go get".

> Hi taozle & Can Celasun, could you revisit your changes and evaluate that 
> suggested solution?

Actually, the last set of changes was specifically to add context support on 
*all* go versions, so the suggested "solution" is not a solution at all, simply 
a revert of a very useful feature. It will help resolve issues like 
[this|https://stackoverflow.com/questions/20774745/how-to-get-clients-ip-in-a-python-thrift-server]
 (you'll be able to pass anything you want to a handler).

> The Go community has agreed upon that version branches are for loosers and 
> decides to always use cutting edge master code, even at the risk of 
> introducing breaking changes by using yet officially unreleased code in their 
> production code

Yes, this is now - thankfully - a recognized problem in Go, which is why an 
[official solution|https://github.com/golang/dep] is being worked on, with 
proper version constraints. In the mean time, my personal advice for anyone is: 
*Always* pin your version of the compiler *and* the library. Preferably to a 
release tag, or to a single commit if you insist on master.

I suggest closing this as WONTFIX, as there really is nothing to fix.

> Go context generation issue: breaking change in generated code regarding 
> thrift.TProcessorFunction interface
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-4261
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4261
>             Project: Thrift
>          Issue Type: Bug
>         Environment: generated code for Golang
>            Reporter: Yicheng Qin
>            Assignee: taozle
>
> I observe the breaking change in `thrift.TProcessorFunction` interface that 
> adds a `Context` parameter, and corresponded breaking change in the generated 
> client code.
> So the generated code from v0.9 thrift compiler can no longer run with the 
> master thrift library.
> I understand you expect that we should use the same version of compiler and 
> library for the same repository. But this is super hard in reality:
> 1. Lots of repos store the generated code, e.g., 
> https://github.com/uber/jaeger-client-go/blob/master/thrift-gen/jaeger/agent.go
>  . So it could use either old interface or new interface.
> 2. Go projects always use `glide` as version management, which uses single 
> version for one library across the repository. If one dep relies on old 
> interface, and one dep relies on new interface, the project will totally 
> break.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to