Commit Graph

2033 Commits

Author SHA1 Message Date
David Reiss
c549f7b086 erlang: Eliminate "behaviour undefined" warnings
Build behaviour modules first and include the ebin directory in
the Erlang code path during the rest of the build.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991002 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:01 +00:00
David Reiss
df2047e4b1 erlang: Parse multiple options properly in disk_log_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991001 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:00 +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
5ed313d998 erlang: Fix several compilation warnings
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990999 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:57 +00:00
David Reiss
cf7f3973bb erlang: Rename _impl headers to _behaviour
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990998 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:55 +00:00
David Reiss
a9c5283329 erlang: Fix a few spelling errors
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990997 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:53 +00:00
David Reiss
3a292b4441 erlang: Don't use a separate process for http_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990996 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:51 +00:00
David Reiss
48539bc960 erlang: Don't use a separate process memory_buffer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990995 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:50 +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
bc1b3fdb77 erlang: Don't use a separate process for framed_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990992 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:47 +00:00
David Reiss
0127af242f erlang: Don't use a separate process for buffered_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990991 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:46 +00:00
David Reiss
9b170ebf10 erlang: Add a state-propagation-testing transport
Add a transport implementation that forwards all read and write (and
flush and close) requests directly to a wrapped transport.  In addition,
it keeps a small amount of state: a version number that is incremented
on each operation and the PID of a process that stores another copy of
the version number.  Every operation compares the version numbers and
increments both.  If some part of the Thrift stack doesn't propagate
state updates properly, the two versions will not match.

Also add some (compiled-off by default) code to thrift_transport to
auto-wrap every transport in a state checker.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990990 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:44 +00:00
David Reiss
639e1cfe2b erlang: Refactor thrift_transport and all transport implementations
Note that the buffering transports still use a separate process to
maintain their state.  This change just changes them to use a
"return-the-new-version"-style API.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990989 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:43 +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
035979ff80 erlang: Refactor the processor
Now the server works.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990986 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:38 +00:00
David Reiss
4b0534a662 erlang: Get rid of after_reply from thrift_processor
We are always flushing the response after we write it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990985 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:37 +00:00
David Reiss
b9561c83f5 erlang: Don't catch exits in thrift_processor
They are not handled properly, so the exit backtrace gets lost.
Just ignore them and let them kill the process naturally.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990984 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:36 +00:00
David Reiss
63f6126e97 erlang: Refactor the binary protocol
At this point, everything passes dialyzer except for the processor,
and the client works.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990983 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:34 +00:00
David Reiss
6c1875340a erlang: Refactor the read path of the protocol
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990982 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:33 +00:00
David Reiss
82862950f6 erlang: Refactor the read path of the client
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990981 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:32 +00:00
David Reiss
c465799c1b erlang: Refactor the write paths of the client and protocol
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990980 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:31 +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
eb207273ea erlang: Make the gen-code return a special value for bogus functions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990978 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:27 +00:00
David Reiss
480d5ab62b erlang: Separate out thrift_protocol:read_specific
By giving a different name to the function that reads from the
protocol implementation, we can get a slightly more enforcible spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990977 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:26 +00:00
David Reiss
1cb979b3d0 erlang: Add a more detailed spec for thrift_protocol:read
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990976 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:25 +00:00
David Reiss
48b8124e32 erlang: Separate out thrift_binary_protocol:read_data
By giving a different name to the function that reads bytes from the
transport, we can get a slightly more detailed spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990975 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:23 +00:00
David Reiss
ee93398ccc erlang: Add some more detailed specs for protocol implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990974 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:22 +00:00
David Reiss
9b7fbe3743 erlang: Add some initial specs for thrift_transport and its implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990973 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:20 +00:00
David Reiss
5e6637b0ff erlang: Add some initial specs to thrift_client and thrift_protocol
Also add a special header for use in thrift_protocol implementations
that gives specs for the callbacks.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990972 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:18 +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
7772d931a1 erlang: Make framed_transport not write out its buffer when closed
This complicates the code, and users can be expected to call flush
when they want to write data to the underlying transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990969 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:15 +00:00
David Reiss
5db982cdf2 erlang: Make buffered_transport not write out its buffer when closed
This complicates the code, and users can be expected to call flush
when they want to write data to the underlying transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990968 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:13 +00:00
David Reiss
c0e4b5b246 erlang: Don't print a warning for application-defined exceptions
Application-defined exceptions are a normal occurrence as far as the
Thrift infrastructure is concerned, so we should not print a warning.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990967 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:12 +00:00
David Reiss
3e81fff832 erlang: Be a little more formal
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990966 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:11 +00:00
David Reiss
6d0be7235c erlang: Spell behaviour properly
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990965 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:09 +00:00
David Reiss
d172a887ff erlang: Export cast/3 from thrift_client (dialyzer warning)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990964 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:08 +00:00
David Reiss
ba5a984271 erlang: Fix a dialyzer warning in thrift_disk_log_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990963 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:07 +00:00
David Reiss
14da1daf67 erlang: Fix a compiler warning in the disk_log transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990962 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:06 +00:00
David Reiss
58d312d516 erlang: Remove some unused modules
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990961 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:05 +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
fb2c1ae594 erlang: Enable compiler warnings for the library
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990959 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:02 +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
David Reiss
73af3b7c4c THRIFT-869. python: Disguise ECONNRESET as EOF on BSD
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990955 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 21:57:07 +00:00
Bryan Duxbury
bcfb72a60b THRIFT-879. java: Remove @Override from TUnion.clear
Removes the unnecessary annotation.

Patch: Dave Engberg

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990931 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 20:27:32 +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
Todd Lipcon
90ec5bfcd0 THRIFT-873. java: Java tests fail due to Too many open files
- Drops TestTAsyncClientManager to use only 200 clients instead of 500
- Changes each unit test to run in its own JVM instead of sharing them.
- Allows the port used for binding the test servers to be configured from the command line


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990032 13f79535-47bb-0310-9956-ffa450edef68
2010-08-27 06:16:37 +00:00