-
Notifications
You must be signed in to change notification settings - Fork 10
Add support for including other Thrift files. #72
Conversation
@blampe @breerly @junchaoWu |
Renamed .{services,types,constants} on generated modules to have `__` at start and end to avoid naming conflicts. Removed force flag from load(). The caching behavior is relied upon by the include logic. Users can instantiate new Loaders if they need the result to not be cached.
Something I did in my implementation of this feature was to allow includes in IDLs loaded via |
@lucasmarshall Created #73 to add that in the future since it doesn't seem like an immediate issue. |
This clarifies that the includes are relative and ensures that the version without the "./" or "../" is reserved for later if we decide to add a thrift path or something similar.
Just an update: Based on discussion with @kriskowal and @malandrew, a slight behavioral change was added: Relative includes must start with |
@@ -4,6 +4,8 @@ Releases | |||
0.6.0 (unreleased) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this to 1.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I'll let zest.releaser take care of that.
👍 amazing |
Add support for including other Thrift files.
Renamed .{services,types,constants} on generated modules to have
__
at startand end to avoid naming conflicts.
Removed force flag from load(). The caching behavior is relied upon by the
include logic. Users can instantiate new Loaders if they need the result to
not be cached.
Update: After discussion, we decided that relative includes must always start with
./
or../
. This makes it clearer that the imports are relative to the .thrift file's directory and also allows us to later add different behavior around when./
and../
are not specified (like a thrift path environment variable).