-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dashes in Thrift file names #143
Comments
A similar issue applies to Thrift files named after Go keywords: for, return, switch, type, etc. |
Follow up:
The Thrift IDL format does not provide a means of referencing identifiers It still makes sense for us to have a graceful degradation when generating |
direct include is a limitation of thrift grammar which doesn't allow hyphenated names to be used as an identifier, like #423 adds support for the Hyphenated file as both top level thrift files as well as included thrift file. include-as is similar to golang import alias, i.e.:
Hyphenated files normally can not be included as identifier of that form are not allowed in thrift grammar. This is because of hyphens like abc-def.XYZ. However, if the include-as directive is used, even with hyphen names we can use like include t "abc-def.thrift" t.XYZ. Since include-as was not supported previously added support for it as now even these thrift files are usable other than top level files.
|
That syntax is not recognized by Apache Thrift. We cannot add new syntax to |
#424 adds support for the Hyphenated files. Go Code generated would be having a package name as abc_def, i.e hyphen converted to underscore for working around golang casing constraints. however, as @abhinav said, Hyphenated files can not be included as an identifier of that form are not allowed in thrift grammar. This is because of usages with hyphens like abc-def.XYZ. |
We need to replace dashes in file names with underscores.
Also, if we add a service,
service Foo { Hello bar() }
,The text was updated successfully, but these errors were encountered: