Thrift
  1. Thrift
  2. THRIFT-133

'namespace ruby' should error out, or be an alias to 'namespace rb'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4
    • Component/s: Ruby - Compiler
    • Labels:
      None
    1. thrift-133.patch
      0.9 kB
      Bryan Duxbury
    2. thrift-133-v2.patch
      8 kB
      Bryan Duxbury

      Activity

      Hide
      David Reiss added a comment -

      http://wiki.apache.org/thrift/NamingVote

      Looks like I won . If you post a patch that implements this behavior, I'll commit it since It'll be a while before I can rename everything.

      Show
      David Reiss added a comment - http://wiki.apache.org/thrift/NamingVote Looks like I won . If you post a patch that implements this behavior, I'll commit it since It'll be a while before I can rename everything.
      Hide
      Bryan Duxbury added a comment -

      This patch makes the set of possible languages as first param to "namespace" constrained to the short names of the code generators. This means that if someone passes "ruby", you'll get a compiler error.

      Show
      Bryan Duxbury added a comment - This patch makes the set of possible languages as first param to "namespace" constrained to the short names of the code generators. This means that if someone passes "ruby", you'll get a compiler error.
      Hide
      David Reiss added a comment -

      1/ Drop the printf.
      2/ We already have a map of all of the generator names.
      3/ Smalltalk support two different types of namespace declarations. I think it is something like "smalltalk.prefix" and "smalltalk.package".

      Show
      David Reiss added a comment - 1/ Drop the printf. 2/ We already have a map of all of the generator names. 3/ Smalltalk support two different types of namespace declarations. I think it is something like "smalltalk.prefix" and "smalltalk.package".
      Hide
      Bryan Duxbury added a comment -

      Could you help me figure out how to get access to the generator names in t_program? I glanced at this briefly before recalling the utter pain that was making the compiler treat enum/constant values correctly a while back. Would really love a compiler written in Java in situations like this.

      Show
      Bryan Duxbury added a comment - Could you help me figure out how to get access to the generator names in t_program? I glanced at this briefly before recalling the utter pain that was making the compiler treat enum/constant values correctly a while back. Would really love a compiler written in Java in situations like this.
      Hide
      David Reiss added a comment -
      t_generator_registry::gen_map_t my_copy = t_generator_registry::get_generator_map();
      

      The keys are the generator names.

      Show
      David Reiss added a comment - t_generator_registry::gen_map_t my_copy = t_generator_registry::get_generator_map(); The keys are the generator names.
      Hide
      Bryan Duxbury added a comment -

      OK, this performs David's suggested cleanup. Look ok? I'll commit tomorrow if there are no objections.

      Show
      Bryan Duxbury added a comment - OK, this performs David's suggested cleanup. Look ok? I'll commit tomorrow if there are no objections.
      Hide
      Bryan Duxbury added a comment -

      Committed.

      Show
      Bryan Duxbury added a comment - Committed.
      Hide
      David Reiss added a comment -

      Breaks smalltalk.prefix and smalltalk.package.

      Show
      David Reiss added a comment - Breaks smalltalk.prefix and smalltalk.package.
      Hide
      Bryan Duxbury added a comment -

      Oops. Fixed in r980538.

      Show
      Bryan Duxbury added a comment - Oops. Fixed in r980538.
      Hide
      Jordan added a comment -

      I just downloaded the latest thrift, and I can't even compile thrift with make because it can't find t_generator_registry.h
      ERROR:
      In file included from thrifty.yy:35:
      ./src/parse/t_program.h:41:43: error: generate/t_generator_registry.h: No such file or directory

      Show
      Jordan added a comment - I just downloaded the latest thrift, and I can't even compile thrift with make because it can't find t_generator_registry.h ERROR: In file included from thrifty.yy:35: ./src/parse/t_program.h:41:43: error: generate/t_generator_registry.h: No such file or directory
      Hide
      Bryan Duxbury added a comment -

      Jordan - not sure what's going on in your build, but t_generator_registry.h is clearly in HEAD.

      Show
      Bryan Duxbury added a comment - Jordan - not sure what's going on in your build, but t_generator_registry.h is clearly in HEAD.
      Hide
      David Reiss added a comment -

      Oops. It needs to be added to Makefile.am to be included in "make dist" tarballs.

      Show
      David Reiss added a comment - Oops. It needs to be added to Makefile.am to be included in "make dist" tarballs.
      Hide
      Bryan Duxbury added a comment -

      I just added it to Makefile.am. Try it out, Jordan?

      Show
      Bryan Duxbury added a comment - I just added it to Makefile.am. Try it out, Jordan?

        People

        • Assignee:
          Bryan Duxbury
          Reporter:
          Dan Sully
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development