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

2015-05-06 Thread David Ehrmann (JIRA)

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

David Ehrmann updated THRIFT-3129:
--
Description: 
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).

  was:
I have the following directory structure:

{code}
./project0/wrapper.thrift
./project1/struct.thrift
{code}

{code:title=wrapper.thrift}
include struct.thrift
struct UserProfileResponse {
  1: i32 responseCode,
  2: UserProfile userProfile
}
{code}

{code:title=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).


 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)


[jira] [Comment Edited] (THRIFT-3129) Unexpected include behavior

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530239#comment-14530239
 ] 

David Ehrmann edited comment on THRIFT-3129 at 5/6/15 9:40 AM:
---

Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {}thrift -I ../project1 --gen java wrapper.thrift{} failed. The file 
name shouldn't matter since it's not part of the class name, but I changed it, 
anyway, and no luck.

Also, it looks like you need a space after {{-I}}, unlike gcc.


was (Author: ehrmann):
Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {code}thrift -I ../project1 --gen java wrapper.thrift{code} failed. 
The file name shouldn't matter since it's not part of the class name, but I 
changed it, anyway, and no luck.

Also, it looks like you need a space after -I, unlike gcc.

 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)


[jira] [Comment Edited] (THRIFT-3129) Unexpected include behavior

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530239#comment-14530239
 ] 

David Ehrmann edited comment on THRIFT-3129 at 5/6/15 9:40 AM:
---

Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {{thrift -I ../project1 --gen java wrapper.thrift}} failed. The file 
name shouldn't matter since it's not part of the class name, but I changed it, 
anyway, and no luck.

Also, it looks like you need a space after {{-I}}, unlike gcc.


was (Author: ehrmann):
Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {}thrift -I ../project1 --gen java wrapper.thrift{} failed. The file 
name shouldn't matter since it's not part of the class name, but I changed it, 
anyway, and no luck.

Also, it looks like you need a space after {{-I}}, unlike gcc.

 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)


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

2015-05-06 Thread David Ehrmann (JIRA)

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

David Ehrmann updated THRIFT-3129:
--
Description: 
I have the following directory structure:

{code}
./project0/wrapper.thrift
./project1/struct.thrift
{code}

{code:title=wrapper.thrift}
include struct.thrift
struct UserProfileResponse {
  1: i32 responseCode,
  2: UserProfile userProfile
}
{code}

{code:title=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).

  was:
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).


 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=wrapper.thrift}
 include struct.thrift
 struct UserProfileResponse {
   1: i32 responseCode,
   2: UserProfile userProfile
 }
 {code}
 {code:title=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)


[jira] [Comment Edited] (THRIFT-3129) Unexpected include behavior

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530239#comment-14530239
 ] 

David Ehrmann edited comment on THRIFT-3129 at 5/6/15 9:37 AM:
---

Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {code}thrift -I ../project1 --gen java wrapper.thrift{code} failed. 
The file name shouldn't matter since it's not part of the class name, but I 
changed it, anyway, and no luck.

Also, it looks like you need a space after -I, unlike gcc.


was (Author: ehrmann):
Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {code}thrift -I ../project1 --gen java wrapper.thrift{code} failed. 
The file name shouldn't matter since it's not part of the class name, but I 
changed it, anyway, and no luck.

 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)


[jira] [Comment Edited] (THRIFT-3129) Unexpected include behavior

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530239#comment-14530239
 ] 

David Ehrmann edited comment on THRIFT-3129 at 5/6/15 9:35 AM:
---

Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {code}thrift -I ../project1 --gen java wrapper.thrift{code} failed. 
The file name shouldn't matter since it's not part of the class name, but I 
changed it, anyway, and no luck.


was (Author: ehrmann):
Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {{code}}thrift -I ../project1 --gen java wrapper.thrift{{code}} 
failed. The file name shouldn't matter since it's not part of the class name, 
but I changed it, anyway, and no luck.

 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)


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

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530239#comment-14530239
 ] 

David Ehrmann commented on THRIFT-3129:
---

Using the file, not the path, was a copy-and-paste mistake on my end. I tried 
that after {{code}}thrift -I ../project1 --gen java wrapper.thrift{{code}} 
failed. The file name shouldn't matter since it's not part of the class name, 
but I changed it, anyway, and no luck.

 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)


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

2015-05-06 Thread David Ehrmann (JIRA)
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)


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

2015-05-06 Thread David Ehrmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14530331#comment-14530331
 ] 

David Ehrmann commented on THRIFT-3129:
---

Good catch. Thanks!

 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)


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

2015-05-06 Thread David Ehrmann (JIRA)

 [ 
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)


[jira] [Created] (THRIFT-3123) Missing include in compiler/cpp/src/main.h breaks build in some environments

2015-05-04 Thread David Ehrmann (JIRA)
David Ehrmann created THRIFT-3123:
-

 Summary: Missing include in compiler/cpp/src/main.h breaks build 
in some environments
 Key: THRIFT-3123
 URL: https://issues.apache.org/jira/browse/THRIFT-3123
 Project: Thrift
  Issue Type: Bug
Reporter: David Ehrmann
Priority: Minor


main.h uses FILE. In a build environment where stdio.h isn't implicitly 
included, this will be undefined. 



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


[GitHub] thrift pull request: THRIFT-3123: Include stdio.h to get a definit...

2015-05-04 Thread ehrmann
GitHub user ehrmann opened a pull request:

https://github.com/apache/thrift/pull/477

THRIFT-3123: Include stdio.h to get a definition for FILE

`FILE` is referenced on line 102 `extern FILE* yyin;`. I was cross 
compiling, and the definition for `FILE` not being included caused the build to 
fail, so I included it. I built again on Debian and FreeBSD, and it builds fine 
with the change

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ehrmann/thrift THRIFT-3123

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/477.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #477


commit c5f12960e7764dabe0a155e80ec256786ed06a1f
Author: David Ehrmann ehrm...@gmail.com
Date:   2015-05-04T06:05:30Z

Include stdio.h to get a definition for FILE




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---