Commit Graph

23 Commits

Author SHA1 Message Date
David Reiss
6a4b82c4b7 Make the Ruby generator use non-hardcoded namespaces.
- Make the Ruby generator use program->get_namespace("ruby")
  instead of program->get_ruby_namespace()
- Eliminate the explicit "ruby_namespace" in t_program.
- Deprecate the ruby_namespace token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665620 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:42:16 +00:00
David Reiss
9d65bf061f Make the C# generator use non-hardcoded namespaces.
- Make the C# generator use program->get_namespace("csharp")
  instead of program->get_csharp_namespace()
- Eliminate the explicit "csharp_namespace" in t_program.
- Deprecate the csharp_namespace token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665611 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:41:37 +00:00
David Reiss
771f8c797b Make the Java generator use non-hardcoded namespaces.
- Make the Java generator use program->get_namespace("java")
  instead of program->get_java_namespace()
- Eliminate the explicit "java_namespace" in t_program.
- Deprecate the java_namespace token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665514 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 01:55:25 +00:00
David Reiss
9a08dc6184 Make the C++ generator use non-hardcoded namespaces.
- Make the C++ generator use program->get_namespace("cpp")
  instead of program->get_cpp_namespace()
- Eliminate the explicit "cpp_namespace" in t_program.
- Deprecate the cpp_namespace token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 01:55:17 +00:00
David Reiss
2ab6fe88e2 Add testAsync to ThriftTest.thrift which verifies async void works properly.
Summary:
  - testAsync takes a number of seconds to sleep. The test client makes sure
    that the RPC returns in less than 0.2 seconds even though it asks the server
    to sleep for 3 seconds.
  - Implemented this test for C++ and Java.

Test Plan:
  - ran cpp TestServer and TestClient and verified functionality
  - tested cpp and java test server/client against each other - tests passed


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665484 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:44 +00:00
David Reiss
9ff3b9d5fc Thrift: Python test improvements.
Summary:
- Add a serialization test for forwards/backwards compatibility.
- Hook the Python tests up to "make check".
- Miscellaneous changes to the Python tests.

Reviewed By: mcslee

Test Plan: Ran the test.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665480 13f79535-47bb-0310-9956-ffa450edef68
2008-02-15 01:10:23 +00:00
David Reiss
7f42bcf97c Thrift: C# Bindings.
Summary:
C# generator, library, and MS Build task contributed by imeem.

Reviewed By: mcslee

Test Plan:
Built the Thrift compiler and generated some C# code.
I'd love to say I installed Mono or Portable.NET and built the C# code,
but I did not.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665421 13f79535-47bb-0310-9956-ffa450edef68
2008-01-11 20:59:12 +00:00
Mark Slee
27ed6ec1f9 Merging Jake Luciani's latest perl code gen fixes
Reviewed By: dreiss

Test Plan: Watch for any weirdness on Thrift code gen, perl specific


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665206 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 01:26:31 +00:00
Mark Slee
58dfb4fbe8 Lots of Ruby code generation improvements
Summary: Submitted by Kevin Clark, Ruby guru from Powerset

Reviewed By: mcslee

Test Plan: He updated the tests in trunk/test/rb/

Notes: The code is now officially "ruby-ish" and idiomatic


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665151 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 02:45:25 +00:00
Mark Slee
e129a2db0c Some thrift test code fixes
Reviewed By: tbr-testaditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665014 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 05:17:48 +00:00
Mark Slee
a330265d82 Fix broken thrift test code for new model
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664839 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:03:32 +00:00
Mark Slee
c98d050d65 Thrift: Added support for double type across all languages
Summary: Just for completeness cause I'm crazy. Let's never use these!

Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files

#!/usr/local/bin/thrift --cpp

/**
 * This is a thrift def file youc an invoke directly and gen code!
 */

blah


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 02:42:25 +00:00
Mark Slee
dafa3cf710 Thrift C++ code generation improvements
Summary: Generate classes instead of structs, and put read/write methods inside the class definition. Separate services into uniquely generated files. Separate types header file from types implementation file (read/write methods)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664777 13f79535-47bb-0310-9956-ffa450edef68
2006-09-02 23:56:49 +00:00
Mark Slee
d3d733a061 Thrift test improvements, tests for both inline and normal PHP code gen
Summary: So you can A/B test and see 6ms vs. 4ms response time :)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664773 13f79535-47bb-0310-9956-ffa450edef68
2006-09-01 22:19:06 +00:00
Marc Slemko
bf4fd19963 Modified C++ code-gen to create default constructors for all non-string primitives so that auto variable instances of structs aren't populated with
garbage.  This matters because, given thrift's loosey-goosey argument and result lists, structs may only be sparsely filled.
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664757 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 21:29:39 +00:00
Marc Slemko
aeb36f840b Added namespace declaration
Added namespace declaration to thrift grammar
    
    Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664756 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 00:21:45 +00:00
Marc Slemko
1785985754 Added namespace declaration
Added namespace declaration to thrift grammar
    
    Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664755 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 00:21:31 +00:00
Marc Slemko
d8b1051800 You scream, I scream, We all scream for exceptions
Added exception defintions and specifiers to thrift grammar
    
    Modified C++ code generator to to catch and serialize exceptions on the server side and unmarshall and throw them on the client side.
    
Modified grammar to require ","  after each service function declaration to keep it consistent with struct declaration syntax

    This checkin officially breaks the old parser


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664754 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 23:30:37 +00:00
Marc Slemko
e6889de36f Fixed a few typos - test client and server samples now working with new code generation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
2006-08-12 00:32:53 +00:00
Marc Slemko
5b126d6c85 Groundwork for exception support:
Auto generate result structs that combine return type and any thrown exceptions
     Add __isset struct to all user defined and auto defined struct to mark fields that are explicilty read
     Modified client and server generation code to marshal result structs

     Added base facebook::thrift::Exception class 


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664750 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 23:03:42 +00:00
Marc Slemko
0b4ffa9d4c Added read/write I16, U16 and Bool methods to TProtocol
Modified code generation to define structs and io methods for function argument lists and server process call implementations


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664749 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 02:49:29 +00:00
Mark Slee
6e53644ce5 Thrift now works in PHP, hot stuff
Summary: End to end communication working in Thrift with PHP

Problem: It's a bit slower than pillar still. Need to find out why.

Reviewed By: aditya

Test Plan: Unit tests are in the test directory. Get lucas on the PHP case...




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664720 13f79535-47bb-0310-9956-ffa450edef68
2006-06-30 18:28:50 +00:00
Mark Slee
e8540637aa Rev 2 of Thrift, the Pillar successor
Summary: End-to-end communications and serialization in C++ is working

Reviewed By: aditya

Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.

Revert Plan: Revertible

Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68
2006-05-30 09:24:40 +00:00