Commit Graph

1461 Commits

Author SHA1 Message Date
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
067c9aff28 THRIFT-199. perl: Let "make distclean" work when we are not using Perl
When configure is run with --without-perl, lib/perl/Makefile.am cannot
generate Makefile-perl.mk.  However, "make distclean" still runs, so
the clean-local target fails.  This version just silently does nothing
when Perl is not being used.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743190 13f79535-47bb-0310-9956-ffa450edef68
2009-02-11 01:11:54 +00:00
David Reiss
035aed90c0 cpp: Fix implementations of "list<bool>"
TProtocol::readBool expects a "bool&" as its argument, but "list<bool>"
is implemented as "vector<bool>", which is a specialization of vector
that uses a custom structure as its reference type.  Therefore, we need
to overload TProtocol::readBool for std::vector<bool>::reference.
This function is provided as a non-virtual for efficiency since it is
highly unlikely that any subclass will want to override it.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743112 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 21:38:48 +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
30e1de9fd5 THRIFT-316. java: @Override isn't generated for hashCode() without the hash code builder
Fixed with a trivial reorganization of the hashCode method generation.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743046 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 18:36:56 +00:00
Bryan Duxbury
c707855048 THRIFT-318. java: Performance of HashSet for enumeration VALID_VALUES seems poor
Instead of a HashSet, enums will now use the special IntRangeSet implementation. 

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743037 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 18:10:57 +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
6ad6251951 java: Fix a minor formatting problem in the gen-code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@742192 13f79535-47bb-0310-9956-ffa450edef68
2009-02-08 22:46:38 +00:00
Bryan Duxbury
bb7826da70 THRIFT-10. java: Descriptors used during serialization should be immutable objects
-Descriptor classes all have final members, making them immutable.
-Generated structs now have static constant versions of their TStruct and TField descriptors, and will be used during writing.
-Protocols that can benefit use static constants for various common returned descriptors.
-A duplicate FieldMetaData.java that should have been removed previously was also removed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741984 13f79535-47bb-0310-9956-ffa450edef68
2009-02-08 00:12:38 +00:00
Bryan Duxbury
d83e250838 THRIFT-321. java: THRIFT-303 broke EqualityTest
Regenerated test code.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741952 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 20:06:09 +00:00
Bryan Duxbury
f28f82631a THRIFT-159. csharp: Compiler doesn't add package scope to exceptions in catch blocks and assigns to unused local var when reading
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741917 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 17:17:43 +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
576dfdcda7 THRIFT-292. Install fb303.thrift in a more sensible location
thrift_home is the Thrift installation we are using.
We shouldn't be trying to install back into it.
Use $(prefix) instead.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741831 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:37:00 +00:00
David Reiss
4bec874d82 THRIFT-292. Auto-generate the Python gen-code in build.xml
r739384 deleted the generated Python code from the source tree.
With this change, it will be automatically generated when make is run.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741830 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:57 +00:00
David Reiss
cd5284c735 THRIFT-292. Auto-generate the Java gen-code in build.xml
r739384 deleted the generated Java code from the source tree.
With this change, it will be automatically generated when ant is run.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741829 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:54 +00:00
David Reiss
f6dffcdc65 THRIFT-292. Delete aclocal.m4, a generated file
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741828 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:52 +00:00
David Reiss
858519aac5 THRIFT-292. s/facebook::thrift/apache::thrift/ in contrib/fb303/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741827 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:50 +00:00
David Reiss
f4335dfdbe THRIFT-292. Make the #includes in fb303 match the rest of Thrift
Specifically, by removing the "thrift/" prefix.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741826 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:46 +00:00
David Reiss
0b36a2d9c0 THRIFT-292. Restore fb303/FacebookBase.py
This file was deleted in r739384, but is is not generated code.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741825 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 02:36:43 +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
Bryan Duxbury
d20a1d3619 THRIFT-303. java: Changes to __isset interface
This patch makes __isset always private and adds a method per field to set the __isset state when not using the bean-style generator.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@741805 13f79535-47bb-0310-9956-ffa450edef68
2009-02-07 01:08:58 +00:00
Bryan Duxbury
d73774f53e java: Added SerializationBenchmark.java, helper class for performing tests on protocols.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740952 13f79535-47bb-0310-9956-ffa450edef68
2009-02-05 00:24:42 +00:00
Kevin Clark
ead3382915 THRIFT-254. rb: Add optional strict version support to binary protocols
Author: Michael Stockton

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740930 13f79535-47bb-0310-9956-ffa450edef68
2009-02-04 22:43:59 +00:00
David Reiss
80a44e7e82 THRIFT-258. csharp: Include all lib source files in Makefile.am
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740485 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 22:16:46 +00:00
David Reiss
670cb0f18d THRIFT-264. csharp: Include TBufferedTransport in the build on Linux
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740456 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 21:20:55 +00:00
David Reiss
2cdfd3705e THRIFT-264. csharp: Use /langversion:linq to fix the Linux build
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740454 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 21:20:27 +00:00
Bryan Duxbury
3d0abc36a9 THRIFT-132. ruby: Ruby generator should use ::Thrift::Foo namespace form
All of the Thrift library includes now prefix with ::.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740377 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 19:18:57 +00:00
Bryan Duxbury
1e80d4465a THRIFT-302. ruby: Native extension fails to build
A piece of code needed for compilation on Linux was missing; this patch replaces it. Also, there were some compiler warnings and declarations that were missing that are now fixed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740366 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 18:16:54 +00:00
Bryan Duxbury
f5383b663e THRIFT-297. java: getFieldValue and setFieldValue should be abstract TBase methods
This patch makes getFieldValue, setFieldValue, and isSet TBase interface methods, and adds all the previously beans-only getters and setters to all Java generated classes. 

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740169 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 00:49:25 +00:00
Bryan Duxbury
dc9092ab1a THRIFT-298. ruby: Exception propagation seems broken for Ruby clients
This patch fixes the problem. How is anyone's guess, but we'll simplify all this code in the future.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740161 13f79535-47bb-0310-9956-ffa450edef68
2009-02-03 00:31:55 +00:00
Bryan Duxbury
c016628a8a THRIFT-248. ruby: Factor BinaryProtocolAccelerated into separate protocol and struct components
This patch replaces the "binaryprotocolaccelerated" c extension with the "thrift_native" c extension. This new extension creates native implementations for the struct.rb #write and #read methods, Thrift::BinaryProtocol, and Thrift::MemoryBuffer, but keeps ruby-level interfaces, allowing all protocols to benefit from the struct code and the memory buffer. There is however an additional cost associated with going through this ruby layer, but the increased interoperability seems to be well worth it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739895 13f79535-47bb-0310-9956-ffa450edef68
2009-02-02 00:48:17 +00:00
Bryan Duxbury
056bcb6947 THRIFT-178. java, csharp, cpp: Final Keyword
The lexer has been changed to make "final" a non-reserved word, and the java, csharp, and cpp compilers now look for the final annotation and amend their class declarations appropriately.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739788 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 16:56:29 +00:00
Bryan Duxbury
7003f876ed THRIFT-299. doc: binary type isn't documented nor demonstrated in the tutorial
The existence of the "binary" type is now documented in the relevant places. 

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739702 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 06:21:13 +00:00
Bryan Duxbury
df20bb9c7c add a lot of things to svn:ignore. there are many autogenerated build products that are best ignored, and this gets all of them, I think.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739701 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 06:08:35 +00:00
David Reiss
c2c8ad8f0b THRIFT-259. html: Generate "extends" link for extended services
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739700 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 05:36:10 +00:00
T Jake Luciani
1952e5494d THRIFT-199: integrate perl into automake
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739697 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 04:47:30 +00:00
David Reiss
4704d4383c THRIFT-285. python: Don't generate _result structs for async functions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739668 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 00:42:10 +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
3fa89e33f3 THRIFT-209. csharp: Make TTransportFactory.GetTransport virtual
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739641 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 22:12:34 +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
1fe17774eb python: Add TFileObjectTransport
TFileObjectTransport is a Thrift transport that wraps a
Python-style file-like object.  This is necessary to add
methods like isOpen and readAll.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739637 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:59:27 +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
647d30d218 python: Make TFramedTransport use a cStringIO for reading
Tested by running a client against a framed-transport server.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739631 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:20 +00:00
David Reiss
fb695b77d3 python: Eliminate the option of TFramedTransport to not frame
We've done this in a few other languages.  All the tests still pass.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739630 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:16 +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
Greg Stein
ca823297fa THRIFT-295: remove empty directories.
These directories have no files in them. Toss 'em from version control.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739501 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 03:54:03 +00:00
Greg Stein
c1eb2a71c3 THRIFT-292
Delete a number of generated artifacts. The build system should produce
these, rather than having them stored in version control.

* contrib/fb303/py/fb303/...: remove generated Python bindings

* contrib/fb303/java/FacebookService.java:
* contrib/fb303/java/fb_status.java:
* contrib/fb303/java/Constants.java:
  - remove generated Java bindings


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739384 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 19:19:45 +00:00
Greg Stein
f0d35d220a THRIFT-291
* README: tweak for Thrift's new home at Apache.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739380 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 19:10:27 +00:00