thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Geyer <jensge...@hotmail.com>
Subject AW: optional keyword is ignored in argument lists.
Date Thu, 25 Sep 2014 15:23:53 GMT
There is a known issue with defaults for method args. Don't have the ticket # at hand.
________________________________
Von: Randy Abernethy
Gesendet: 25.09.2014 16:18
An: user@thrift.apache.org
Betreff: Re: optional keyword is ignored in argument lists.

The optional keyword is indeed ignored in argument lists (hence the
warning). Presently optional is only applicable to fields in structs.
Many Thrift aficionados pass structs to functions and return structs
from functions to maximize the ability to evolve their interfaces. You
can give parameters "required" status and set default values however.

On Wed, Sep 24, 2014 at 10:02 PM, Narendra Babu <narendra.jce@gmail.com> wrote:
> Hi,
>
> Is optional keyword for method call is supported at all? The thrift
> compiler is throwing below warning when optional is used for some of the
> arguments of the method call.
>
> WARNING:] optional keyword is ignored in argument lists.
>
> Thrift version 0.9.1
>
> Example
>
>   i32 SampleTestMethod(
>
>     1: optional string  desc,          <========== throws warning for this
> optional
>     2: i32 index,
>     3: string name,
> )
>
> Thanks,
> Narendra.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message