Commit Graph

526 Commits

Author SHA1 Message Date
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
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
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
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
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
Andrew McGeachie
853bdfea38 THRIFT-60. Make generated constants object extend NSObject.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771514 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 00:44:48 +00:00
David Reiss
4f3192093d THRIFT-471. python: Generated exceptions should implement __str__
This makes Python stack dumps properly show the exception content.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@770002 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 23:35:01 +00:00
David Reiss
1cc8995c14 THRIFT-463. python: Fix thrift_spec ordering bug from r760201
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@769123 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 19:36:50 +00:00
T Jake Luciani
fae0e78158 THRIFT-460: fixes constant structs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@766933 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 00:50:11 +00:00
Bryan Duxbury
4650144f52 THRIFT-451. rb: ruby structs use lowercase enum while modules are capitalized
This patch updates the full_type_name call so it capitalizes a type before it's appended to the module prefix. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@764549 13f79535-47bb-0310-9956-ffa450edef68
2009-04-13 18:12:07 +00:00
Bryan Duxbury
256f704d9d THRIFT-445. rb: client and processor do not inherit from the proper namespace scope
This patch adds namespace support to a client and processor extended from an included thrift def with its own namespace. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@764540 13f79535-47bb-0310-9956-ffa450edef68
2009-04-13 17:48:23 +00:00
Bryan Duxbury
ff219acb6c THRIFT-236. Structs should be serialized in a consistent order
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
2009-04-10 21:51:00 +00:00
David Reiss
ebb6cc4cf1 THRIFT-445. Revert r760201 "THRIFT-236. Sort fields in id order during parsing"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763786 13f79535-47bb-0310-9956-ffa450edef68
2009-04-09 20:02:56 +00:00
Bryan Duxbury
def30a6072 THRIFT-387. Add appropriate Apache header to all code files
This hits all the documentation and some misc code files that have avoided the license up to this point.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763048 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 00:19:37 +00:00
Bryan Duxbury
0781f2b549 THRIFT-407. hs: Refactor and improve Haskell-related code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763031 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 23:29:42 +00:00
Kevin Clark
ffd4bafc7f THRIFT-431. rb: Capitalize namespace values
Author: Michael Stockton

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763022 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 22:47:34 +00:00
David Reiss
2bcf3995ef THRIFT-427. java: Fix print_const_value
Simplify it a bit in the process, because the beans-style setters
are produced even in non-beans mode, and they handle isset internally.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762956 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 20:51:37 +00:00
Kevin Clark
19f8d1febe Thrift-421. rb: Underscore output file names and require file statments
Breaks compatiblity

Author: Michael Stockton

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762907 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 19:09:28 +00:00
Bryan Duxbury
9b1f5a6f1a THRIFT-422. rb: scope all references to the Thrift module
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762620 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 04:40:50 +00:00
Bryan Duxbury
d1d1542e1e THRIFT-276. rb: Ruby libraries should have one class per file
This monster of a patch moves all the classes into their own files and specs as appropriate. Additionally, it concentrates all the requires into thrift.rb, removing the need to require any other file. (Changes were made to the compiler to reflect this reduced requirement.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761849 13f79535-47bb-0310-9956-ffa450edef68
2009-04-04 00:58:03 +00:00
Bryan Duxbury
a145b4d58a THRIFT-423. -strict should turn omitted field ids into compile error
Issue name says it all.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761736 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 17:29:25 +00:00
David Reiss
7247b8cfd6 cpp: Fix compiler and library compilation with newer glibc
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761464 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 23:05:40 +00:00
David Reiss
bb4613629b THRIFT-420. Warn on implicit (negative) structure field ids
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761391 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:23:59 +00:00
David Reiss
deda141392 THRIFT-388. Create a "ONEWAY" message type that is an alias for "CALL"
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).

There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:22:31 +00:00
David Reiss
566a987dac THRIFT-236. Sort fields in id order during parsing
This effectively eliminates the notion of "IDL-order".
All structs have their fields sorted in increasing order of field id.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760201 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 22:24:30 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
64f87529db THRIFT-412. python: Fix some syntacticaly-incorrect code generation
r758558 introduced a but that caused some of the generated docstrings
to be indented incorrectly, resulting in syntactically invalid code.
This commit fixes the indentation.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760118 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 19:31:36 +00:00
David Reiss
82e6fc0266 THRIFT-153. Proper handling of strings with escapes (in IDL)
- Recognize and parse escape characters in .thrift files.
- Escape strings used as constants in generated source files.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758922 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:32:36 +00:00
David Reiss
4a05434d0b Make vim recognize that "thriftl.ll" is Lex source
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758921 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:32:27 +00:00
David Reiss
885c82d75a THRIFT-282. Generate doccstrings for Python classes
Docstrings are generated for
  - enums (but not enum members)
  - structures and structure fields
  - service interfaces
  - functions and function arguments


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758558 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 08:40:55 +00:00
David Reiss
39aa00d2e0 THRIFT-282. Move generate_docstring_comment to t_generator
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758556 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 08:40:18 +00:00
David Reiss
cecbed81c8 THRIFT-136. s/async/oneway/ in the Thrift IDL
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
2009-03-24 20:02:22 +00:00
David Reiss
fe931d1526 THRIFT-136. s/async/oneway/ in Erlang
This is kind of a bummer because it requires a simultaneous
code regeneration and library upgrade, and possibly also a
server restart.  I'm not sure if it is worth it, since the
only benefit is a little code clarity.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757993 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:02:08 +00:00
David Reiss
6ce401dd55 THRIFT-136. s/async/oneway/ in misc places
This is mostly an internal-only change.
It affects docstrings, messages, variables, test cases, etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757992 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:58 +00:00
David Reiss
c51986f438 THRIFT-136. s/async/oneway/ in comments
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757990 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:25 +00:00
David Reiss
473292500d THRIFT-136. s/async/oneway/ in compiler variables
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757989 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:02 +00:00
David Reiss
6985a4205b THRIFT-136. s/async/oneway/ in lexer and parser variables
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757988 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:00:47 +00:00
Kevin Clark
4798a7ad12 THRIFT-399. hs: Fix set and number issues in generated constant code
Author: Spiridon Eliopoulos


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757864 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 15:56:19 +00:00
Kevin Clark
38c8b5b92a THRIFT-398. hs: Remove unnecessary parens from generated type annotations
Author: Spiridon Eliopoulos


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757825 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 14:51:51 +00:00
Kevin Clark
db3a83a799 THRIFT-397. hs: Remove unnecessary redefinition of generate_program()
Author: Spiridon Eliopoulos


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757824 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 14:47:31 +00:00
Bryan Duxbury
2ad9eb7c5e THRIFT-382. java: Unused imports in generated code
Regrouped some of the imports and removed ones that will never be used.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757623 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 00:43:33 +00:00
Bryan Duxbury
f3c83cf88e THRIFT-385. hs: 64-bit integer and double types incorrectly serialized on 32-bit platforms
Use 64-bit types where appropriate.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757619 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 00:34:16 +00:00
Bryan Duxbury
ff58a9aecd THRIFT-266. erlang: Erlang atoms must always start with lower-case character
Forces first char of atom to lowercase for struct fields.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757617 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 00:28:40 +00:00
Bryan Duxbury
13083d6d52 THRIFT-294. Remove @author tags
They're gone. Don't add any new ones!



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756307 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 02:19:46 +00:00
Bryan Duxbury
afa1b47e60 THRIFT-245. rb: FIELDS constant should contain name of enumerated type for enum fields
This patch adds the :enum_class key to FIELDS entries that are enums. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756295 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 01:51:16 +00:00
David Reiss
1f804a80c2 THRIFT-384. csharp: Fix handling of fields named "value"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756179 13f79535-47bb-0310-9956-ffa450edef68
2009-03-19 20:33:15 +00:00