Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.7
-
Windows 7 x64
Description
Suppose you have the following thrift files:
struct Foo { 1: required i32 baz; }
include "X.thrift"
struct Bar {
1: required X.Foo foo;
}
And you compile this using:
./thrift-0.7.0 -strict -r --gen js:node Y.thrift
Two files are created: "X_types.js" and "Y_types.js".
Y_types has lines that look like:
this.foo = new X_ttypes.Foo();
However X_ttypes is never require()d
The following line should be generated on top of the file:
var X_ttypes = require('./X_types.js');
Attachments
Attachments
Issue Links
- is duplicated by
-
THRIFT-1551 2 thrift file define only struct (no service), one include another, the gen nodejs file didn't have "requires" at the top
- Closed
-
THRIFT-1816 Need "require" included thrift files in "xxx_types.js"
- Closed
-
THRIFT-2121 Compilation bug for Node.js
- Closed