You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/13 06:30:39 UTC

[jira] [Commented] (THRIFT-3547) NodeJS generated require() paths should mirror include paths

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

ASF GitHub Bot commented on THRIFT-3547:
----------------------------------------

GitHub user mightyguava opened a pull request:

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

    THRIFT-3547 NodeJS generated require() paths should mirror include paths

    

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

    $ git pull https://github.com/mightyguava/thrift include-path

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

    https://github.com/apache/thrift/pull/791.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 #791
    
----
commit 8737e506555d66bd7b54a07386eb69e9f23c3f78
Author: Yunchi Luo <mi...@gmail.com>
Date:   2016-01-07T16:41:05Z

    Respect include paths for generated javascript

----


> NodeJS generated require() paths should mirror include paths
> ------------------------------------------------------------
>
>                 Key: THRIFT-3547
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3547
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Yunchi Luo
>
> NodeJS uses file paths rather than namespaces to manage modules. However, the Thrift generated code ignores file paths.
> I.e. if we have
> foo.thrift:
> include "../../shared.thrift";
> It will turn into
> foo_types.js:
> var shared_types = require("./shared.thrift");
> This forces us to put all generated node code in the same directory. It's problematic since if we happen to have
> a/foo.thrift
> b/foo.thrift
> One file will have to overwrite the other...
> I'm happy to make a patch for this, but unclear to me how much of a breaking change this would be for people, if it is at all.



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