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
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
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
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
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
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
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
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
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
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
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
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
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
Summary:
-- Modified StressTest.thrift to work (it was out of date..) and added tests for TBufferedFileWriter
-- Modified Makefiles to use the correct lib directory
Reviewed By: Slee
Test Plan: This is the test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664827 13f79535-47bb-0310-9956-ffa450edef68
Summary: Servers need to create bufferedtransports etc. around the transports they get in a user-definable way. So use a factory pattern to allow the user to supply an object to the server that defines this behavior.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664792 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- this should fix the library mismatch issue..
From the gcc linking guide:
LIBRARY_PATH
The value of LIBRARY_PATH is a colon-separated list of directories,
much like PATH. When configured as a native compiler, GCC tries
the directories thus specified when searching for special linker
files, if it can't find them using GCC_EXEC_PREFIX. Linking using
GCC also uses these directories when searching for ordinary
libraries for the -l option (but directories specified with -L come
first).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664790 13f79535-47bb-0310-9956-ffa450edef68
Summary: Just for completeness cause I'm crazy. Let's never use these!
Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files
#!/usr/local/bin/thrift --cpp
/**
* This is a thrift def file youc an invoke directly and gen code!
*/
blah
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- dont use /usr/local as the thrift directory now that multiple ppl are developing on dev007
Reviewed By: McSlee
Test Plan: Tested by making and cleaning
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664786 13f79535-47bb-0310-9956-ffa450edef68
Summary: Yep, it's up and running. We now have full client/server support in all of C++ Java PHP and Python. Well, not quite... there's no PHP server, but honestly who wants one? Actually, if we do want one the framework will support writing is as a PHP file that can be served in apache like a web service (i.e. restserver.php would be thriftserver.php). But now that's rambling and nothing to do with this commit.
Notes: cheever, let's chat about porting your multithreaded Pillar Python server over to Thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664783 13f79535-47bb-0310-9956-ffa450edef68
Summary: Generate classes instead of structs, and put read/write methods inside the class definition. Separate services into uniquely generated files. Separate types header file from types implementation file (read/write methods)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664777 13f79535-47bb-0310-9956-ffa450edef68
Modified TProtocol.h et al to take collection size as unsigned int. This removes need to cast STL's default size_t to signed int and is more correct, since collection sizes cannot be < 0 by definition
Moved compiler/Makefile to compiler/cpp.mk so it doesn't get trashed by automake
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664766 13f79535-47bb-0310-9956-ffa450edef68
Added namespace declaration to thrift grammar
Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664756 13f79535-47bb-0310-9956-ffa450edef68
Added namespace declaration to thrift grammar
Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664755 13f79535-47bb-0310-9956-ffa450edef68
Added exception defintions and specifiers to thrift grammar
Modified C++ code generator to to catch and serialize exceptions on the server side and unmarshall and throw them on the client side.
Modified grammar to require "," after each service function declaration to keep it consistent with struct declaration syntax
This checkin officially breaks the old parser
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664754 13f79535-47bb-0310-9956-ffa450edef68
Auto generate result structs that combine return type and any thrown exceptions
Add __isset struct to all user defined and auto defined struct to mark fields that are explicilty read
Modified client and server generation code to marshal result structs
Added base facebook::thrift::Exception class
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664750 13f79535-47bb-0310-9956-ffa450edef68
Summary: End to end communication working in Thrift with PHP
Problem: It's a bit slower than pillar still. Need to find out why.
Reviewed By: aditya
Test Plan: Unit tests are in the test directory. Get lucas on the PHP case...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664720 13f79535-47bb-0310-9956-ffa450edef68
Summary: Did I promise you this or what?! Interoperable test servers and clients in both C++ and Java that you can use to check that they all work, all perform well, and that they all actually talk to each other!
Problem: How we gon' test this Thrift bizniss?
Solution: Write some test scenarios in each language.
Reviewed By: aditya
Test Plan: This IS the test plan.
Notes: These tools are actually pretty easy to use, so long as you remember to type 'ant' in the java directory instead of 'make'.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664716 13f79535-47bb-0310-9956-ffa450edef68
Summary: End-to-end communications and serialization in C++ is working
Reviewed By: aditya
Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.
Revert Plan: Revertible
Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68