Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 931B1200CCE for ; Sun, 23 Jul 2017 11:29:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 918CF1644C0; Sun, 23 Jul 2017 09:29:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D8A0A1644BB for ; Sun, 23 Jul 2017 11:29:14 +0200 (CEST) Received: (qmail 47868 invoked by uid 500); 23 Jul 2017 09:29:14 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 47857 invoked by uid 99); 23 Jul 2017 09:29:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2017 09:29:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 88E25C0DCB for ; Sun, 23 Jul 2017 09:29:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Oe9CV_vkdy3H for ; Sun, 23 Jul 2017 09:29:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 787F65FBCD for ; Sun, 23 Jul 2017 09:29:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 04139E0D54 for ; Sun, 23 Jul 2017 09:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id DC31521EE6 for ; Sun, 23 Jul 2017 09:29:01 +0000 (UTC) Date: Sun, 23 Jul 2017 09:29:01 +0000 (UTC) From: "Bas van Beek (JIRA)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (THRIFT-4260) Go context generation issue. Context is parameter in Interface not in implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 23 Jul 2017 09:29:15 -0000 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)