If I have a service-specific file with Thrift definitions named serviceA.thrift:
struct ServiceError {
1: required i16 code,
2: required string message
}
struct Service Response {
1: optional ServiceError error;
...
}
and want to move the definition of ServiceError to a separate file named common.thrift so it can be used in different services:
struct ServiceError {
1: required i16 code,
2: required string message
}
would it be a breaking change to update serviceA.thrift to use the new shared data structure:
include "common.thrift"
struct Service Response {
1: optional common.ServiceError error;
...
}
?
Since the wire format only knows numeric IDs1) which you don't change that should work seamlessly.
1) only exception to that rule are service method names