Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scrooge-generator: Resolve self referencing types.
Problem Scrooge currently doesn't support self-referencing types. This is useful for a number of cases. Solution Change the type resolver's scope to include the current type. Add unit tests. Result Self-referencing types no longer result in TypeNotFoundException. This should resolve #243 and partially resolve #160. This change doesn't yet support recursive types which is needed to fully resolve #160. This should be a backward compatible change since all the thrift files that are resolved correctly now will continue to get resolved correctly. One caveat though is that we don't enforce the self-reference type to be optional or collection type. We just depend on the generated` language's compiler to enforce that (i.e. we expect that compiler to generate an error if a self-referencing type is specified as required). Signed-off-by: Kevin Oliver <koliver@twitter.com> RB_ID=873802
- Loading branch information