[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097912#comment-16097912 ] ASF GitHub Bot commented on THRIFT-4260: Github user taozle closed the pull request at: https://github.com/apache/thrift/pull/1312 > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] thrift pull request #1312: Add context as first arg for client method.
GitHub user taozle reopened a pull request: https://github.com/apache/thrift/pull/1312 Add context as first arg for client method. Related: https://issues.apache.org/jira/browse/THRIFT-4260 You can merge this pull request into a Git repository by running: $ git pull https://github.com/taozle/thrift client-context Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1312.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1312 commit 202840379f99e5cdf786b1a4ac698b1cf40ede12 Author: taozleDate: 2017-07-23T13:21:44Z Add context as first arg for client method. commit 9ea932aac18735cdd0579b65b259a5b9162d5347 Author: taozle Date: 2017-07-23T17:44:28Z Fix tests. commit ab761b61a3b87affa5bead0d8ba662e2efdbafa3 Author: taozle Date: 2017-07-24T03:20:30Z Fix tests. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097913#comment-16097913 ] ASF GitHub Bot commented on THRIFT-4260: GitHub user taozle reopened a pull request: https://github.com/apache/thrift/pull/1312 Add context as first arg for client method. Related: https://issues.apache.org/jira/browse/THRIFT-4260 You can merge this pull request into a Git repository by running: $ git pull https://github.com/taozle/thrift client-context Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1312.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1312 commit 202840379f99e5cdf786b1a4ac698b1cf40ede12 Author: taozleDate: 2017-07-23T13:21:44Z Add context as first arg for client method. commit 9ea932aac18735cdd0579b65b259a5b9162d5347 Author: taozle Date: 2017-07-23T17:44:28Z Fix tests. commit ab761b61a3b87affa5bead0d8ba662e2efdbafa3 Author: taozle Date: 2017-07-24T03:20:30Z Fix tests. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] thrift pull request #1312: Add context as first arg for client method.
Github user taozle closed the pull request at: https://github.com/apache/thrift/pull/1312 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] thrift issue #1312: Add context as first arg for client method.
Github user dcelasun commented on the issue: https://github.com/apache/thrift/pull/1312 Travis failures seem unrelated. cc @Jens-G --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] thrift issue #1309: Use build tags to support context.
Github user taozle commented on the issue: https://github.com/apache/thrift/pull/1309 I will try to fix that. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097625#comment-16097625 ] ASF GitHub Bot commented on THRIFT-4260: GitHub user taozle opened a pull request: https://github.com/apache/thrift/pull/1312 Add context as first arg for client method. Related: https://issues.apache.org/jira/browse/THRIFT-4260 You can merge this pull request into a Git repository by running: $ git pull https://github.com/taozle/thrift client-context Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1312.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1312 commit 202840379f99e5cdf786b1a4ac698b1cf40ede12 Author: taozleDate: 2017-07-23T13:21:44Z Add context as first arg for client method. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] thrift pull request #1312: Add context as first arg for client method.
GitHub user taozle opened a pull request: https://github.com/apache/thrift/pull/1312 Add context as first arg for client method. Related: https://issues.apache.org/jira/browse/THRIFT-4260 You can merge this pull request into a Git repository by running: $ git pull https://github.com/taozle/thrift client-context Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1312.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1312 commit 202840379f99e5cdf786b1a4ac698b1cf40ede12 Author: taozleDate: 2017-07-23T13:21:44Z Add context as first arg for client method. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097597#comment-16097597 ] Can Celasun commented on THRIFT-4260: - Yes, because the client is auto generated from the source files. Both the client and the server implement the same interface. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097594#comment-16097594 ] taozle commented on THRIFT-4260: The commit is intended to add the context in only server side, and i didn't realize that the client is also _designed to?_ implement the service interface.If this is a design, i will try to fix it. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] thrift issue #1309: Use build tags to support context.
Github user dcelasun commented on the issue: https://github.com/apache/thrift/pull/1309 Ah, now I see it. The Makefile for the tutorial has the `legacy_context` flag hardcoded, since it's pinned to the Go version included in the Docker container. If you are running it outside the container (and hence with Go 1.7+) you need to remove `legacy_context` and `thirdparty-dep` from the Makefile. @taozle Maybe there is a way to check the go version before adding the flag? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097592#comment-16097592 ] Can Celasun commented on THRIFT-4260: - Yes, there seems to be a bug with the generated code for the client (which [~taozle] can take a look at), but the I agree with [~jensg] on the other issue: Don't mix-and-match versions of the Thrift compiler and library; they are designed to work together and anything else is pretty much unsupported. Also [~basvanbeek], you don't have to commit a library to vendor, you just need to pin the version, which is very easy to do with modern tools like *dep* (which will soon be the official dependency manager). > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097590#comment-16097590 ] Jens Geyer commented on THRIFT-4260: Hi Baas, I know quite well what the actual problem is, that's why I added "*in general*". Thank you very much for the problem report, we'll take care of it ASAP (or rollback the commit if such becomes necessary). {quote}That will not work for Go unless I would vendor the Go thrift library in my library (zipkin-go-opentracing). Vendoring of libraries in libraries is a big no no in Go land.{quote} Well the choice is yours. You can surely mix incompatible things and get some non-working conglomerate, if that is more idiomatic. :-) > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097586#comment-16097586 ] Bas van Beek edited comment on THRIFT-4260 at 7/23/17 10:22 AM: That will not work for Go unless I would vendor the Go thrift library in my library (zipkin-go-opentracing). Vendoring of libraries in libraries is a big no no in Go land. But that's not really the problem I'm experiencing here... The problem is the Scribe interface not being satisfied by *ScribeClient which previously was the case. was (Author: basvanbeek): That will not work for Go unless I would vendor the Go thrift library in my library (zipkin-go-opentracing). Vendoring of libraries in libraries is a big no no in Go land. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097586#comment-16097586 ] Bas van Beek commented on THRIFT-4260: -- That will not work for Go unless I would vendor the Go thrift library in my library (zipkin-go-opentracing). Vendoring of libraries in libraries is a big no no in Go land. > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[GitHub] thrift issue #1309: Use build tags to support context.
Github user Jens-G commented on the issue: https://github.com/apache/thrift/pull/1309 go version go1.8.3 windows/amd64 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Updated] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-4260: --- Priority: Blocker (was: Major) > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer reassigned THRIFT-4260: -- Assignee: taozle > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek >Assignee: taozle >Priority: Blocker > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097581#comment-16097581 ] Jens Geyer edited comment on THRIFT-4260 at 7/23/17 10:03 AM: -- {quote}Unfortunately the Go library was updated before a new Compiler was released{quote} In general, thou shalt not mix things. If you want to use the lib from master, you will have to build a compiler from master. If you don't want to build a compiler and want to stick with the latest stable, you should also use the latest stable library code. [~taozle], [~calcifer]: Thoughts? was (Author: jensg): {quote}Unfortunately the Go library was updated before a new Compiler was released{quote} In general, thou shalt not mix things. If you want to use the lib from master, you will have to build a compiler from master. [~taozle], [~calcifer]: Thoughts? > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097581#comment-16097581 ] Jens Geyer commented on THRIFT-4260: {quote}Unfortunately the Go library was updated before a new Compiler was released{quote} In general, thou shalt not mix things. If you want to use the lib from master, you will have to build a compiler from master. [~taozle], [~calcifer]: Thoughts? > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bas van Beek updated THRIFT-4260: - Description: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: {code:none} enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } {code} Generated the following Go code: {code:none} type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } {code} was: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: {code:go} enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } {code} Generated the following Go code: {code:go} type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } {code} > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:none} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:none} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bas van Beek updated THRIFT-4260: - Description: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: {code:go} enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } {code} Generated the following Go code: {code:go} type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } {code} was: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } Generated the following Go code: type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > {code:go} > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > {code} > Generated the following Go code: > {code:go} > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
[ https://issues.apache.org/jira/browse/THRIFT-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bas van Beek updated THRIFT-4260: - Description: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } Generated the following Go code: type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } was: Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: {{ enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } }} Generated the following Go code: {{ type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } }} > Go context generation issue. Context is parameter in Interface not in > implementation > > > Key: THRIFT-4260 > URL: https://issues.apache.org/jira/browse/THRIFT-4260 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler >Affects Versions: 0.11.0 >Reporter: Bas van Beek > > Unfortunately the Go library was updated before a new Compiler was released. > Having thrift compiled code be part in a project prior to the thrift context > library addition breaks due to the dependency on the thrift go library. See: > https://github.com/openzipkin/zipkin-go-opentracing/issues/68 > I tried to resolve be installing compiler from latest source but found the > generated source to be incorrect. The generated Go interface for the service > client includes context.Context as the first parameter of the service method. > The generated client implementation however does not. > The following thrift code: > enum ResultCode > { > OK, > TRY_LATER > } > struct LogEntry > { > 1: string category, > 2: string message > } > service Scribe > { > ResultCode Log(1: list messages); > } > Generated the following Go code: > type Scribe interface { > // Parameters: > // - Messages > Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) > } > ... > // Parameters: > // - Messages > func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { > if err = p.sendLog(messages); err != nil { > return > } > return p.recvLog() > } -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation
Bas van Beek created THRIFT-4260: Summary: Go context generation issue. Context is parameter in Interface not in implementation Key: THRIFT-4260 URL: https://issues.apache.org/jira/browse/THRIFT-4260 Project: Thrift Issue Type: Bug Components: Go - Compiler Affects Versions: 0.11.0 Reporter: Bas van Beek Unfortunately the Go library was updated before a new Compiler was released. Having thrift compiled code be part in a project prior to the thrift context library addition breaks due to the dependency on the thrift go library. See: https://github.com/openzipkin/zipkin-go-opentracing/issues/68 I tried to resolve be installing compiler from latest source but found the generated source to be incorrect. The generated Go interface for the service client includes context.Context as the first parameter of the service method. The generated client implementation however does not. The following thrift code: {{ enum ResultCode { OK, TRY_LATER } struct LogEntry { 1: string category, 2: string message } service Scribe { ResultCode Log(1: list messages); } }} Generated the following Go code: {{ type Scribe interface { // Parameters: // - Messages Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) } ... // Parameters: // - Messages func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) { if err = p.sendLog(messages); err != nil { return } return p.recvLog() } }} -- This message was sent by Atlassian JIRA (v6.4.14#64029)