thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mustafa Şenol Coşar (JIRA) <>
Subject [jira] [Commented] (THRIFT-4809) Javascript episodic code generation
Date Thu, 13 Jun 2019 14:43:00 GMT


Mustafa Şenol Coşar commented on THRIFT-4809:

Hi [~jking3] I rebased my PR on the master. Can you or someone else review it and merge?


> Javascript episodic code generation
> -----------------------------------
>                 Key: THRIFT-4809
>                 URL:
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Node.js - Compiler
>    Affects Versions: 0.12.0
>            Reporter: Mustafa Şenol Coşar
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
> 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

View raw message