Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The Go Thrift compiler assumes that all service methods use only types from the same namespace. If a service method uses a type from an included Thrift file, the compiler still attempts to refer to the type using the calling file's namespace.
Steps to reproduce:
1. Create a new directory/project
2. Copy the files in the gist to the directory (https://gist.github.com/ericklaus-wf/d986c6ab00e03fa935e3)
3. Generate Go code using Thrift
4. Examine the gen-go/expanded/my_service-remote/my_service-remote.go file
5. Line 133 refers to `expanded.NewBaseThing()` which does not exist.
Expected:
Line 133 should use `my_base.NewBaseThing` and an import for `my_base` should be present.
Attachments
Issue Links
- duplicates
-
THRIFT-3413 Thrift code generation bug in Go when extending service
- Closed
- is duplicated by
-
THRIFT-3443 Thrift include can generate uncompilable code
- Closed
- relates to
-
THRIFT-3443 Thrift include can generate uncompilable code
- Closed