Commit Graph

1690 Commits

Author SHA1 Message Date
T Jake Luciani
fdcb710cc4 THRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@794939 13f79535-47bb-0310-9956-ffa450edef68
2009-07-17 01:37:01 +00:00
T Jake Luciani
f1fd2954b5 THRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@794938 13f79535-47bb-0310-9956-ffa450edef68
2009-07-17 01:34:50 +00:00
Bryan Duxbury
8f5827358b THRIFT-543. java: Generate normal style java files should respect the "optional" keyword when serializing
As the summary suggests, this patch causes "optional" fields to be skipped if they are unset, even if they are primitives. As this patch is for the non-beans style generator, the user is expected to maintain the set/unset status themselves.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@793778 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14 01:42:09 +00:00
David Reiss
70c89d4ae0 THRIFT-350. php: Fix the extension build when C++ is not already used
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@793630 13f79535-47bb-0310-9956-ffa450edef68
2009-07-13 17:21:03 +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
281d9dacb6 THRIFT-204. csharp: C# Partial Classes
C# structs are now generated as partial classes so they can be extended without wrapping.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@790730 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 20:15:05 +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
3d6babc05c THRIFT-524. erlang: Decapitalize file names in include directives
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@786334 13f79535-47bb-0310-9956-ffa450edef68
2009-06-18 23:30:03 +00:00
Bryan Duxbury
ef73b0e67a THRIFT-378. java: Java servers do not turn internal errors into thrift exceptions
This patch causes Java servers to log internal server errors and return an INTERNAL_ERROR exception instead of just closing the connection.

Author: Jonathan Ellis



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@785713 13f79535-47bb-0310-9956-ffa450edef68
2009-06-17 16:43:25 +00:00
David Reiss
56c2c21f4e THRIFT-462. java: Installed jar shouldn't be executable
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781639 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:05:25 +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
52687eb3b9 THRIFT-469. cpp: Fix a bug in TimerManager::add
The old code didn't notify waiters when the inserted task's timeout
was less than the current timeout because it didn't check the task map
to find the lowest timeout until after the new task was inserted.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781630 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 00:32:57 +00:00
David Reiss
9fcacc8ff6 THRIFT-466. cpp: Make the concurrency library test more thorough
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781629 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 00:32:54 +00:00
David Reiss
8584b6ffe7 THRIFT-465. cpp: Fix some STL misuse in the concurrency library test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781628 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 00:32:50 +00:00
David Reiss
5fa20da4a5 THRIFT-464. cpp: Fix some STL misuse in the concurrency library
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781627 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 00:32:47 +00:00
David Reiss
840e75205b THRIFT-497. cpp: Fix TSocket::read and peek on Max OS
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781626 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 00:10:50 +00:00
Bryan Duxbury
2fb877a794 THRIFT-511. rb: Better performing hash method for generated structs
This patch uses a hash function that takes into account the hashes of struct elements, instead of just returning 0. This make hashes of Thrift structs O(1) instead of O(n).



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780094 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:18:58 +00:00
Bryan Duxbury
9e34741004 THRIFT-489. java: Java enum validation only validates explicitly assigned values
This patch puts all of an enum's values into the valid values set, fixing validation. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780091 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:15:02 +00:00
Bryan Duxbury
1deddc799a THRIFT-513. rb: spec test files broken, rake searching for misnamed files
This patch causes the right files to be required and cleans up a few odd or redundant requires that were in the specs.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780090 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:11:27 +00:00
Bryan Duxbury
e043a9ec4b THRIFT-516. rb: If TFramedTransport reads a negative frame size, throw a TTransportException descendant instead of the default NegativeArraySizeException
Throw a TTransportException when the frame size read from the wire is < 0.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777690 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 20:17:04 +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
dc0a941426 Consolidate lib/hs/.gitignore into the top-level .gitignore
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777680 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:52:02 +00:00
David Reiss
fff84d1466 THRIFT-450. java: Propagate CLASSPATH from ./configure to make and ant
- Put "AC_SUBST(CLASSPATH)" configure.ac so the CLASSPATH used to run
  ./configure is passed in to make.
- Put "export CLASSPATH" in lib/java/Makefile.am so that the CLASSPATH
  passed to make is passed to ant.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777678 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:50:33 +00:00
David Reiss
089164a2e9 THRIFT-450. java: Respect the global classpath during testing
I'm not sure why, but "ant test" under lib/java doesn't pass the
global classpath to the test programs.  (This is weird because
compile-test does.)  This change manually extracts the CLASSPATH
environment variable and adds it to the test classpath.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777677 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:50:32 +00:00
David Reiss
fdfcebda52 THRIFT-450. java: Check for Apache Commons Lang also
I forgot that we use the hashcode option when building the tests.
We therefore need to check for HashCodeBuilder before disabling Ivy.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777676 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 19:50:29 +00:00
David Reiss
08d2f11cbe cpp: Fix compilation on OpenBSD by including sys/types.h
socket(2) says that this might be required on some Unixes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776931 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:36 +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
David Reiss
5105b2e79d cpp: Add some missing includes to fix OpenBSD compilation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776929 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:27 +00:00
David Reiss
2ff956c605 cpp: Fix an OpenBSD compilation bug by moving a typedef
The typedef was aliasing a private type, which is apparently illegal.
Moving it into the class definition fixed it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776928 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:23 +00:00
David Reiss
e4ca1795ea cpp: Deal with systems without sched_get_priority_{min,max} (OpenBSD)
Also make a few tweaks to configure.ac:
- Check for clock_gettime in librt since it seems to be more
  widely available.
- Make it clear which AC_CHECK_FUNCS are optional.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776927 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:19 +00:00
David Reiss
85a8f7b4c2 cpp: Deal with systems without AI_ADDRCONFIG (OpenBSD)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776926 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:16 +00:00
David Reiss
d28ce1035b cpp: Fix an OpenBSD compilation error that appears to be a real bug
The (Linux) man page for ctime_r states pretty clearly that
the buffer it uses must have space for at least 26 characters.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776925 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 02:28:14 +00:00
Bryan Duxbury
32194ab442 THRIFT-501. rb: File.dirname(...) requires cause warnings in some scenarios
This patch removes the File.dirname usage. Instead, you should put the directory that contains your _types.rb into the load path.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776800 13f79535-47bb-0310-9956-ffa450edef68
2009-05-20 18:22:19 +00:00
David Reiss
4ca0c8eaee THRIFT-450. Don't use Ivy if log4j is already available
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@774132 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 23:16:55 +00:00
David Reiss
eaa8d7e565 Extend ax_javac_and_java.m4 to test for specific classes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@774130 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 23:16:53 +00:00
Bryan Duxbury
af3b6309b5 THRIFT-349. php: Accelerated binary protocol serialization segementation fault
Check to make sure that the object being serialized has a valid struct spec, error otherwise.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773976 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 16:53:23 +00:00
Bryan Duxbury
c2a9245d25 THRIFT-499. php: Thrift_protocol PHP extension does not handle signedness correctly
Cast all the number types to signed values before making PHP longs out of them.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773974 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 16:44:52 +00:00
David Reiss
a043be31fc THRIFT-495. python: Raise a TTransportException if TSocket is not open
Previously, TSocket.write would raise an AttributeError if the transport
had not been opened.  A TTransportException with the code set to
NOT_OPEN is more appropriate.  The cost of the check should be
negligible, since TSocket.write is already fairly expensive (it does a
system call).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773762 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 02:17:43 +00:00
Bryan Duxbury
9aa716cf0f THRIFT-493. java: Stopping TNonblockingServer when it hasn't been starting results in an exception
Check if the server is null before trying to stop.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773632 13f79535-47bb-0310-9956-ffa450edef68
2009-05-11 18:09:24 +00:00
David Reiss
16514d0a72 THRIFT-494. python: Update meta-information in setup.py
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773306 13f79535-47bb-0310-9956-ffa450edef68
2009-05-10 05:14:44 +00:00
David Reiss
be378f232b THRIFT-490. Clarify the comment for the Guard macro
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@772478 13f79535-47bb-0310-9956-ffa450edef68
2009-05-07 00:41:18 +00:00
David Reiss
8db8980fa1 THRIFT-483. Use --copy for libtoolize
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@772440 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06 22:00:33 +00:00
Bryan Duxbury
787538943b THRIFT-482. java: build.xml does not specify a target version for compiled java classes
This patch updates the build file to target java 1.5.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@772373 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06 17:22:11 +00:00
Bryan Duxbury
b7b8af9e61 THRIFT-486. rb: ruby tutorial needs updated require statements
Fixed. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771969 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 18:59:49 +00:00
Bryan Duxbury
1cc7a1369e THRIFT-485. rb: Generated validate methods that reference external thrift files' types are not referenced correctly
This patch fully qualifies type names in two spots.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771964 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 18:50:26 +00:00
Kevin Clark
50e030ad77 Preparing for 0.1.0 RC1
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771515 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 00:53:01 +00:00