Commit Graph

686 Commits

Author SHA1 Message Date
Roger Meier
1f554e1a9c THRIFT-1797 Python implementation of TSimpleJSONProtocol
Improve Test Suite according to test/ThriftTest.thrift
Patch: Avi Flamholz
2013-01-05 20:38:35 +01:00
Roger Meier
0895dfe6c0 THRIFT-1797 Python implementation of TSimpleJSONProtocol
Patch: Avi Flamholz
2012-12-26 22:09:55 +01:00
Roger Meier
ad8154a7a8 THRIFT-1796 TJSONProtocol is not functional
Patch: Avi Flamholz
2012-12-18 21:02:16 +01:00
Roger Meier
8252577ec9 THRIFT-1740 Make C++ library build on OS X and iOS
Patch: Ben Craig
minor modification by Roger Meier


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1410127 13f79535-47bb-0310-9956-ffa450edef68
2012-11-16 00:38:27 +00:00
Roger Meier
691ec00213 THRIFT-847 Test Framework harmonization across all languages
add NODE_PATH
remove Unix Domain Socket used by tests


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1404889 13f79535-47bb-0310-9956-ffa450edef68
2012-11-02 07:50:24 +00:00
Roger Meier
85fb6de7f4 THRIFT-1745 Python JSON protocol
TJSONProtocol.py: Frederic Delbos

THRIFT-847 Test Framework harmonization across all languages 
Integration into py lib and test suite



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1404838 13f79535-47bb-0310-9956-ffa450edef68
2012-11-02 00:05:42 +00:00
Henrique Mendonca
d407b2d1ca Thrift-1353: Switch to performance branch, get rid of BinaryParser
Client: Node.js
Patch: Wade Simmons

"binary" fields will be returned as Buffers instead of Strings
"int64" fields will be returned as http://github.com/broofa/node-int64 objects


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1401081 13f79535-47bb-0310-9956-ffa450edef68
2012-10-22 21:06:14 +00:00
Jake Farrell
6fcecd45a7 Updating Thrift trunk version to 1.0.0-dev
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1397293 13f79535-47bb-0310-9956-ffa450edef68
2012-10-11 20:34:25 +00:00
Jake Farrell
7c7a5e05ba Thrift-1721:Dist broken due to 0.8.0 to 0.9.0 changes
Client: build
Patch: Jake Farrell

Fix dist build to create the 0.9.0 release



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1396880 13f79535-47bb-0310-9956-ffa450edef68
2012-10-11 00:29:11 +00:00
Roger Meier
e983cf51f3 update Visual Studio project files and svn:ignore
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1395370 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 19:15:04 +00:00
Jake Farrell
be7493ee32 Thrift-1714:Explicitly add CWD to Ruby test_suites.rb
Client: rb
Patch: Nathan Beyer

test/rb/Makefile.am contains a invocation or the ruby interpreter to run test_suites.rb that needs modification to run correctly on Ruby 1.9+. Ruby 1.9+ doesn't include the CWD by default anymore.




git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1394906 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 02:51:45 +00:00
Roger Meier
3087738f28 THRIFT-1651 Support annotations on all elements
Patch: Benjy Weinberger



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1386848 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 21:18:05 +00:00
Roger Meier
21c0a85079 THRIFT-1615 PHP Namespace (was Thrift for Symfony 2)
Patch: Xavier HAUSHERR


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1381323 13f79535-47bb-0310-9956-ffa450edef68
2012-09-05 19:47:14 +00:00
Roger Meier
da74ff4a3b THRIFT-1598 Update Haskell generated code to use Text, Hash{Map,Set}, Vector
fix test suite

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1340044 13f79535-47bb-0310-9956-ffa450edef68
2012-05-18 09:25:02 +00:00
Jake Farrell
970c86a5f2 Thrift-1607:Incorrect file modes for several source files
Client: build
Patch: Andrew Cox

File modes of some non-script text files (e.g. .xml, .java, .cc) in the source tree include execute permissions (because these files have the svn:executable property).



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1339492 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 05:41:09 +00:00
Roger Meier
67377e7f3b fix broken build introduced with THRIFT-1336
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1336895 13f79535-47bb-0310-9956-ffa450edef68
2012-05-10 21:17:53 +00:00
Roger Meier
4fce960b7f THRIFT-1592 Test clients should have a return codes that reflect whether they succeeded or not
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333765 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 06:22:09 +00:00
Roger Meier
99b3672530 THRIFT-1588 Java Generated Exceptions don't follow inheritance pattern as other Languages
- fix the build!
- add test/gen-html for ThriftTest.thrift

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333628 13f79535-47bb-0310-9956-ffa450edef68
2012-05-03 21:21:43 +00:00
Roger Meier
1f8b48f5bd THRIFT-1590 Document the excepted return values and behaviors ThriftTest.thrift so that all languages can implement a test server
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333243 13f79535-47bb-0310-9956-ffa450edef68
2012-05-02 22:56:47 +00:00
Roger Meier
f50df7f2ba THRIFT-1588 Java Generated Exceptions don't follow inheritance pattern as other Languages
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333239 13f79535-47bb-0310-9956-ffa450edef68
2012-05-02 22:49:55 +00:00
Roger Meier
33eaa0f100 THRIFT-1552 Thrift (cpp) include files shouldn't require adding "thrift" to the compilers include path.
roger: some additional fixes

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325677 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 09:13:13 +00:00
Roger Meier
49ff8b123a THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/'
To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.

e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>

Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 09:12:31 +00:00
Roger Meier
5c80802332 THRIFT-1553 thrift nodejs service side can't read map structure, key as enum, value as Object
Patch: Henrique Mendonca

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1310986 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 12:30:00 +00:00
Jake Farrell
b95b0ffa72 THRIFT-1500: d programming language support
Client: D
Patch: David Nadlinger

D program language library and additions



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1304085 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 21:49:10 +00:00
Jake Farrell
f9f01fa1e0 THRIFT-1394:Treatment of optional fields is not consistent between C++ and Java
Client: cpp
Patch: Diwaker Gupta

In CPP, all optional fields are guarded by the isset helper struct. On Java, however, the generated code takes advantage of nullable types: for containers, structs, exceptions, enums, and, notably, strings, the generator elides explicit use of an "isset" bit vector and instead emits checks of the form "field null". This leads to varying behavior between the two languages: an optional string field with a default value will have {{isset[fieldid]}} false on C, but the equivalent test in Java will be true.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236529 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:48:26 +00:00
Roger Meier
b33967be76 THRIFT-847 Test Framework harmonization across all languages
add php TestClient to the testsuite

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1234292 13f79535-47bb-0310-9956-ffa450edef68
2012-01-21 09:18:05 +00:00
Roger Meier
3ac6d87928 THRIFT-1495 PHP TestClient fatals on missing class
Patch: Andrew Grumet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1233958 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 15:31:45 +00:00
Roger Meier
f0e517db99 THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton

changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232578 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 21:20:56 +00:00
Roger Meier
eaa61d8fda THRIFT-1267 Node.js can't throw exceptions
Patch: Henrique Mendonca

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1230797 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 21:38:29 +00:00
Roger Meier
0580d8dcb1 THRIFT-847 Test Framework harmonization across all languages
perl fixes:
 - include test/perl if perl is enabled

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1229764 13f79535-47bb-0310-9956-ffa450edef68
2012-01-10 22:11:36 +00:00
Roger Meier
01b568cb5d THRIFT-847 Test Framework harmonization across all languages
perl fixes:
- generate Makfile for perl tests
- add inc path to test

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1229745 13f79535-47bb-0310-9956-ffa450edef68
2012-01-10 21:30:02 +00:00
Roger Meier
4d5157da02 THRIFT-847 Test Framework harmonization across all languages
add test.sh as a first approach

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1229359 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 21:23:19 +00:00
Bryan Duxbury
a3df547c84 THRIFT-317. java: Issues with Java struct validation
Nested structs will now be validated before serialization starts.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1225035 13f79535-47bb-0310-9956-ffa450edef68
2011-12-27 22:26:59 +00:00
Bryan Duxbury
1e79cb40f5 THRIFT-1469. java: Java isset space optimization
This patch gives the generated code some variable-sized options for the isset bit vector. The compiler will attempt to use byte, short, int and long types before reverting to a BitSet for structs with a LOT of optional fields. This should save a fair amount of memory in a lot of cases.

Patch: Brian Bloniarz

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1221828 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 18:13:29 +00:00
Jake Farrell
ea949fbaf9 Thrift-1462: add more strict compiler flags
Reverting patch due to it breaking compilers older than 4.4 (os x, centos 5.x, etc)



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213901 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 20:02:33 +00:00
Roger Meier
ca10fd4a51 THRIFT-1462 add more strict compiler flags(-Wall -Wextra -std=c++0x -pedantic)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213459 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 22:00:23 +00:00
Roger Meier
611f90cf9e THRIFT-1459 declare shared_ptr as boost::shared_ptr
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213090 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 22:08:51 +00:00
Roger Meier
5b1e3c7bf1 return 1 if transport open fails
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211868 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 13:20:12 +00:00
Jake Farrell
9689d89df1 Thrift-1340: Add support of ARC to Objective-C
Client: Objective-c
Patch: Hirano Satoshi

Adds -objc-arc flag to compiler and if used removes the retain/release/autorelease from generated code



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210732 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 01:07:17 +00:00
Jake Farrell
e0c5316736 Thrift-1426: Dist package missing files for release 0.8
Client: build
Patch: Jake Farrell

Cleans up dist target and removes extra folders.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202686 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 12:58:36 +00:00
Roger Meier
61188a4797 THRIFT-1416 Python Unit test is broken on ci
remove repr from TestSuite

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1196273 13f79535-47bb-0310-9956-ffa450edef68
2011-11-01 21:03:33 +00:00
Jake Farrell
7ae13e10f7 Thrift-1366: Delphi generator, lirbrary and unit test.
Client: delphi
Patch: Kenjiro Fukumitsu

Adding delphi XE generator, lib and unit tests.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1185688 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 14:35:26 +00:00
Bryan Duxbury
6c928f3f5f THRIFT-1130. compiler: Add the ability to specify symbolic default value for optional boolean
Patch: Nevo Hed

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1183115 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 21:32:52 +00:00
Roger Meier
3faaedf46b THRIFT-1361 Optional replacement of pthread by boost::thread
Patch: alexandre parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1178176 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 10:51:45 +00:00
Bryan Duxbury
40d51a28d7 THRIFT-1365. java: TupleProtocol#writeBitSet unintentionally writes a variable length byte array
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1176072 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 21:29:15 +00:00
Bryan Duxbury
e80a194c47 THRIFT-1331. rb: Ruby library deserializes an empty map to nil
This patch properly detects when the metadata is omitted in Compact Protocol messages.

Patch: Armaan Sarkar

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1173300 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 18:45:56 +00:00
Roger Meier
f4eec7a57b THRIFT-1115 python TBase class for dynamic (de)serialization, and __slots__ option for memory savings
Patch: Will Pierce

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1169492 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 18:16:21 +00:00
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
David Reiss
c26da0a391 THRIFT-202: java: Fix "make check"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719407 13f79535-47bb-0310-9956-ffa450edef68
2008-11-20 22:22:23 +00:00
David Reiss
74421273ad THRIFT-67. python: Add TNonblockingServer
This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712306 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 23:09:31 +00:00
David Reiss
1cc0c5e6d6 THRIFT-109. python: Use self.assert* instead of assert in tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705734 13f79535-47bb-0310-9956-ffa450edef68
2008-10-17 19:30:35 +00:00
David Reiss
8d07e1d152 s/ENABLE_RUBY/WITH_RUBY/ for consistency.
This didn't happen in r666490 because the Ruby stuff was developed
in a separate branch.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675857 13f79535-47bb-0310-9956-ffa450edef68
2008-07-11 08:04:12 +00:00
Kevin Clark
4bd8916b12 Merge branch 'fastbinary'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@674688 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 00:47:49 +00:00
David Reiss
af78778acd (THRIFT-54) Remove "frameResponses" from TNonblockingServer
TNonblockingServer and TFramedTransport used to have the option to only
frame messages on one side of the communication.  This capability was
removed from TFramedTransport because it was poorly implemented and not
useful.  This change removes it from TNonblockingServer as well, and
removes references to it in some of the C++ test code.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673791 13f79535-47bb-0310-9956-ffa450edef68
2008-07-03 20:29:34 +00:00
David Reiss
03b574fead (THRIFT-5) A TNonblockingServers (single-threaded and thread-pool) for Java
This patch adds two Thrift servers for Java that both use non-blocking I/O
to avoid locking up worker threads for idle connections.  The two classes are
- TNonblockingServer, which supports single-threaded serving
- THsHaServer, which performs I/O in one thread and method invocations in
  a configurable thread pool.
To support these servers, TNonblockingServerSocket and TNonblockingSocket
have been added.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673550 13f79535-47bb-0310-9956-ffa450edef68
2008-07-02 23:55:04 +00:00
David Reiss
f14541626d Partial handlling of 64-bit integer constants.
- Parse integer constants in Thrift files as 64-bit ints.
- Die if an overflow occurs.
- Warn if an enum value cannot fit in 32 bits.
- Add a simple test for the above.

I ran all of the generators over BrokenConstants.thrift before adding the
overflow, and they appeared to work.  However, the code generated was not
always valid (for example, the 64-bit constant must have an LL suffix in C++).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672907 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:45:47 +00:00
David Reiss
6b082755f0 (THRIFT-61) Fix "make check" for the C++ library by not doing empty flushes.
I changed the behavior of TFramedTransport when flush is called without
writing any data to the transport.  This broke the unit test, which was
relying on a weird corner of TFramedTransport's behavior in order to do
some stricter checking.  I altered the unit test to never flush without
writing and added a new test to verfy the "empty flush" behavior.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672881 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 19:48:04 +00:00
Kevin Clark
45671689ea Fix odd bug in integration tests where it passed the wrong args to an Exception struct initializer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668987 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:17 +00:00
Kevin Clark
41c0a0266b Improve compatibility with the old Hash-style set.
Fix the integration test for the Set change


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668960 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:09:28 +00:00
Kevin Clark
d639ac13b5 Fix the last of the deprecated names in tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668938 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:04:18 +00:00
Kevin Clark
9d33041a1b Fix name usage in tests. Remove test for TTransport as it really wasn't testing anything useful.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668937 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:04:03 +00:00
Kevin Clark
dd8ef9ef53 Remove test_remappings because it isn't comprehensive and it's triggering undesired warnings. This should be re-created as a spec.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668936 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:03:48 +00:00
Kevin Clark
adfdf39dd3 Clean up the last few deprecation warnings in the tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668922 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:59:56 +00:00
Kevin Clark
f85e793494 Fix up thrift/thrift to only require the the files that define the classes it used to hold. This fixes the existing tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668912 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:56:48 +00:00
Kevin Clark
2960044415 rb: Add more classes/modules to the Thrift namespace. Provide backwards compatable mappings.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668904 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:54:13 +00:00
Kevin Clark
c669efa48b rb: Add deprecate! method Rename TTransport#readAll/isOpen, and deprecate
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668899 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:52:26 +00:00
Kevin Clark
a7e7c04e9d rb: Switch to dyn generator syntax for testing namespaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668898 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:52:05 +00:00
Kevin Clark
d5c98eedc8 Exercise namespacing in Ruby tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668897 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:51:45 +00:00
Kevin Clark
720b5732cc Swap out 'tests' target for 'check' in Ruby Makefile
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668896 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:51:25 +00:00
Kevin Clark
a37d90e6cb Add tests for Ruby TTransport. Only require .rb files in ruby tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668892 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:50:00 +00:00
Kevin Clark
28580f4544 Reorganize tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668890 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:49:17 +00:00
Kevin Clark
18cb21a125 Tweak Ruby Makefile to use --gen syntax
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668889 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 00:48:56 +00:00
David Reiss
82c1bab8f3 Rename AM_CONDITIONALs from ENABLE_* to WITH_*.
This is to match the configure command-line options that define them.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666490 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:53 +00:00
David Reiss
c6c6498b02 Allow out-of-source builds.
- Clean up lib/cpp/Makefile.am to use AM_CXXFLAGS etc instead of
  target-specific so we can take advantage of default flags.
- Use top_builddir in a few places instead of top_srcdir.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666489 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:45 +00:00
David Reiss
1a14091adc Allow Thrift to be built without the Python library.
- Modify configure.ac to check for Python conditionally, like we do for
  Java, Mono, and Erlang.
- Modify Makefile.am to add "py" to SUBDIRS only if Python was detected.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666488 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:37 +00:00
David Reiss
cc0c9e98b5 Clean up some bad/missed merges from the alterl merge.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666486 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:29 +00:00
David Reiss
cb13729795 [erl] Finish fixing test_server to work with binary strings
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666485 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:15 +00:00
David Reiss
a59191b5ef [erl] fix test_server to expect binary type for strings rather than lists
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666484 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:09 +00:00
David Reiss
9f2a5d7799 Rename "alterl" to "erl".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666481 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:15:45 +00:00
David Reiss
844540669e Add thrift_base64_transport which writes base64 encoded data
Summary:
  This is to make it easy to run Hadoop mapreduces using Hadoop Streaming on thrift-serialized structs
  without implementing any special file splitter or anything

Test plan: test_disklog:t_base64()


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666466 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:12:31 +00:00
David Reiss
65cf720b19 Add thrift_client:send_call which sends a function call but doesn't read a response.
Summary:
  This is for logging applications with thrift_disk_log_transport, so the function calls
  logged don't necessarily have to be async void

Test plan:
  Added to test_disklog.erl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666465 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:12:20 +00:00
David Reiss
6d477592fa Add thrift_disk_log_transport which writes to the disk_log module
Summary:
  See test/erl/src/test_disklog.erl for example usage

Test plan: test_disklog:t(), then hexdump -C /tmp/test_log.1


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666464 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:12:09 +00:00
David Reiss
55ff70f8d6 Implement TApplicationException handling in alt_erl client
Summary:
  Throws a 'TApplicationException' record

Test plan:
  Changed cpp TestServer so that if testException is called with "ApplicationException" as an argument, it throws a TException which is serialized back as an EXCEPTION type message


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666421 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:58:25 +00:00
David Reiss
8cf694d62d Change alterl thrift_server to use non-blocking TCP calls and properly set the processor as the controlling process for the client sockets.
Summary:
  - Removes the non-OTP "acceptor" process
  - The processor becomes the socket's controlling process instead of the transport, which is kind of messy, but it means we don't have to make a process for the socket_transport.
  - See http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles for non-blocking server info

Test plan:
  - Ran ThriftTest and StressTest


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666417 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:57:54 +00:00
David Reiss
cdf8d1994a Implement async_void in alterl bindings
Summary:
  - reply_type for async void functions is now async_void instead of
    the empty struct definition
  - async void functions should return "ok". otherwise the processor
    will crash and the connection will be killed. Is this behaviour
    expected?

Test Plan: tested using testAsync() in ThriftTest. Didn't used to work
           but works now


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666415 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:57:35 +00:00
David Reiss
abded23ed4 Implement testAsync for python tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666412 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:57:01 +00:00
David Reiss
c85a695588 Add mkdir ${TARGET_DIR} to erl test Makefile since the empty ebin/ dir doesn't stay in git
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666411 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:56:55 +00:00
David Reiss
60b50cf385 Add stress test implementation for new Erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666389 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:59:10 +00:00
David Reiss
c0cce962ac Oops - forgot to add the test/erl/Makefile to git
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666387 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:58:58 +00:00
David Reiss
57b4d9a4ac Test server for erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666385 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:58:39 +00:00
David Reiss
176ed368a3 Avoid a filename collision on case-insensitive filesystems.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666373 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:56:48 +00:00
David Reiss
bcaa2ad0d6 Python forking server should close connection in parent.
When a function called by the forking python thrift server throws an
exception the client will hang.  This happens because the parent of the
forked process does not properly close the socket fd.

Under normal operation the server operation completes and returns a value to
the client.  However, when an exception occurs the 'end' message is never
sent to the client so the client relies on a connection close to abort the
call (this is how the threading server works I believe).

This fails with the forking server because the parent process never closes
the socket fd.  The child has closed the fd at this point, but the
connection will not actually be closed until all open instances of the fd
are closed. Since the client is waiting for a message and the server never
closes it the client is forced to wait until a read timeout occurs many
minutes later.

This diff closes the parent's copy of the socket fd immediately after the
fork occurs.

I modified my load test server to throw an exception.  The client did not hang.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666363 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 22:55:26 +00:00
David Reiss
f9b5b12f4d Tweak Java Makefile.ams to fix "make distclean".
The Java Makefile.ams assume the existence of ANT, but "make distclean"
runs in the Java directories even if ENABLE_JAVA is off.  This change
makes the clean-local target handle the absence of ANT, fixing
"make distclean".


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665683 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 07:17:35 +00:00
David Reiss
28f298dd5d Memory-based transport rewrite.
The old implementations of the memory-based transports (TBufferedTransport,
TFramedTransport, and TMemoryBuffer) shared very little code and all worked
a bit differently.  This change unifies them all as subclasses of a single
base (TBufferBase) which handles the fast-path operations (when requests
can be satisfied by the buffer) with inline methods (that will eventually
be made nonvirtual in the template branch) and calls out to pure-virutal
methods to handle full/empty buffers.  All of the buffer-management is now
done in terms of "base and bound" pointers rather than "pos" integers.

These classes were moved to TBufferTransports.{h,cpp}.  The .h is included
in TTransportUtils for backwards compatibility.

Also added a "TShortReadTransport" to assist testing transports.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665676 13f79535-47bb-0310-9956-ffa450edef68
2008-05-01 06:17:36 +00:00
David Reiss
9a4edfa07f Properly handle constants of typedef'ed types.
Also throw an error in the compiler if we cannot generate a constant for a
declared const because of its type.  Added a test of this functionality in
ConstantsDemo.thrift.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665675 13f79535-47bb-0310-9956-ffa450edef68
2008-05-01 05:52:50 +00:00
David Reiss
81c7fc01bf Add a missing include to Benchmark.cpp to make it build on Mac OS.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665667 13f79535-47bb-0310-9956-ffa450edef68
2008-04-28 02:51:44 +00:00
iproctor
8361bf0565 ocaml and haskell thrift clients now calling readMessageEnd
Summary: I neglected to make the call to readMessageEnd if the client read an app exception in the haskell and ocaml code. Fixed now. The test cases for both now also compile with the new ThriftTest.thrift (though haskell's is still not doing anything but echoing  the args)

Reviewed By: dreiss

Test Plan: Ran test code. This bug would actually never show up because there's only tbinaryprotocol implemented for these languages and that does nothing on a readMessageEnd.

Revert: OK

DiffCamp Revision: 11377


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665651 13f79535-47bb-0310-9956-ffa450edef68
2008-04-10 00:31:55 +00:00
David Reiss
1ffb61beaa Fix a bug in TPipedTransport that broke pipelining.
Previously, TPipedTransport wrote it's full buffer to the "pipe" and
fully reset its buffer on a readEnd.  This assumed that the buffer was
fully read at that point.  This is not the case if requests are pipelined.
This change makes it only pipe out the portion that has been read and
copy the unread portion to the beginning of the buffer.

Also add a test that verifies the new functionality.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665646 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 05:07:26 +00:00
David Reiss
e4db03d110 Add TFDTransport: a dead-simple wrapper around a file-descriptor.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665644 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 05:06:59 +00:00
David Reiss
2a4bfd6d0c Clean up the unit tests.
- Make Python tests cwd-agnostic.
- Use boost::test.
- Add a benchmark.
- Use a library to clean up test/Makefile.am.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665640 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 23:45:00 +00:00
David Reiss
3095aa1843 Add a test client and server for C#.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665633 13f79535-47bb-0310-9956-ffa450edef68
2008-04-02 22:10:17 +00:00
David Reiss
3000b5b1f1 Add an experiment to measure the likeliness that realloc will avoid a copy.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665625 13f79535-47bb-0310-9956-ffa450edef68
2008-03-31 21:38:29 +00:00
David Reiss
07ef3a930a Make the Perl generator use non-hardcoded namespaces.
- Make the Perl generator use program->get_namespace("perl")
  instead of program->get_perl_package()
- Eliminate the explicit "perl_package" in t_program.
- Deprecate the perl_package token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665624 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:42:39 +00:00
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
320e45ce8b Make the Python generator use non-hardcoded namespaces.
- Make the Python generator use program->get_namespace("py")
  instead of program->get_py_module()
- Eliminate the explicit "py_module" in t_program.
- Deprecate the py_module token.
- Update example .thrift files and syntax files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665615 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:41:54 +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
ea5e75af3b Add Java JSON protocol implementation.
Implement full-featured JSON protocol, low-level base-64 encode/decode
methods, and related tests.

Conflicts (resolved by dreiss):

	test/java/build.xml


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665562 13f79535-47bb-0310-9956-ffa450edef68
2008-03-07 20:12:20 +00:00
David Reiss
4a8f46ca0b Add more complete base64 testing for C++ JSON protocol.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665559 13f79535-47bb-0310-9956-ffa450edef68
2008-03-07 20:12:07 +00:00
David Reiss
14feb4127c Generate quality overrides of hashCode for Thrift structs (in Java).
This feature is turned off by default because it adds a new dependency:
Apache Commons Lang.  This package seems enough like Boost that
I would be open to turning this feature on by default.

Also updated test/java/build.xml to use this new option.
ant test still passes.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665542 13f79535-47bb-0310-9956-ffa450edef68
2008-03-02 06:29:23 +00:00
David Reiss
3b15ebc251 Add support for .equals() to Java structs.
- Add a new method to t_java_generator that generates a .equals() method.
- Add a correct but useless implementation of hashCode for structs.
  (This is required by conventino when overriding .equals().)
- Add java_package to DebugProtoTest and OptionalRequiredTest.
- Add a new structure to OptionalRequiredTest to assist testing the behavior
  of .equals() with respect to null and unset fields.
- Clean up test/java/build.xml a bit.  (It still has a ways to go.)
- Add EqualityTest.java to test .equals().
- Add IdentityTest.java to test that writing and reading a structure
  preserves equality.

Tested by runnint atn test.
I also looked at the generated code for OptionalRequiredTest.thrift.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665541 13f79535-47bb-0310-9956-ffa450edef68
2008-03-02 06:29:19 +00:00
David Reiss
4ce2874fd5 Make limited reflection optional (off by default).
Limited reflection is deprecated, and it is slowing down compilation.
This change will disable generation of static reflection by default,
but it adds a command line argument to re-enable it.

Tested by running make check and building the C++ test client and server.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665520 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 07:45:05 +00:00
David Reiss
9db977f5bd Update test/Makefile.am to use the new compiler command-line format.
Tested by running make check.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665519 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 07:45:00 +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
2ca456a8ae Make "make clean" rules a bit more standard.
Summary:
make-generic is some sort of internal undocumented thing.
make-local is what is supposed to be used for this stuff.
Also use $(RM) instead of "rm -f".

Reviewed By: marc

Test Plan: make clean


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665498 13f79535-47bb-0310-9956-ffa450edef68
2008-02-24 16:42:18 +00:00
David Reiss
ff50f28700 Add automake support for running the Java tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665496 13f79535-47bb-0310-9956-ffa450edef68
2008-02-23 22:07:46 +00:00
David Reiss
4f15f59bca Update TJSONProtocol to TSimpleJSONProtocol
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665495 13f79535-47bb-0310-9956-ffa450edef68
2008-02-23 22:07:43 +00:00
David Reiss
2845b52f47 Enhance C++ test client to make sure that async void is implemented properly
Summary:
Added another i32 test after the async test. If testAsync improperly
sends a response, then the i32 test will fail because the function
name won't match up, since it will be "off by one".

Test plan:
Tested cpp server and it works. Tested alterl server which
doesn't yet implement async void properly and verified failure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665486 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:52 +00:00
David Reiss
db893b617f Implement testAsync for python tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665485 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:48 +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
9590a4c9cc Change test scripts for Java to point to libthrift.jar in source tree.
Summary:
  - They used to point at /usr/local/lib/libthrift.jar even though the build.xml pointed
    at a relative path in the source tree


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665483 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:39 +00:00
David Reiss
db0ea15310 Thrift: Add a full-featured JSON protocol for C++.
Summary:
This change adds a new and exciting protocol to Thrift.  It uses
RFC-compliant JSON as the wire protocol and is fully human readable.
(once a little whitespace has been inserted.)  Unlike the existing
JSON protocol for Java, which is intended to allow Thrift data to be
transferred to scripting languages, this protocol is lossless and fully
read-write.  It was written by Chad Walters of Powerset and reviewed
by David Reiss.

Tested by running make check.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665482 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 01:49:37 +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
Mark Slee
22360b2f30 Use interfaces, not classes for Java gen
Summary: Not AbstractMap or HashSet, etc. use Map, List, Set

Reviewed By: dreiss

Test Plan: Generate Java code and build java tests

Other Notes: Submitted by Seth Falcon


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665470 13f79535-47bb-0310-9956-ffa450edef68
2008-02-09 00:18:32 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
David Reiss
f7baf549bc Thrift: Revamp TMemoryBuffer constructors.
Summary:
There were some weird cases where the implicit conversion from
const char* to std::string was causing the wrong constructor to be called.
There wasn't really a clean workaround, so we're dropping the string
constructors.

Reviewed By: mcslee

Test Plan:
Ran the test.
Grepped around the /projects tree for uses that had to fixed,
and fixed them.

Revert Plan: ok

Other Notes:
This risk was pointed out by Ben Maurer.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665461 13f79535-47bb-0310-9956-ffa450edef68
2008-02-04 21:56:27 +00:00
David Reiss
8180c0c028 Thrift: "make check" support.
Summary:
Add a Makefile.am in the test directory that runs some of the test programs
when "make check" is executed.  Also removed some obsolete comments.

Reviewed By: mcslee

Test Plan:
Ran make check, saw all tests pass.
Ran make install, saw no test programs installed.
Ran ./cleanup.sh, saw a pristine workspace.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665458 13f79535-47bb-0310-9956-ffa450edef68
2008-02-04 21:14:14 +00:00
David Reiss
4637990013 Thrift: Fix a bug in a test program.
Summary:
This didn't get updated when the class was renamed.

Reviewed By: mcslee

Test Plan: Trust Chad Walters.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665456 13f79535-47bb-0310-9956-ffa450edef68
2008-02-04 19:23:57 +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
89f5716421 Ruby default values patch
Summary: Submitted by Dan Sully, reviewed by Kevin Clark

Reviewed By: dreiss

Test Plan: New ruby generated code with default vals, and new test scripts


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665418 13f79535-47bb-0310-9956-ffa450edef68
2008-01-10 00:53:08 +00:00
David Reiss
832b262aca Thrift: Revamp build to use a single configure.ac.
Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665409 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 18:25:33 +00:00
David Reiss
c16a8f6e45 Thrift: Python support for Unix-domain sockets, and eager timeout setting.
Reviewed By: mcslee

Test Plan: Ran the test script.

Revert Plan: ok

Other Notes:
Contributed by Ben Maurer.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665394 13f79535-47bb-0310-9956-ffa450edef68
2007-12-14 23:46:47 +00:00
Mark Slee
3f14d3ebec Merge Ruby framed transport
Summary: Submitted by Jake Luciani

Reviewed By: mcslee

Test Plan: Test code included in this commit


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665385 13f79535-47bb-0310-9956-ffa450edef68
2007-12-05 23:13:11 +00:00
Mark Slee
844ac12489 TJSONProtocol writing support in Java
Summary: TJSONProtocol for Java with write support and a TSerializer utility for easier conversion of Thrift objects into byte[] or strings.

Reviewed By: dreiss

Test Plan: Included a basic piece of this in test/ client for Java.

Revert: OK

DiffCamp Revision: 3890


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665367 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 08:38:52 +00:00
Mark Slee
53d9c0c20b Merging EOFException changes from Ben Maurer
Summary: Throw a proper EOFError in this case. Long term we want to change this to properly fit into the Thrift TException heirarchy with a good way to handle the original exception as well. For now, Ben is the primary user of this so we'll go ahead with his patch.

Reviewed By: mcslee

Test Plan: Included in test/py/TestEof.py


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665365 13f79535-47bb-0310-9956-ffa450edef68
2007-11-26 21:15:40 +00:00
Mark Slee
79b1694043 Refactor TNonblockingServer to use event_base construct
Summary: This allows the event loop to be shared across different components of a program of for a separate thread in a TNonblockingServer to safely use its own libevent code without conflicts.

Reviewed By: mcslee

Test Plan: Updated test/ committed here

Other Notes: submitted by Ben Maurer, patched in by mcslee with slight modifications


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665364 13f79535-47bb-0310-9956-ffa450edef68
2007-11-26 19:05:29 +00:00
Mark Slee
8067485595 Complete rb test server with testEnum and testTypedef
Reviewed by: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665359 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 05:54:13 +00:00
Mark Slee
5b743079da Thrift PHP generation Redux
Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime.

Reviewed By: sgrimm, dreiss

Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665328 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 04:00:29 +00:00
Mark Slee
5299a959e0 Python automated test patch
Summary: Submitted by Ben Maurer

Reviewed By: dreiss

Test Plan: Automated python testing for Thrift, lovely.

Revert: OK

DiffCamp Revision: 737


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665293 13f79535-47bb-0310-9956-ffa450edef68
2007-10-05 00:13:24 +00:00
Mark Slee
8266443d92 OO perl accessors for Thrift objects
Summary: Submitted by Jake Luciani

Reviewed By: cpiro

Test Plan: Supplied in test/tutorial code


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665276 13f79535-47bb-0310-9956-ffa450edef68
2007-09-19 06:49:30 +00:00
David Reiss
faebedd356 Thrift: Re-committing zlib.
Summary:
Same as the last (reverted) zlib patch,
but this time with way more awesome support for building
with no zlib headers installed.

Reviewed By: mcslee

Test Plan:
- Did lots of really pathological stuff in my VMware.
- On devrs004:
  ./bootstrap.sh && ./configure && make && make install DESTDIR=/tmp/tzinst && echo "Yay"

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665269 13f79535-47bb-0310-9956-ffa450edef68
2007-09-17 23:20:38 +00:00
David Reiss
5aea7c8d00 Thrift: Reverting TZlibTransport
Summary:
Stupid Red Hat.
The dev boxes don't have the development packages for zlib.

Blame Rev: 59856

Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665263 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 01:54:56 +00:00
David Reiss
b8c6334d99 Thrift: Zlib transport.
Summary:
Add a new transport to the C++ library: TZLibTransport.
This wraps another transport (just like TBufferedTransport),
compresses the data written to it, and uncompresses the data it reads.

Reviewed By: mcslee

Test Plan:
For ax_lib_zlib.m4
 - Ran ./bootstrap.sh.
 - Looked at configure.
 - Ran ./configure.
 - Looked at config.status
 - Ran ./configure --with-zlib=/usr.
 - Looked at config.status
 - Changed configure.ac to AC_LIB_ZLIB(1.2.4)
 - Ran ./configure.
 - Watched it fail.

For TZlibTransport
 - test/ZlibTest.cpp
 - Code coverage (hotness) report sent with review.
 - 100% line coverage for all the good stuff.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665262 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 01:44:47 +00:00
David Reiss
ce161a96cd Thrift: Clean up and test TDenseProtocol
Summary:
- TDenseProtocol now includes a part of the struct fingerprint in
  the serialized message, to protect from unserialzing trash.
- A lot of cleanups and commenting for TDenseProtocol.
- A lot of test cases for same.

Reviewed By: mcslee

Test Plan: test/DenseProtoTest.cpp

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665257 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 22:09:42 +00:00
David Reiss
e67c0e63b3 Thrift: TDenseProtocol using variable-length integers.
Reviewed By: mcslee

Test Plan:
test/DenseProtoTest.cpp

Still have to test:
- Bounds checking.
- borrow/consume on TBuffered and TFramed.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665252 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 01:34:12 +00:00
David Reiss
2c2e6d27a2 Thrift: Python TBufferedTransport improvements.
Summary:
The Python version of TBufferedTransport now uses input buffering.
It is also compatible with the fasbinary module.

Reviewed By: mcslee

Test Plan:
test/FastbinaryTest.py

dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
99
# Install new version in other terminal
dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
14

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665250 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 01:14:09 +00:00
David Reiss
4e7530d4e5 Thrift: TDenseProtocol.
Summary:
- Made some stuff in TBinaryProtocol protected instead of private.
- Added a preliminary version of TDenseProtocol.  This is still
  super highly experimental and gross, and I wrote a super scary
  comment to explain that to anyone foolish enough to try to use
  this in its current state.

Reviewed By: mcslee

Test Plan: test/DenseProtoTest.cpp

Revert Plan: ok

Memcache Impact:
Save memory if/when people use it.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665247 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 21:49:53 +00:00
David Reiss
d779cbe48c Thrift: Local Reflection for C++.
Summary:
The compiler now takes a "-dense" flag that will cause it to
generate some extra metadata for C++.  This metadata will be used by
TDenseProtocol.  This should be the last compiler change necessary
to enable that feature.

Reviewed By: mcslee

Test Plan: test/DenseLinkingTest.thrift

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665240 13f79535-47bb-0310-9956-ffa450edef68
2007-08-31 01:42:55 +00:00
David Reiss
c6fc329a40 Thrift: Support for explicit Python module declaration.
Summary:
Previously, Thrift used the name of the .thrift file as the python module name.
This wasn't very flexible.  Now the python module can be explicitly declared.
Also, there was no need for t_py_generator to inherit from t_oop_generator.

Reviewed By: mcslee

Test Plan:
cd test/py/explicit_module
./runtest.sh

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665234 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 00:58:43 +00:00
David Reiss
2375312fa0 Thrift: Limited Reflection for C++.
Summary:
The Thrift compiler now generates static methods for every service to generate
a reflection of the methods provided by the service.  This reflection is fairly
limited, but should be enough for what we want to do with SMC.

Reviewed By: mcslee

Test Plan: test/ReflectionTest.cpp

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665226 13f79535-47bb-0310-9956-ffa450edef68
2007-08-27 19:57:34 +00:00
David Reiss
382fc3043c Thrift: Native-code Binary Protocol encoder.
Summary:
Merging a patch from Ben Maurer.
This adds a python extension (i.e., a C module) that
encodes Python thrift structs into the standard binary protocol
much faster than our generated Python code.

Also added by-value equality comparison to thrift structs
(to help with testing).

Cleaned up some trailing whitespace too.

Reviewed By: mcslee, dreiss

Test Plan:
Recompiled Thrift.
Thrifted a bunch of IDLs and compared the generated Python output.
Looked at the extension module a lot.
test/FastBinaryTest.py

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665224 13f79535-47bb-0310-9956-ffa450edef68
2007-08-25 18:01:30 +00:00
David Reiss
e087a30585 Thrift: Make use of get_true_type.
Summary:
We added a helper function for the generators: get_true_type,
which finds the actual type behind a series of typedefs
(though the compiler only supports one layer of typedefs now).
This change uses it everywhere we used to have that loop.
(It was a lot of places.)

Reviewed By: mcslee

Test Plan: test/ManyTypedefs.thrift

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665220 13f79535-47bb-0310-9956-ffa450edef68
2007-08-23 21:43:25 +00:00
David Reiss
bc3dddb91c Thrift: Better handling of strerror_r.
Summary:
Someone thought it would be a good idea to have two different signatures
for strerror_r, with subtly different semantics (strlcpy = smart).
We now work properly with either of them.

Also fixed a test to work on 32-bit, you sloppy <expletive>s.

Reviewed By: mcslee

Test Plan:
Rebuild thrift.
Force one of these errors to be thrown.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665215 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 23:20:24 +00:00
David Reiss
2dc72c3864 Thrift: Move TStringBuffer functionality into TMemoryBuffer.
Summary:
TMemoryBuffer already has the necessary plubming to work with C++ strings.
This revision implements that functionality with a few wrapper methods.
Removed TStringBuffer as it should no longer be required (and it is tricky
to safely inherit from a class that has a non-virtual destructor).
Also refactored the TMemoryBuffer constructors a bit.

Reviewed By: aditya, yunfang

Test Plan:
test/TMemoryBufferTest.cpp

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665213 13f79535-47bb-0310-9956-ffa450edef68
2007-08-21 23:59:34 +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
David Reiss
8320a92d9b Thrift: Merging external patch.
Summary:
Merging a patch from Andy Lutomirsky.
- Allow fields to be marked "required" or "optional" (only affects C++).
- Thrift structs now have operator ==.

Reviewed By: mcslee

Test Plan: test/OptionalRequiredTest.cpp

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665202 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 19:59:26 +00:00
David Reiss
cbd4bacc30 Thrift: docstring revamp step 2.
Summary:
It was a bad idea to let doxygen comments become a part of the parse tree.
We now get them a totally different way.  The lexer stashes the docsting
contents in a global, and the parser actions (not the rules) pull it out.
This should prevent doxygen comments from ever causing parse errors.

Blame Rev: 52678, 52732

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Thrifted a bunch of files and saw no parse errors (or C++ compile errors).
Thrifted DocTest.thrift with dump_docs on.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665201 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 17:12:33 +00:00
David Reiss
cdffe260f1 Thrift: docstring revamp step 1.
Summary:
Allow constants to be documented.
Now any "Definition" can be documented, so we can move the docstring stuff
up to a a higher node in the parse tree.

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Checked out DocTest.thrift and a few other thrifts.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665200 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 17:12:31 +00:00
Mark Slee
7dafc94e50 Fix Java test cases
Summary: Use the default TBinaryProtocol constructors for better example.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665197 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 03:40:15 +00:00
iproctor
7897c927b2 Thrift: OCaml and HS servers more general
Summary: The library now provides servers that are general like the other languages.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665195 13f79535-47bb-0310-9956-ffa450edef68
2007-08-08 01:43:39 +00:00
David Reiss
202111d2e9 Thrift: More constant enums.
Summary:
Make enum constants as structure defaults work.
Make enum constants as constant map keys work.
Un-break the generated skeleton servers.

Reviewed By: mcslee

Test Plan:
cd test
../compiler/cpp/thrift -cpp ConstantsDemo.thrift
g++ -I../lib/cpp/src -c gen-cpp/*.cpp
Also compared the generated output to the old generated output.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665193 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 20:38:18 +00:00
David Reiss
6f226558d6 Thrift: Fixed rookie mistake.
Summary:
This test now works on 32-bit.

Reviewed By: mcslee

Test Plan: Ran the comment at the top of the file.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665192 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 20:33:00 +00:00
David Reiss
8dae994f8f Thrift: Improved test case.
Summary:
By "improved", I mean that I added a totally awesome self-referential joke
to one of the test cases.  Seriously.  In a few years someone is going to
add UTF-8 support to the Debug Protocol and run this test case on a terminal
with really good fonts and they are going to die laughing.  Seriously, die.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled everything and ran the test.

Revert Plan:
Take a good, long look in the mirror, then svn revert.

Notes:
I am awesome.

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665191 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 20:32:59 +00:00
David Reiss
c2532a9ac4 Thrift: Allow whole program doctext.
Summary:
Allow docstrings at the top of the program.

Blame Rev: 52687

Reviewed By: mcslee

Test Plan:
../compiler/cpp/thrift -cpp DocTest.thrift
(with dump_docs on)
and looked at the output.
Generated C++ is identical to installed thrift.

Revert Plan: Do 52687 also.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665183 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 23:46:11 +00:00
David Reiss
1ac0580378 Thrift: Change docstring syntax.
Summary:
The old docstring syntax collided with the syntax for list constants.
The new syntax looks a lot like doxygent comments.

Trac Bug: #4664

Blame Rev: 32392

Reviewed By: mcslee

Test Plan:
../compiler/cpp/thrift -cpp DocTest.thrift
(with dump_docs on)
and looked at the output.
Generated C++ is identical to installed thrift.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665182 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 22:00:27 +00:00
Mark Slee
d0767c5796 Fix Thrift compiler to support reuse of enums and constants in later constants
Summary: So for example, you can make a constant map of enum values to string identifiers.

Reviewed By: dreiss

Test Plan: ConstantsDemo.thrift in the test folder


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665181 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 22:14:41 +00:00
iproctor
ff8eb9288d Thrift: Haskell library and codegen
Summary: It's thrift for haskell. The codegen is complete. The library has binary protocol, io channel transport, and a threaded server.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665174 13f79535-47bb-0310-9956-ffa450edef68
2007-07-25 19:06:13 +00:00
David Reiss
00dcccfef2 Thrift: Debug Protocol
Summary:
Added TDebugProtocol, a write-only Thrift protocol for C++
that produces human-readable representations of thrift structs.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled Thrift.
./test/TestDebugProto.* see compile instructions at the top.
Ran that, and it looked good.

Revert Plan:
grep TDebugProtocol <world>
grep ThriftDebugString <world>
Revert or comment out whatever you find so that they still compile.
Then svn revert.

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665166 13f79535-47bb-0310-9956-ffa450edef68
2007-07-21 01:18:10 +00:00
iproctor
9a41a0c51e Thrift: OCaml library and generator
Summary: Added (minimal) library and code generator for OCaml.
Reviewed by: mcslee
Test plan: Test client and server (included).
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665163 13f79535-47bb-0310-9956-ffa450edef68
2007-07-16 21:59:24 +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
477a580aa4 Ruby test code fix, and BNF file for protocol
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665148 13f79535-47bb-0310-9956-ffa450edef68
2007-06-30 01:18:12 +00:00
Mark Slee
3e5d2d72b4 Whitespace fixes on test code
Reviewed By: thrift

Test Plan: Whitespace


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665136 13f79535-47bb-0310-9956-ffa450edef68
2007-06-15 01:45:56 +00:00
Mark Slee
e02385b0b4 Add thread pool option to NonblockingServer
Summary: If you want requests processed outside of the I/O thread

Reviewed By: jake luciani, aditya

Test Plan: nb-main.cpp, in the test folder


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665132 13f79535-47bb-0310-9956-ffa450edef68
2007-06-09 01:21:16 +00:00
Marc Slemko
3a3b53bc6e Modified facebook::thrift::concurrency::Monitor.wait:
Throw TimedOutException on wait timeout so caller can distinguish between timeout and event.

Modified facebook::thrift::concurrency::PthreadThread.start:
        Throw SystemrResourceException on any pthread_* function call failure rather than asserting 0.

Added facebook::thrift::concurrency::Thread.id() and  facebook::thrift::concurrency::ThreadFactory.currentThreadId():
        Return thread-id of thread and current thread respectively.  Needed for reentrancy tests in ThreadManager

Added facebook::thrift::concurrency::ThreadManager.pendingTaskCountMaxN
Modified facebook::thrift::concurrency::ThreadManager.add():
        Now support a maximum pending task count and block if the current pending task count is max.
        If timeout is specified for add, TimedOutException is thrown if pending task count doesn't decrease
        in the timeout interval.  If add() is called by a ThreadManager worker thread and the task cannot
        be added, a TooManyPendingTasksException is thrown rather than blocking, since deadlocks can ensue
        if worker threads block waiting for works threads to complete tasks.

Reviewed By: mcslee, aditya

Revert Plan: revertible

Test Plan: concurrency/test/ThreadManagerTests.h
           run concurrency-test thread-manager


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665120 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 23:59:54 +00:00
Mark Slee
f4f18ec514 Need using namespace boost in thrift threads test
Reviewed By: jake luciani


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665119 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 21:22:34 +00:00
Mark Slee
3e3d7ad834 Adding perl testclient code
Summary: Submitted by Jake Luciani

Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665115 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 02:35:58 +00:00
Mark Slee
fa6ac9f2aa Java test client/server fixes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665104 13f79535-47bb-0310-9956-ffa450edef68
2007-05-04 18:49:56 +00:00
Mark Slee
cbc51600ee Fix messed up noninitialized things
Reviewed By: danli


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665096 13f79535-47bb-0310-9956-ffa450edef68
2007-04-11 08:57:07 +00:00
Mark Slee
0c2dff3f5a Fix broken C++ Thrift test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665057 13f79535-47bb-0310-9956-ffa450edef68
2007-03-09 19:26:57 +00:00
Mark Slee
02d1edc6f0 Some thrift test code improvements
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665050 13f79535-47bb-0310-9956-ffa450edef68
2007-03-07 05:17:25 +00:00
Mark Slee
4841b2d51f Threads test makefile cleanup
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665043 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 05:41:04 +00:00
Mark Slee
c416a2730d Threads testing package update
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665042 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 05:40:37 +00:00
Mark Slee
b32f3c6ad7 Threading libraries test for Thrift C++
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665041 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 04:48:48 +00:00
Mark Slee
57cc25e2a3 Some Thrift documentation cleanups
Summary: Getting ready to hand this over to powerset, just want to have the right licenses in place and such first.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665029 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 21:43:54 +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
157d9f794e Ruby test server code
Reviewed By: tbr-doug


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664991 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 06:03:53 +00:00
Mark Slee
79e41b817e Update test code with TPipedTransport
Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664989 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 04:07:07 +00:00
ccheever
f53b5cfed2 adding documentation syntax to thrift
see DocTest.thrift for examples.

todo: integrate parsed documentation into code generation

review: marc k, mcslee
test plan: DocTest.thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664970 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 20:33:11 +00:00
Mark Slee
739dbe55ae Bring C++ thrift stress test up to date with new constructs
Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664966 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 22:55:30 +00:00
Mark Slee
a7747c2525 Fix HashMap => AbstractMap conversions in Java test thrift code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664955 13f79535-47bb-0310-9956-ffa450edef68
2007-01-29 17:35:54 +00:00
Mark Slee
6d7d595858 Ruby support for Thrift
Summary: Just client support so far.

Reviewed By: tbr-doug


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664953 13f79535-47bb-0310-9956-ffa450edef68
2007-01-27 01:44:22 +00:00
Mark Slee
0788a70568 Separate thrift into libthrift and libthriftnb
Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link.

Reviewed By: makefile


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 08:14:50 +00:00
Mark Slee
6f5e2cb3ea Fix relative paths in test dirs
Reviewed By: makefile


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664950 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 08:01:28 +00:00
Mark Slee
9e288d4f7a Add some smaller test cases and fix new single protocol/transport C++ test
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664944 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 23:42:12 +00:00
Mark Slee
1921d2046b Fix C++ Thrift test code to work with new gen'd code interface
Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664938 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 19:43:06 +00:00
Mark Slee
a4713ea566 Example syntax for constants in Thrift
Reviewed By: martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664904 13f79535-47bb-0310-9956-ffa450edef68
2007-01-05 01:09:04 +00:00
Aditya Agarwal
25b293616b -- Rename TBufferedFileWriter.h/cpp to TFileTransport.h/cpp
Summary:
-- Thrift logfile is now officially in action!

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664891 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:58:15 +00:00
Aditya Agarwal
e9ef8d7ce9 -- TFileTransport (Thrift Logfile)
Summary:
-- TBufferedFileWriter.h/cpp will be renamed to TFileTransport.h/cpp in the next commit.
-- TFileTransport is essentially reading and writing thrift calls to/from a file instead of a
   socket.
-- The code/design is somewhat similar to pillar_logfile but there are some significant changes.

todo:
-- still need to do error correction/detection

Reviewed By: Mark Slee

Test Plan:
-- Wrote test in thrift/test/cpp/src/main.cpp that appends to a file and replays requests

Notes:
It's finally time to port search over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664889 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 23:52:57 +00:00
Mark Slee
b9ff32ae30 Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
2006-11-16 01:00:24 +00:00
Mark Slee
1dd819cd2b Bring Thrift test code up to date
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664852 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 04:56:18 +00:00
Mark Slee
d7173476bb Stresstest onto new Thrift C++ model
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664841 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:52:10 +00:00