David Ehrmann created THRIFT-3129:
-------------------------------------
Summary: 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}
wrapper.thrift:
{code}
include "struct.thrift"
struct UserProfileResponse {
1: i32 responseCode,
2: UserProfile userProfile
}
{code}
struct.thrift:
{code}
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)