thrift/compiler/cpp
David Reiss 3c5d2fd9a8 Thrift: Fix a bug in local reflection generation.
Summary:
The problem was that in generate_local_reflection, we refused to
generate reflections for types defined in another program, including enums.
But in local_reflection_name, we treated enums like base types,
assuming that their reflections were always defined in this program.
One solution would be to treat enums like base types everywhere, and always
generate their reflections in the program where they were being used.
But this change takes the opposite approach.  We now always
generate fingerprints for enums in the program in which they are defined,
even if they are not used there.

Reviewed By: mcslee

Test Plan:
Got the following files to build and link correctly with -dense.

dreiss@dreiss-vmware:reflection:thrift/test$ tail test[12].thrift
==> test1.thrift <==
enum foo { bar }

==> test2.thrift <==
include "test1.thrift"
struct baz {
  1: test1.foo qux
}

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665468 13f79535-47bb-0310-9956-ffa450edef68
2008-02-08 21:58:06 +00:00
..
src Thrift: Fix a bug in local reflection generation. 2008-02-08 21:58:06 +00:00
Makefile.am Thrift: C# Bindings. 2008-01-11 20:59:12 +00:00
README Ruby code gen fixes and some README improvements 2007-03-07 05:46:50 +00:00

Thrift Code Compiler

Author: Mark Slee (mcslee@facebook.com)
Last Modified: 2007-Mar-06

Thrift is distributed under the Thrift open source software license.
Please see the included LICENSE file.

Thrift Code Compiler
====================

This compiler takes thrift files as input and generates output code across
various programming languages. To build and install it, do this:

  ./bootstrap.sh
  ./configure
  make
  sudo make install

It requires some form of LEX and YACC to be installed, which should be
picked up by autoconf.

Not much else to report here. You'll have to look at the code to get your
questions answered. Or just run the executable after you build and take
a look at the usage message.