thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janice Vann <van...@gmail.com>
Subject Re: TypeDef in shared file?
Date Fri, 15 Nov 2013 22:04:32 GMT
Thank you kindly! I did finally realize that I was forgetting the prefix.
My apologies for overlooking a simple thing. I am new to Thrift so may need
to ask another obvious question yet :-).




On Fri, Nov 15, 2013 at 3:55 PM, Jens Geyer <jensgeyer@hotmail.com> wrote:

> Hi Janice,
>
> please have a look at the Thrift tutorial code, which is a good example
> for IDL files including each other. This works fine for me, so maybe you
> want to have a look if you find can spot the problem in your IDL. A common
> mistake is to forget the prefix of the included type:
>
> file one.thrift:
>
>    type string foo
>
> file two.thrift
>
>    include "one.thrift"
>
>    struct bar {
>        1: one.foo  baz  // note the prefix before "foo"
>    }
>
>
> If you still have problems, please the relevant excerpts of your IDL files
> or prepare a short example demonstrating the issue, and we will try to help
> you.
>
> Have fun,
> JensG
>
>
>
>
> -----Urspr√ľngliche Nachricht----- From: Janice Vann
> Sent: Friday, November 15, 2013 6:16 PM
> To: user@thrift.apache.org
> Subject: TypeDef in shared file?
>
> I would like to declare a custom typedef in my shared.thrift file so it can
> be used by any other thrift file that includes shared.thrift. For example:
>
> typedef string datetimestring
>
> However, it won't compile (using Thrift compiler 0.9.1 for Delphi). So I
> guess we just have to include the custom typedef in each file that needs
> it. Is that right or am I missing something?
>
> Thanks!
> Janice
>

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