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
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
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
- 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
- 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
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
- 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
".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
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
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
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
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
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
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
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