I use thrift
compiler (0.9.3) to generate gen-go folder, while the compiler generates a function thrift.PrependError
which can't be found in thrift
package (git.apache.org/thrift.git/lib/go/thrift
).
Should I use thrift
compiler (0.9.2)?
Prepend error was added in Thrift 0.9.3, and is present in the current codebase:
If it isn't being found in your local library, you need to update your local (or vendored) version of Thrift.
Remember, your thrift generator binary (in /usr/local/bin/thrift
) can be a different version than the package you have in your $GOPATH
. Always make sure you update the two together.
Should I use thrift compiler (0.9.2)?
You should make sure and double-check that the version of the Thrift compiler matches the version of the Thrift library being used. The code generated by the Thrift compiler and the library code depend on each other, they are two pieces of the same puzzle. It does not matter what Thrift version you are using, as long as you are consistent.
Aside from that, the curent stable is 0.9.3, this is also the recommended version.