Open lopter opened 9 years ago
@lopter Thanks. We have gone through multiple phases with -t, and have to revisit it now that we have the idl
tool and our conventions have evolved. In the near term, the -t argument should become unnecessary since thrift methods e.g., tcurl service Service::method
will automatically hit the Meta::thriftIDL
endpoint.
-t does accept the full path to a specific file. We will keep this ticket open to track providing a better error message when you don’t provide a path to a specific file.
We may also evolve the convention, such that -t
can point to an idl
directory and infer the rest of the path using the git origin remote and the service name…and document that convention.
cc @malandrew
If you pass a directory to the
-t
option but your service name doesn't match the name of your thrift IDL file then tcurl crashes:Moreover, it feels like
tcurl
is relying on a convention here (your thrift definition has to be in a specific place and format that matches your service name) but I haven't seen this convention documented anywhere. Maybe the-t
option should be implemented differently? or maybe it should extract the service name from the endpoint argument (since, as far as I understand, its format isServiceName::endPoint
).