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

Dots in file names of includes causes dots in javascript variable names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • JavaScript - Compiler
    • None

    Description

      Hi there,

      a.thrift
      include "b.c.thrift"
      
      b.c.thrift
      # nada
      

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

      gen-nodejs/a_types
      //
      // Autogenerated by Thrift Compiler (0.9.2)
      //
      // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
      //
      var thrift = require('thrift');
      var Thrift = thrift.Thrift;
      var Q = thrift.Q;
      
      var b.c_ttypes = require('./b.c_types')
      
      
      var ttypes = module.exports = {};
      
      

      One variable in the auto-generated thrift output contains a dot, which is not valid JavaScript and will not compile.

      Cheers,

      Attachments

        1. thrift-3314-feature.patch
          3 kB
          Kapil Joshi

        Issue Links

          Activity

            People

              joshkaps Kapil Joshi
              mattfysh Matt Fysh
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: