[ 
https://issues.apache.org/jira/browse/THRIFT-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16783321#comment-16783321
 ] 

Mustafa Şenol Coşar edited comment on THRIFT-4809 at 3/4/19 1:36 PM:
---------------------------------------------------------------------

Hi, [~jking3] 

I am currently working on this. I needed to walk the directory of the given 
node module when generating the code to find the correct import.

My options are

    1) boost filesystem (I prefer this but there is no usage of it in compiler 
code)

    2) <experimental/filesystem> in C+++11 (I noticed that the compiler now 
uses C+++11)

What are your thoughts about it?

Thanks


was (Author: mustafa-cosar):
Hi, [~jking3] 

I am currently working on this. I needed to walk the directory of the given 
node module when generating the code to find the correct import.

My options are

    1) boost filesystem (I prefer this but there is no usage of it in compiler 
code)

    2) <experimental/filesystem> in C++11 (I noticed that the compiler now uses 
C++11)

What are your thoughts about it?

Thanks

> Javascript episodic code generation
> -----------------------------------
>
>                 Key: THRIFT-4809
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4809
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Node.js - Compiler
>    Affects Versions: 0.12.0
>            Reporter: Mustafa Şenol Coşar
>            Priority: Major
>
> We can generate code without `-recurse` flag but the imports are not 
> structured in a way to support episodic code generation, i.e., generated code 
> imports the required modules from the current directory.
> We can specify a node module path during compilation to use so we can import 
> the modules that are generated from an included .thrift file from that module.
> Example:
> `A.thrift` has struct `A`
> `B.thrift` includes `A.thrift` and uses struct `A`
> `A.thrift` is compiled separately and packaged into `packageA`
> When we compile `B.thrift` we specify path/to/packageA
> `B_types.js` has the following import:
>     `var A = require("packageA/A_types");`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to