[
https://issues.apache.org/jira/browse/THRIFT-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17059373#comment-17059373
]
Jens Geyer commented on THRIFT-5067:
------------------------------------
May I ask to also add a small IDL to illustrate the exact problem and to be
used as a test case?
> Invalid generated Cpp code from valid Thrift IDL with dots in file names for
> nested namespaces
> ----------------------------------------------------------------------------------------------
>
> Key: THRIFT-5067
> URL: https://issues.apache.org/jira/browse/THRIFT-5067
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Reporter: Michaël Melchiore
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I classify this as a bug as valid Thrift file silently generates invalid C++
> code. Feel free to change the issue type if you disagree.
> I use a a namespace hierarchy for my Thrift data model. When writing nested
> namespaces, I tend to represent to parent-child relationship of these
> namespaces in their the containing file names.
> So for example, I have the following relationship:
> * namespace "base" defined in file "base.thrift"
> * name "base.net" defined in file "base.net.thrift"
> Note that this convention of using dots to separate namespaces seems
> consistent with Thrift namespace syntax.
> The generated Cpp header for the base.net namespace does not compile: the
> include guard variable name uses the dot which is not valid C++ syntax.
> I think the Cpp compiler should replace dots with underscores when generating
> the include guard.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)