Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3315

send_ and recv_ methods collide with thrift-defined methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Node.js - Compiler
    • None

    Description

      a.thrift
      service Test {
      	i32 a()
      	i32 recv_a()
      }
      

      $ thrift -r --gen js:node a.thrift

      gen-nodejs/Test.js
      // ...
      TestClient.prototype.recv_a = function(input,mtype,rseqid) {
      // ...
      TestClient.prototype.recv_a = function(callback) {
      // ...
      

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            mattfysh Matt Fysh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: