[
https://issues.apache.org/jira/browse/THRIFT-3315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14737785#comment-14737785
]
Matt Fysh commented on THRIFT-3315:
-----------------------------------
In order to filter out all private internal methods used by the client, you
could also prefix the two seqids methods, i.e. {{_seqid}} and {{_new_seqid}}
> send_ and recv_ methods collide with thrift-defined methods
> -----------------------------------------------------------
>
> Key: THRIFT-3315
> URL: https://issues.apache.org/jira/browse/THRIFT-3315
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Compiler
> Reporter: Matt Fysh
>
> {code:title=a.thrift}
> service Test {
> i32 a()
> i32 recv_a()
> }
> {code}
> {{$ thrift -r --gen js:node a.thrift}}
> {code:title=gen-nodejs/Test.js}
> // ...
> TestClient.prototype.recv_a = function(input,mtype,rseqid) {
> // ...
> TestClient.prototype.recv_a = function(callback) {
> // ...
> {code}
> Possible solutions:
> 1) throw an error if collisions detected during generation
> 2) prefix the private methods with an underscore for private namespacing,
> i.e. {{_recv_a}} and {{_send_a}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)