You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Russell Bradberry (JIRA)" <ji...@apache.org> on 2013/01/23 17:00:13 UTC

[jira] [Comment Edited] (THRIFT-1840) Thrift Generated Code Causes Global Variable Leaks

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

Russell Bradberry edited comment on THRIFT-1840 at 1/23/13 4:00 PM:
--------------------------------------------------------------------

Added a patch that fixes global variable leak in structs
                
      was (Author: devdazed):
    Fixes global variable leak in structs
                  
> Thrift Generated Code Causes Global Variable Leaks
> --------------------------------------------------
>
>                 Key: THRIFT-1840
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1840
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.9
>            Reporter: Russell Bradberry
>              Labels: javascript, node
>         Attachments: 0001-THRIFT-1840-fix-for-global-variable-leak.patch
>
>
> When compiling for NodeJS, the compiler creates globally scoped variables which is considered a bad practice as it can create unintended consequences. It also causes many testing frameworks to fail.
> the output looks something like this:
> {code}
> User = module.exports.User = function(args) {
> {code}
> when it should be
> {code}
> var User = module.exports.User = function(args) {
> {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