Quick steps to generate a thrift interface for your language:

Caveat: Service Method Parameter Naming

Make sure you don't name variables the same as their datatype - you WILL run in to trouble.

Consider this example BAD CODE:

typedef i32 somevariable

service Example {
    // Function that takes somevariable called somevariable  
    i32 regenerate(1:somevarable somevariable),

Though the Thrift compiler compiles this example successfully the generated code will NOT compile.

Also note that using terms like "new" as a function name will cause errors in the generated code.

Caveat: Service Method Name Overloading

Make sure you don't overload service methods.

service Example {
    // Two 'regenerate' functions with different arguments
    i32 regenerate(1:String foo),
    i32 regenerate(1:i16 bar),

Thrift will compile this, however the generated code will NOT compile.

ThriftGeneration (last edited 2009-09-20 23:47:11 by localhost)