You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Ehrmann (JIRA)" <ji...@apache.org> on 2015/05/06 12:52:00 UTC

[jira] [Closed] (THRIFT-3129) Unexpected include behavior

     [ https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Ehrmann closed THRIFT-3129.
---------------------------------
    Resolution: Invalid

> Unexpected include behavior
> ---------------------------
>
>                 Key: THRIFT-3129
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3129
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.2
>            Reporter: David Ehrmann
>            Priority: Minor
>
> I have the following directory structure:
> {code}
> ./project0/wrapper.thrift
> ./project1/struct.thrift
> {code}
> {code:title=project0/wrapper.thrift}
> include "struct.thrift"
> struct UserProfileResponse {
>   1: i32 responseCode,
>   2: UserProfile userProfile
> }
> {code}
> {code:title=project1/struct.thrift}
> struct UserProfile {
>     1: i32 uid,
>     2: string name
> }
> {code}
> While in project0 this command fails:
> {code}
> project0]$ thrift -I ../project1/struct.thrift --gen java wrapper.thrift
> [WARNING:/.../project0/wrapper.thrift:1] Could not find include file struct.thrift
>  
> [ERROR:/.../project0/wrapper.thrift:5] (last token was 'UserProfile')
> Type "UserProfile" has not been defined.
> {code}
> This isn't what I expected. Since project1 is on the include path, I thought it would be searched when includes happen (like how gcc does it).



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