[ 
https://issues.apache.org/jira/browse/THRIFT-3472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043851#comment-15043851
 ] 

Jens Geyer commented on THRIFT-3472:
------------------------------------

I can't reproduce. First, the include is missing. If I try to put one together 
to satisfy Thrift, the generated code is exactly the same in both cases, as 
expected.

{code}
$ thrift -gen cpp test.thrift
[WARNING:test.thrift:5] Could not find include file Common.thrift

Type "Common.ResponseContext" not defined
{code}

Fee free to reopen with a working test case.


> Missing semi-colon in IDL leads to non-deterministic builds
> -----------------------------------------------------------
>
>                 Key: THRIFT-3472
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3472
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.2
>         Environment: Ubuntu 14.04.3 LTS x86_64
>            Reporter: Jason Heimann
>
> The following erroneous IDL was fed into thrift, from which we generated 
> python (new_style), java (private-members), node.js and C++ output:
> {code}
> namespace java com.acme.model.sequencenumber
> namespace py acme_thrift.model.sequencenumber
> namespace cpp acme.model.sequencenumber
> include "Common.thrift"
> struct SequenceNumberResponse
> {
>     1: required Common.ResponseContext context;
>     2: required Common.VersionId sequenceNumber
> }
> {code}
> Each of these generated languages are compiled (as applicable) and packaged 
> after generation.  This is all to say, several revisions of our thrift IDL 
> successfully generated, compiled, packaged and deployed with this error.
> ...until it didn't.  An IDL revision in a completely unrelated namespace 
> triggered the following compilation error in the C++ output:
> {code}
> In file included from 
> /build_tmp/thrift-api-cmake/generated-sources/gen-cpp/SequenceNumber.cpp:7:0:
>  
> /build_tmp/thrift-api-cmake/generated-sources/gen-cpp/SequenceNumber.h:18:57: 
> error: 'acme::model::sequencenumber' has not been declared
>  
> /build_tmp/thrift-api-cmake/generated-sources/gen-cpp/SequenceNumber.h:18:95: 
> error: expected ',' or '...' before '&' token
> {code}
> Of course, adding the missing semicolon fixed this issue.  This being said, 
> I'd expect something in the thrift compiler to complain about such faulty IDL



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to