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

Jake Farrell closed THRIFT-1402.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

Thanks for the patch Patrick, tested and looks good. committed
                
> Generated Y_types.js does not require() X_types.js when an include in the IDL 
> file was used
> -------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1402
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1402
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.7
>         Environment: Windows 7 x64
>            Reporter: Joris van der Wel
>              Labels: include, nodejs
>             Fix For: 1.0
>
>         Attachments: add_type_info.patch
>
>
> Suppose you have the following thrift files:
> {code:title=X.thrift}
> struct Foo {
>       1: required i32 baz;
> }
> {code}
> {code:title=Y.thrift}
> include "X.thrift"
> struct Bar {
>       1: required X.Foo foo;
> }
> {code}
> 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:
> {code}
> this.foo = new X_ttypes.Foo();
> {code}
> However X_ttypes is never require()d
> The following line should be generated on top of the file:
> {code}
> var X_ttypes = require('./X_types.js');
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to