[
https://issues.apache.org/jira/browse/THRIFT-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560982#comment-13560982
]
Roger Meier commented on THRIFT-1840:
-------------------------------------
I have the following issues with your patch:
{noformat}
Buildfile: /home/roger/software/thrift/thrift-git/lib/js/test/build.xml
generate:
check-gjslint:
[echo] check if gjslint is available:
[exec] Execute failed: java.io.IOException: Cannot run program "gjslint":
java.io.IOException: error=2, No such file or directory
gjslint:
resolve:
jslint:
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/SecondService.js:10:15:
Missing semicolon.
[jsl:jslint] var ThriftTest.SecondService_blahBlah_args = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/SecondService.js:10:15:
Expected an identifier and instead saw '.'.
[jsl:jslint] var ThriftTest.SecondService_blahBlah_args = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/SecondService.js:10:15:
Stopping, unable to continue. (9% scanned).
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest.js:10:15:
Missing semicolon.
[jsl:jslint] var ThriftTest.ThriftTest_testVoid_args = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest.js:10:15:
Expected an identifier and instead saw '.'.
[jsl:jslint] var ThriftTest.ThriftTest_testVoid_args = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest.js:10:15:
Stopping, unable to continue. (0% scanned).
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest_types.js:18:15:
'ThriftTest' was used before it was defined.
[jsl:jslint] var ThriftTest.Bonk = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest_types.js:18:15:
Missing semicolon.
[jsl:jslint] var ThriftTest.Bonk = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest_types.js:18:15:
Expected an identifier and instead saw '.'.
[jsl:jslint] var ThriftTest.Bonk = function(args) {
[jsl:jslint] ^
[jsl:jslint]
/home/roger/software/thrift/thrift-git/lib/js/test/gen-js/ThriftTest_types.js:18:15:
Stopping, unable to continue. (0% scanned).
BUILD FAILED
/home/roger/software/thrift/thrift-git/lib/js/test/build.xml:216: JSLint: 10
errors in 3 files
Total time: 4 seconds
{noformat}
any hints or improvements?
;-r
> 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