Commit Graph

439 Commits

Author SHA1 Message Date
Roger Meier
a8cef6e55b THRIFT-916 gcc warnings in c++ header files
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1147700 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 18:55:59 +00:00
Roger Meier
7e056e7572 THRIFT-1222 Unhandled exception for TEvhttpServer request
Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1147542 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 07:28:28 +00:00
Roger Meier
d3b9dca285 THRIFT-457 test/cpp makefiles do not honor --prefix configuration setting
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1139309 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 14:01:10 +00:00
Anthony F. Molinaro
917d89825f THRIFT-892 - refactor erlang library to build using rebar, move tests into lib/erl/test directory and run several via make check
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1137870 13f79535-47bb-0310-9956-ffa450edef68
2011-06-21 06:20:18 +00:00
Roger Meier
0680a83634 THRIFT-1202 Malformed JSON for map<string,type> services parameters
fix broken build (add testcase to haskell test suite)


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1137858 13f79535-47bb-0310-9956-ffa450edef68
2011-06-21 04:42:43 +00:00
Anthony F. Molinaro
e49a44ab1d THRIFT-1151 - catch some serialization errors
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1137131 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 06:04:01 +00:00
Anthony F. Molinaro
3d3f42103c THRIFT-1213 - make membuffer in erlang more useful
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1137121 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 03:54:04 +00:00
Roger Meier
9d8e8f87ed THRIFT-1202 Malformed JSON for map<string,type> services parameters
Patch: Henrique Mendonca


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1135763 13f79535-47bb-0310-9956-ffa450edef68
2011-06-14 19:38:27 +00:00
Roger Meier
ca142b0bc8 THRIFT-1198 C++ TestClient and Server Improvements (add Unix Domain Socket, HTTP, JSON)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1133116 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 17:59:07 +00:00
Roger Meier
bb09f4442a THRIFT-1166 C++ tests in test/cpp broken
Patch: David Nadlinger, Roger Meier


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1129908 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 20:35:37 +00:00
Anthony F. Molinaro
5a9ca88118 THRIFT-1080 : fix building of test code
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1085035 13f79535-47bb-0310-9956-ffa450edef68
2011-03-24 16:46:22 +00:00
Bryan Duxbury
1606659171 THRIFT-1103. py: TZlibTransport for python, a zlib compressed transport
This patch adds a new TZlibTransport to the Python library and extends the test suite to exercise it.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1084276 13f79535-47bb-0310-9956-ffa450edef68
2011-03-22 18:06:04 +00:00
Bryan Duxbury
59d4efda81 THRIFT-1094. py: bug in TCompactProto python readMessageEnd method and updated test cases
This patch fixes a TCompactProtocol bug and expands the test cases to exercise the problem.

Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083877 13f79535-47bb-0310-9956-ffa450edef68
2011-03-21 17:38:22 +00:00
Bryan Duxbury
df4cffd34a THRIFT-1093. py: several bugs in python TCompactProtocol
Patch; Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1081864 13f79535-47bb-0310-9956-ffa450edef68
2011-03-15 17:16:09 +00:00
Bryan Duxbury
a971fb0948 THRIFT-1081. php: PHP tests broken and somewhat incomplete
This patch fixes some minor bugs and includes a test for Framed Transport.

Patch: Nicholas Telford

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076908 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 00:49:40 +00:00
Bryan Duxbury
1d373bc0e7 THRIFT-1078. php: ThriftTest.thrift generates invalid PHP library
This patch updates ThriftTest.thrft to have a valid php namespace, as well as updating the test client to use the properly namespaced code

Patch: Nicholas Telford

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076316 13f79535-47bb-0310-9956-ffa450edef68
2011-03-02 18:13:30 +00:00
Bryan Duxbury
cd9aea1136 THRIFT-151. cpp: TSSLServerSocket and TSSLSocket implementation
This patch adds an implementation of the above ssl sockets.

Patch: Ping Li, Kevin Worth, Rowan Kerr

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1073441 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 18:12:06 +00:00
Christian Lavoie
afc6d8f650 THRIFT-625: Add support for 'Go'; provided by Aalok Shah.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1072478 13f79535-47bb-0310-9956-ffa450edef68
2011-02-20 02:39:19 +00:00
Christian Lavoie
282e717add Remove a pair of useless files.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1072476 13f79535-47bb-0310-9956-ffa450edef68
2011-02-20 01:57:55 +00:00
Christian Lavoie
c59c30ebd3 Use standard sh syntax instead of bash extensions.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1072440 13f79535-47bb-0310-9956-ffa450edef68
2011-02-19 21:02:22 +00:00
Roger Meier
4ebaa761cb THRIFT-1056 python tests invoked by 'make check' appear broken
Patch: Chris Morgan


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1068568 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 20:44:22 +00:00
T Jake Luciani
7070aaa23b THRIFT-904: disable nagle and linger
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1063966 13f79535-47bb-0310-9956-ffa450edef68
2011-01-27 02:51:51 +00:00
Christian Lavoie
cbf87cb89c THRIFT-916: Commit THRIFT-916_fix_no-overflow.patch -- remove overflow coming from a few constants.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1039885 13f79535-47bb-0310-9956-ffa450edef68
2010-11-28 14:34:26 +00:00
Roger Meier
5f9614cf9a THRIFT-916 long long becomes int64_t
Patch: Christian Lavoie



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1037500 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 16:59:05 +00:00
Roger Meier
213a664798 THRIFT-582 C(c_glib) implementation of Thrift
Patch: Anatol Pomozov and Michael Lum


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1027933 13f79535-47bb-0310-9956-ffa450edef68
2010-10-27 12:30:11 +00:00
Bryan Duxbury
206c0dc1af THRIFT-947. java: Provide a helper method to determine the TProtocol used to serialize some data.
Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1024455 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 23:00:27 +00:00
Roger Meier
50e4349463 THRIFT-581 Add a testsuite for txThrift (Twisted) / py.twisted
Patch: Esteve Fernandez



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005923 13f79535-47bb-0310-9956-ffa450edef68
2010-10-08 17:46:06 +00:00
Bryan Duxbury
b3d0aa0c82 THRIFT-946. java: Augment FieldValueMetaData so it differentiates 'string' and 'binary' fields.
This patch adds a new method to the FieldMetaData class that indicates binary or not.

Patch: Mathias Herberts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005220 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 20:00:03 +00:00
David Reiss
2324871334 THRIFT-928. cpp: Thrift Server Client Stats
Add the ability for Thrift servers to monitor client connections.  It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().

The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005139 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:08 +00:00
David Reiss
b7762a032a THRIFT-922. cpp: Update C++ generator to emit templatized code
When the "templates" option is passed to the C++ generator, it now emits
templatized versions of the client and processor.  Generated types emit
templatized read() and write() functions.

This allows the generated code to invoke the correct non-virtual
TTransport and TProtocol implementations, resulting in faster
serialization and deserialization.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005138 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:00 +00:00
David Reiss
e71115be6c THRIFT-922. cpp: Templatize binary and compact protocol
Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter.  This allows them to make
non-virtual calls when using the template, improving serialization
performance.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005136 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:56 +00:00
David Reiss
ef7200f6e8 THRIFT-928. cpp: Include request/response size in processor callbacks
Required updating transport interface.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005129 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:42 +00:00
David Reiss
d7192063e1 THRIFT-928. cpp: Processor-level event callbacks
- Add a TProcessorEventHandler callback interface.
- Add methods to TProcessor to hold an instance of the interface.
- Add code to the compiler to make the processor call callbacks at key points.
- Add an optional processor event handler to the test server.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005126 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:33 +00:00
Bryan Duxbury
c657447e0e THRIFT-932. hs: Haskell tests need to be run through 'make check' (and probably 'cabal check') too
Tests are now self-contained and correctly exit after running. There's a single run script which has improved error messages and defaults to the thrift binary compiled in the current source directory instead of those in PATH. And as a bonus hooks both cabal check and running the tests to make check. 

Patch: Christian Lavoie

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004861 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 00:12:33 +00:00
Anthony F. Molinaro
71a58a8764 THRIFT-918 : better haskell tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001883 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 19:27:40 +00:00
David Reiss
abafd79aee THRIFT-335. python: Initial implementation of TCompactProtocol
Seems to work.  No interoperability testing with other languages yet.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001827 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:28:15 +00:00
Bryan Duxbury
833ae49290 THRIFT-920. cpp: C++ Test and Tutorial does not compile anymore due to the change within Enum handling
Patch: Roger Meier and Christian Lavoie

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001826 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:26:02 +00:00
Anthony F. Molinaro
0b4936dea5 make check wasn't working because python namespace was incorrect
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001590 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 04:43:39 +00:00
Bryan Duxbury
96b2ccc0d4 THRIFT-881. csharp: add csharp to the tutorial
This patch adds a tutorial for CSharp. It also moves the 'test' client and server into the tutorial, because they were not being used by the tests.

Patch: Roger Meier

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1000953 13f79535-47bb-0310-9956-ffa450edef68
2010-09-24 16:47:59 +00:00
Bryan Duxbury
d4235e0a47 THRIFT-870. java: Java constants don't get Javadoc comments
Fix a trivial oversight.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996592 13f79535-47bb-0310-9956-ffa450edef68
2010-09-13 16:28:53 +00:00
Bryan Duxbury
6e05e25c89 THRIFT-897. compiler: Don't allow unqualified enum constant references
Missed a spot.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996326 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 15:22:49 +00:00
Bryan Duxbury
9f0a786dad THRIFT-897. compiler: Don't allow unqualified constant access to enum values
This patch makes it illegal to refer to enum values by just their names in the IDL. Now, you must also provide the enum type's name as well.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996320 13f79535-47bb-0310-9956-ffa450edef68
2010-09-12 14:38:36 +00:00
David Reiss
fb790d7262 Allow "*" as a catch-all namespace.
In an IDL file, you can can now declare "namespace * foo",
which will apply to any language not explicitly specified.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@992012 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 16:41:45 +00:00
David Reiss
351e22b52a THRIFT-503. cpp: Move the tests built by "make check" under lib/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991246 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:19 +00:00
David Reiss
f261dd795c THRIFT-503. Use our standard include style in a few tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991245 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:14 +00:00
David Reiss
b4ab008476 erlang: Verify elt/key/val when reading list/set/map
For now, exit on a badmatch if one is wrong.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991000 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:58 +00:00
David Reiss
01c6d61ebd erlang: Update test_disklog to use the new API
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990994 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:49 +00:00
David Reiss
f28f23d5b7 erlang: Update test_membuffer to use the new API
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990993 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:48 +00:00
David Reiss
a508b336db erlang: test_{client,server}: Allow framed_transport to be used
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990988 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:41 +00:00
David Reiss
2c8d228fa7 erlang: Create a test client
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990987 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:39 +00:00
David Reiss
3f660a4266 erlang: Client refactor, part 1
- Client is no longer a separate process.
- Simplified constructors moved into another module.
- All functions and exceptions return the new client,
  to allow for future statefulness in the client.

NOTE: With the new library and old gen-code, attempting to call a
nonexistent function will result in an exit.

TODO: fix docs and tests (tether test is not meaningful)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990979 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:29 +00:00
David Reiss
6204bb12be erlang: Make the test_server use thrift_socket_server
thrift_server is deprecated, it seems.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990971 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:17 +00:00
David Reiss
a94514f48e erlang: Make the test server compatible with the Python test client
The Python test client expects a specific value in some responses.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990970 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:16 +00:00
David Reiss
bf2b97871b erlang: Allow custom erlc flags for the test suite
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990960 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:04 +00:00
David Reiss
8f94314846 erlang: Clean up some trailing whitespace
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990958 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:01 +00:00
David Reiss
f32d0fb900 Rollback a few recent Erlang changes to fix blame data
My combined patch for THRIFT-599 was committed, but it is preferable
commit the individual patches to preserve the more detailed log and
blame data.  I'll recommit r987018 as a sequence of patches and r988722
as its own rev.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990957 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:00 +00:00
Bryan Duxbury
4d8a9cd569 THRIFT-877. compiler: smalltalk namespace doesn't work
This patch adds a special case to map 'smalltalk' to 'st' when checking for valid namespace declarations.

Patch: Bruce Lowekamp

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990866 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 17:09:58 +00:00
Bryan Duxbury
d3879f80c6 THRIFT-599. erl: Don't use unnecessary processes in the Erlang transports and clients
The only user-visible changes are to the client. Every thrift call now returns {NewClient, Result} instead of just Result.

Patch: David Reiss (assist to Anthony Molinaro)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987018 13f79535-47bb-0310-9956-ffa450edef68
2010-08-19 05:06:02 +00:00
Bryan Duxbury
346a268931 THRIFT-456. cpp: Bad IP address string in test/cpp/src/main.cpp
This patch fixes a clear typo in main.cpp.

Patch: Rush Manbert

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985772 13f79535-47bb-0310-9956-ffa450edef68
2010-08-15 23:04:12 +00:00
Bryan Duxbury
23f2348fae add ASL to a handful of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980145 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 18:23:22 +00:00
Bryan Duxbury
623594749c THRIFT-160. csharp: Created THttpTransport for the C# library based on WebHttpRequest
This patch adds a new THttpTransport to the C# library and adds some related changes to the Makefile and csproj.

Patch: Michael Greene and Todd Gardner

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957708 13f79535-47bb-0310-9956-ffa450edef68
2010-06-24 20:34:34 +00:00
Bryan Duxbury
162b3ac646 THRFIT-804. java: CompareTo is broken for unions set to map, set, or list
This patch fixes TUnion's compareTo, and factors out the standard part of the comparison to TBaseHelper.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957350 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 21:17:48 +00:00
Bryan Duxbury
d58ccec660 THRIFT-768. java: Async client for Java
This patch adds an implementation of a fully-asynchronous client that makes use of NIO. Stubs for the async method calls are generated along with the existing synchronous ones.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@948492 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 16:34:48 +00:00
Bryan Duxbury
a1e268c54b THRIFT-770. build: Get 'make dist' to work without first compiling source code
This patch ditches the old print_version.sh method and instead generates the compiler's version.h via the Makefile.

Patch: Anthony Molinaro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940630 13f79535-47bb-0310-9956-ffa450edef68
2010-05-03 21:33:00 +00:00
Bryan Duxbury
f7d9f8e489 THRIFT-650. build: Make Check fails on Centos/OSX with 0.2.0 tarball
This patch fixes the make check target for OSX.

Patch: Anthony Molinaro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940327 13f79535-47bb-0310-9956-ffa450edef68
2010-05-02 23:04:03 +00:00
Bryan Duxbury
3f4ca0e8fd THRIFT-734. java: Can't use primitive types in service definitions for bean generated code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@923566 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 03:13:26 +00:00
David Reiss
53c10e09e1 THRIFT-564. Support arbitrary annotations on struct fields
This is subtly different from a type annotation, since some bits of
metadata only make sense in the context of a single structure field,
like whether the field is required, or whether the C++ code should use
a pointer for it.

This change doesn't define any meaningful annotations.  It just sets up
the parsing infrastructure.

I have no idea if $10 will work with older versions of yacc.  It seems
to work fine with bison.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@919325 13f79535-47bb-0310-9956-ffa450edef68
2010-03-05 07:51:51 +00:00
David Reiss
6acc269d18 THRIFT-695. python: [de]serialize convenience functions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@916508 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 00:56:02 +00:00
T Jake Luciani
322caa2f92 THRIFT-550: Added javascript support
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@910158 13f79535-47bb-0310-9956-ffa450edef68
2010-02-15 03:24:55 +00:00
Bryan Duxbury
35565a4719 THRIFT-671. rb: Ruby compact protocol implementation gets mixed up when there are fields that don't fit in the delta space
This patch adds a test and a fix for the problem.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@896712 13f79535-47bb-0310-9956-ffa450edef68
2010-01-06 23:12:09 +00:00
Bryan Duxbury
c2ec7cae04 THRIFT-670. java: Unions don't skip unrecognizable fields correctly
This patch adds a test and a fix for the bug.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894924 13f79535-47bb-0310-9956-ffa450edef68
2009-12-31 18:59:15 +00:00
Bryan Duxbury
986d50fc71 THRIFT-668. java: Using a map in an exception type will generate a class that does not implement Comperable-> that will generate a stub that does not compile
The compiler was incorrectly assuming that exceptions were comparable. Now, exceptions are treated just like structs.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894919 13f79535-47bb-0310-9956-ffa450edef68
2009-12-31 18:18:00 +00:00
Bryan Duxbury
2d80470bcb THRIFT-632. java: Constants of enum types don't behave well
This patch causes constants of all types to be resolved differently by the compiler, and makes it so that constants of enum types contain a reference to the enum type so that code generators can produce the correct names.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@892358 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 19:41:11 +00:00
David Reiss
eb03222bca THRIFT-592. php: Make the test client work properly after r815878
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@888930 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 19:29:59 +00:00
Todd Lipcon
53ae9f39d5 THRIFT-622. Add appropriate licensing information to get Thrift ready for a release.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
2009-12-07 00:42:38 +00:00
Todd Lipcon
f5dea4c7f3 THRIFT-637. python: Fix mixing of oneway and regular requests in TNonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@886646 13f79535-47bb-0310-9956-ffa450edef68
2009-12-03 01:18:44 +00:00
Bryan Duxbury
9af23d9327 THRIFT-551. java: Enumeration doesn't generate real enum in Java
This patch makes the compiler generate actual Enum classes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@882211 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 17:26:38 +00:00
Bryan Duxbury
e2e4ea1dcf THRIFT-624. java: compareTo is broken for Unions with binary fields
This patch adds a special case for byte[] values in TUnion. It also fixes a related bug in TBaseHelper for comparing two byte arrays.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835065 13f79535-47bb-0310-9956-ffa450edef68
2009-11-11 21:01:35 +00:00
Bryan Duxbury
2845b16eb2 THRIFT-565. java: Structs containing typedefs for incomparable objects will be considered comparable
This patch causes the compiler to fully unwrap typedefs when determining comparability.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@834119 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 15:55:22 +00:00
Bryan Duxbury
51f288062d THRIFT-446. java: PartialDeserialization in Java
This patch adds a partialDeserialize method to TDeserializer that allows you to request a specific subfield of the serialized data.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@820786 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 20:53:45 +00:00
Bryan Duxbury
ab3666e6ca THRIFT-409. java: Add "union" to Thrift
This patch introduces new IDL syntax for creating Unions, explicityly single-valued structs. While the parser changes are portable, this patch only includes the actual generated code changes for the Java library. Other libraries can continue to generate a struct with the same fields and remain compatible until they are able to implement the full shebang.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810300 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 23:03:47 +00:00
Bryan Duxbury
3d5db203d5 THRIFT-479. java: Add javadocs for enum types
Fields now reference their enum class name in javadoc. Also, generated enum classes's members are now javadoc'd.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799128 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 23:44:44 +00:00
David Reiss
c8e300533c THRIFT-413. Suppport for annotations on base types
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@798219 13f79535-47bb-0310-9956-ffa450edef68
2009-07-27 17:02:42 +00:00
Bryan Duxbury
e8f38f47c8 THRIFT-525. csharp: ThriftTest project will not generate c# from .thrift file or generate ThriftImpl.dll
C# test project correctly references directories with spaces and deletes only data it generates



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@790732 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 20:28:33 +00:00
Bryan Duxbury
f45977fef8 THRIFT-531. csharp: C# project and solution files reference external source control system
This patch removes the external source providers from all csproj and sln files. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@790731 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 20:18:12 +00:00
Bryan Duxbury
6fcaf84287 THRIFT-526. rb: Generated Ruby enums have no good way to get the names back out once you have a number.
enums generated in Ruby will now have a static map of enum values to names.

Patch by Adam Coffman (with slight modifications).



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@788098 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 17:55:53 +00:00
David Reiss
fad60657a3 THRIFT-211. erlang: Modify test_tether to test protocol error handling as well
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781637 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:35 +00:00
David Reiss
1e1a697672 THRIFT-211. erlang: Support "tethered" clients
Add a client option that causes clients to monitor their creators
and terminate when the creator dies.  This makes it possible to
prevent client leaks without linking, because the latter causes
application code to be killed when a transport error occurs and
exits are not trapped.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781636 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:32 +00:00
David Reiss
bb97fd90a5 THRIFT-211. erlang: Allow clients to be created without connecting
Add a client option to prevent the initial connect (which causes
the protocol factory to be ignored).  The main use case for this
is testing the proper handling of clients that cannot connect.
Update the tether test to use this feature instead of a raw
gen_server:start call.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781635 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:28 +00:00
David Reiss
5e530af587 THRIFT-211. erlang: Support unlinked Thrift clients.
- Create a thrift_client:start function that accepts client options.
- Make start_link a wrapper that adds {monitor, link}.
- Add a test to make sure that everything dies or doesn't die as expected.
  (The test has to be run manually.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781634 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:24 +00:00
David Reiss
4b86e62eb6 THRIFT-373. Get some missing files into the release tarballs
- Added some stuff to EXTRA_DIST.
- Added some non-compiled sources to a C++ test.
- Made lib/perl/test a SUBDIR of lib/perl.

The last is a revert of r766558, but I moved the "Types.pm" rules in
lib/perl/test/Makefile.am to the check-local target, so it should still
work as expected (per THRIFT-461).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777681 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:52:06 +00:00
David Reiss
e5eef13e6f cpp: Resolve an ambiguous overload in some tests
sqrt is defined for floats and long doubles in addition to doubles.
Add a cast (from int) to specify which one we want.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776930 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:30 +00:00
Bryan Duxbury
ff219acb6c THRIFT-236. Structs should be serialized in a consistent order
2nd try at this issue. This time, we will use numeric field order ONLY for the serialization portion, instead of globally. This should make it much easier to produce the correctly ordered output in all cases. 

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@764072 13f79535-47bb-0310-9956-ffa450edef68
2009-04-10 21:51:00 +00:00
Bryan Duxbury
0781f2b549 THRIFT-407. hs: Refactor and improve Haskell-related code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763031 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 23:29:42 +00:00
David Reiss
fe5b77d728 THRIFT-356. Improve CompactProtocolTestStruct
- Remove the default values from CompactProtocolTestStruct
- Add a const CompactProtocolTestStruct that contains those values

This has a short-term benefit and a long-term benefit.

The short-term benefit is that it removes the list-as-map-key
(etc.) values from the "types" generated file and puts it into
the "constants" generated file.  This gets them out of the way
of the Python tests, so they pass again.

The long term benefit is that is strengthens the Java TCompactProtocol
test.  Before, it was reading the "full" CompactProtocolTestStruct into
a CompactProtocolTestStruct that was just constructed, but the latter
was already almost equal to the former.  This change makes it much
easier to create an empty CompactProtocolTestStruct to read the serialized
data into.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762957 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 20:51:48 +00:00
Kevin Clark
b53471caea THRIFT-421. rb: Fix tests broken by original patch
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762928 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 20:03:09 +00:00
Bryan Duxbury
07f38ff531 THRIFT-430. rb: ruby tutorials and ruby tests require deprecated files and class names
This patch cleans all this up.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762618 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 04:37:28 +00:00
David Reiss
cf8c94acb4 THRIFT-426. cpp: Fix include path under test/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761763 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 19:07:19 +00:00
David Reiss
d0251dd852 cpp: Rename Makefiles under test/cpp
".mk" is the usual extension for makefiles not named
"GNUMakefile", "Makefile", or "makefile".  "Makefile.thrift"
should be a Thrift IDL file (think "Makefile.PL").


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761480 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 23:49:20 +00:00
David Reiss
356d570f36 cpp: Fix test server/client under test/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761479 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 23:49:18 +00:00
David Reiss
e4d4ea0e83 THRIFT-333. cpp: Initial TCompactProtocol implementation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761438 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 21:37:17 +00:00
David Reiss
689c9ad498 THRIFT-420. Remove all negative structure field ids from the code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761393 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:24:02 +00:00
Bryan Duxbury
5b8b484548 THRIFT-417. rb: BufferedTransport can enter an infinite loop
Switch native proto implementations to use read_all instead of read. Add a bunch of tests to verify. 

Also:
- removed some commented code in binary_protocol_accelerated.c
- struct.c was missing one of the possible native method calls
- updates gem manifest (included files that didn't exist)
- fixed svn:ignores of test/rb/gen-rb and lib/java/gen-java

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761037 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 20:10:15 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
06a9312baf csharp: Remove a BOM and CRLF line endings from some test code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760181 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:22:52 +00:00
David Reiss
b3c5f6e25f THRIFT-192. erlang: Commit test code missed in r757870
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760163 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:52 +00:00
David Reiss
233ace53f0 THRIFT-127. erlang: Skip fields that have the wrong type
In the other languages (AFAIK), if a field has the wrong type,
it is silently skipped.  Erlang currently assumes that the type
is correct and de-synchronizes.  This change makes it behave like
the other languages (except that it is not silent).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760161 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:47 +00:00
David Reiss
bfc57a0402 THRIFT-126. erlang: TMemoryBuffer for Erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760160 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:37 +00:00
David Reiss
a528f54eeb THRIFT-360. python: Make fastbinary skip struct fields with the wrong type
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758071 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:48:40 +00:00
David Reiss
cecbed81c8 THRIFT-136. s/async/oneway/ in the Thrift IDL
This is the real change.  The lexer now recognizes "oneway"
and warns on "async".  All example and test IDLs have been
updated, as have the syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757994 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:02:22 +00:00
David Reiss
6ce401dd55 THRIFT-136. s/async/oneway/ in misc places
This is mostly an internal-only change.
It affects docstrings, messages, variables, test cases, etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757992 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:58 +00:00
David Reiss
c51986f438 THRIFT-136. s/async/oneway/ in comments
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757990 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:25 +00:00
Kevin Clark
9a863ee551 THRIFT-192. erl: Fix handling of booleans
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757870 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 16:04:36 +00:00
Bryan Duxbury
e8ae5d3728 THRIFT-275. rb: Remove deprecated classes from Ruby library
This patch removes all the deprecation stuff and the t*.rb classes that were only placeholders. In addition, I've changed the implementations of some "abstract" methods to throw NotImplementedError instead of returning nil, and fixed the test accordingly. Finally, I removed the no longer required borrow and consume methods from all the transport implementations that had them. (Borrow and consume have been supplanted by the thrift_native package.) 


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757668 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 05:23:52 +00:00
Bryan Duxbury
3fb4f1ec92 THRIFT-392. hs: Make test scripts easier to use
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757620 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 00:36:00 +00:00
David Reiss
f2422b6067 Fix a parallel build bug under test
The "_extras.cpp" files depend on the appropriate ".h" files,
but that dependency is not listed in the Makefile, and cannot
be determined automatically by automake because the .h files
are generated.  Add explicit dependencies so "make -j8 check"
works.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756353 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 07:14:50 +00:00
David Reiss
ade070ffdf Get a few more generated files into release tarballs
The generated code for the C++ automated tests is all put into
one (non-installed) library.  This change updates the list of
sources for the library to (1) eliminate sources that aren't
used and (1) include the relevant header files.  The headers
aren't acutally built into the library, but listing them causes
them to be included in the release tarball.  They also had to
be added to the code-generating rules so make would know how
to build them.  Now "make check" works out of the box in
release tarballs (after configure).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756347 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 07:02:52 +00:00
David Reiss
48141bf5a6 THRIFT-373. Update lists of files to include in release tarballs
This is mostly EXTRA_DIST, but also includes some headers.
I had to drill down into test because "make dist" builds some
of the test code.  .gitignore is not included in the tarballs.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@755791 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 23:59:56 +00:00
David Reiss
e0a11c44ab Make .thrift files non-executable since we removed the shebangs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@753610 13f79535-47bb-0310-9956-ffa450edef68
2009-03-14 07:37:28 +00:00
Kevin Clark
586f0a0f01 Remove now defunct tests (they've been moved to specs in lib/rb)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@750188 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 22:06:59 +00:00
Kevin Clark
af99b5c398 THRIFT-352. rb: Implicit enums should be valid values
Author: Gary Tsang

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@750171 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 21:42:46 +00:00
David Reiss
b139f64448 THRIFT-325. Remove a bunch of uses of the old command line format
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745242 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17 20:28:46 +00:00
David Reiss
d831a21773 THRIFT-309. Make Thrift's C# mapping .NET 2.0 (Mono 1.2.4) compatible
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743963 13f79535-47bb-0310-9956-ffa450edef68
2009-02-13 03:09:52 +00:00
David Reiss
7d3df42bb5 cpp: Fix "make check" by defining a comparator for "Empty"
The TCompactProtocol revision added a "set<Empty>" in DebugProtoTest.
C++ needs a comparator in order to link this.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743111 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 21:38:44 +00:00
Bryan Duxbury
538e344122 THRIFT-110. java: A more compact format
This patch includes the Java implementation of the new Compact Protocol outlined in the issue and a matching test. It also creates Fixtures.java, a helper class that contains some useful test structure instances. 

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@742847 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 04:49:39 +00:00
David Reiss
a7fc092ee1 THRIFT-256. python: Fix inheritance of services in the same IDL file
The old version of type_name did not fully qualify parent service names
when they were defined in the same IDL file, but it is necessary because
they end up in different Python files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741833 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:37:09 +00:00
David Reiss
8cee47cf5e THRIFT-310. python: Generate valid code for empty services
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741832 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:37:05 +00:00
David Reiss
0b7d6fa5ee THRIFT-314. Purge reflection.limited
This was a feature designed to allow a Thrift server to report
information about its interface.  However, the feature has
significant design problems, and is presence is currently causing
confusion without doing any good.  Therefore, it is being removed.
It will always be in source control if and when we are ready to
come back to it.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741824 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:35 +00:00
T Jake Luciani
b5e6221eb5 THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 22:36:20 +00:00
David Reiss
f78ec2bc66 THRIFT-195. python: Add a simple THttpServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739638 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:59:32 +00:00
David Reiss
4c591c95a5 THRIFT-212. python: Make TFramedTransport implement CReadableTransport
This involved adding a few methods to provide lower-level access to the
internal read buffer.  This will allow us to use TBinaryProtocolAccelerated
with TFramedTransport.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739632 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:25 +00:00
David Reiss
9813cbeda6 cpp: Make the test server compatible with the Python test client
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739629 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:11 +00:00
David Reiss
3166141fbd python: Make the unit tests run faster and more reliably
- The async test was making the server sleep for 2 seconds.  Cut it to 0.5.
- The test driver was waiting 5 seconds for shutdown.  Cut it to 1.
- Add a 0.25 second sleep to make sure the server comes up before the client.

This is all a bit hacky, but it is better than the status quo.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739628 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:08 +00:00
David Reiss
c04452eff2 THRIFT-289. cpp: Fix "make check" by defining a comparator for "Instanity"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739083 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29 23:46:46 +00:00
Bryan Duxbury
50119f15aa THRIFT-289. test: "make check" no longer runs the Java tests
Thanks to David for the changes that straighten the makefiles out.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739024 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29 21:31:25 +00:00
Bryan Duxbury
986d705578 THRIFT-253. java: Enhance FieldMetaData
The code generator new creates a static map of field id to metadata for each field, including information like the field TType, class of embedded structs, required/optional/default, etc. Additionally, on loading, generated classes statically register their class and metadata map with the global FieldMetaData map, so you can get the metadata for any TBase-implementing class easily.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@738708 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29 01:51:08 +00:00
Bryan Duxbury
249d7cb199 THRIFT-166. java: Java tests should be in lib/java/test/
THRIFT-221. java: Make java build classpath more dynamic and configurable

This issue moves all the tests from test/java to lib/java/test/src and combines the build files. In addition, rather than continue on with the same busted approach to finding dependent jars for the tests, THRIFT-221 has been implemented, allowing the user to specify a .thrift-build.properties file in their home directory that contains additional classpath entries. 

As a result of this patch, "make check" does not currently work as it is expected to. This will be resolved in a follow-up commit.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@738695 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29 01:21:20 +00:00
Bryan Duxbury
afa80ea73d THRIFT-34 Java libraries should be namespaced under org.apache.thrift, not com.facebook.thrift
Library classes and tests have been moved to the proper package and directory structure, and references to com.facebook.thrift where replaced with org.apache.thrift throughout the code. The fb303 contrib project still contains com.facebook packages.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734855 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15 23:47:51 +00:00
Kevin Clark
c85fd50e2b THRIFT-216. Add validate method to fixtures so tests pass
Author: Esteve Fernandez


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734565 13f79535-47bb-0310-9956-ffa450edef68
2009-01-14 23:55:10 +00:00
David Reiss
46bb4aeb5e THRIFT-242. python: Used named arguments in __init__ instead of a dict
This is a wire-compatible but non-source-compatible change.
When initializing structures, you must use

Foo(bar=1, baz="qux")
Foo(**{"bar": 1, "baz": "qux"})

instead of

Foo({"bar": 1, "baz": "qux"})


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734536 13f79535-47bb-0310-9956-ffa450edef68
2009-01-14 22:34:15 +00:00
David Reiss
6319133cac THRIFT-25. csharp: Various compiler and library improvements
Compiler:
- Thrift structures are serializable.
- The member fields of thrift structures are now private and only accessible
  through Properties, which keep the appropriate __isset up to date.

Library
- Addition of TBufferedTransport, which can be used to wrap other Transports.
- Addition of TThreadedServer, which manually manages threads instead of
  relying on .NET ThreadPool.
- Servers use a log delegate that defaults to System.Console but allows
  servers to use log4net without introducing the dependency.

ThriftTest Visual Studio Project
- Test client and server that use ThriftTest.thrift. The project references
  thrift.exe and Thrift.dll from the subversion tree and automatically builds
  generated code. This makes it very easy to test changes in both the compiler
  and library.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@732079 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 19:49:22 +00:00
David Reiss
25be92bf0d THRIFT-222. java: Better exposure if __isset in beans style
- Generate an isSet method for each field to test its set-ness.
- Generate a generic isSet method that checks by field id.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731722 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 21:02:58 +00:00
David Reiss
5455f00348 THRIFT-138. java: Fix copy constructor for binary fields
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@731719 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 21:02:48 +00:00
T Jake Luciani
41687fc6cf THRIFT-193: Patch for proper namespace support in perl compiler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@728863 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 03:45:43 +00:00
David Reiss
a8efac862a THRIFT-225. java/cpp: Handle non-i32 integer constants properly
Java generates a warning when converting from an integer constant
to a byte or short without an explicit cast.  This change adds a
cast to byte and short literals in Java.

Both Java and C++ fail to compile integer literals larger than 2^31
unless they are decorated with "L" (for Java) or "LL" (for g++).
This change adds the appropriate decorations.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@727130 13f79535-47bb-0310-9956-ffa450edef68
2008-12-16 20:28:13 +00:00
David Reiss
a230999667 THRIFT-121. Support arbitrary type annotations
Adds syntax for attaching arbitrary key/value pairs to types.
These annotations can be accessed by individual generators to alter
the code they produce.

This version supports annotations on container types and structures.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@724954 13f79535-47bb-0310-9956-ffa450edef68
2008-12-10 01:52:48 +00:00
David Reiss
0c87ad41ee THRIFT-217. Use "--gen py" instead of "-py" in build scripts
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722333 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 02:11:13 +00:00
David Reiss
603d50437c THRIFT-138. java: Create deep-copy constructors for Thrift structs
- Create a copy constructor for every Thrift struct.  The constructor
  performs a deep copy on the argument, resulting in no shared state.
- Make thrift structions implement Cloneable and implement .clone()
  using the copy constructor.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722332 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 02:06:31 +00:00
David Reiss
04c315946c THRIFT-81. java: TNonblockingServer: Support a limit on read buffer size
This change makes it possible to set a maximum amount of memory that
TNonblockingServer will use for all read buffers (combined).
If it is exceeded, no new data will be read from clients until
memory is freed.  The current implementation does a busy wait in
the main thread when this happens.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719741 13f79535-47bb-0310-9956-ffa450edef68
2008-11-21 23:07:05 +00:00
David Reiss
30a9360e3f THRIFT-172. java: Improve toString output for binary fields
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719720 13f79535-47bb-0310-9956-ffa450edef68
2008-11-21 21:31:36 +00:00