Commit Graph

1177 Commits

Author SHA1 Message Date
Roger Meier
a9ddab5fa7 THRIFT-2720 nodejs - Error with enum generation 2014-10-09 02:11:14 +02:00
Roger Meier
25023b16eb THRIFT-809 Javascript client: Please make required fields actually required.
Patch: noazark

Github Pull Request: This closes #232
2014-10-09 02:01:17 +02:00
Roger Meier
f49ea0691c Revert "Revert "THRIFT-2722: js: Fix javascript service inheritance namespacing""
This reverts commit 371358ce4e.
2014-10-09 01:50:33 +02:00
Roger Meier
371358ce4e Revert "THRIFT-2722: js: Fix javascript service inheritance namespacing"
This reverts commit 9a7cb9f6c8.
2014-10-09 01:17:06 +02:00
Roger Meier
964082a8eb THRIFT-2712 PHP: add "json" option to create JsonSerializable code
This patch adds a "json" option to PHP code generation that will
make generated classes implement JsonSerializable, so thrift
objects may be converted to json using json_encode() easily.
If the "validate" option is enabled, the object's write validator
will be called, beyond that the jsonSerialize() method only outputs
non-null fields in the JSON object (JSON parsers get grumpy if you
send them null where they expect to see a number).

Patch: Stig Bakken

Github Pull Request: This closes #219
2014-10-08 23:41:18 +02:00
Roger Meier
9a7cb9f6c8 THRIFT-2722: js: Fix javascript service inheritance namespacing
Patch: Stig Bakken

This closes: #227
2014-10-08 12:31:26 +02:00
Jens Geyer
79f988c27a THRIFT-2768: Whitespace Fixup
Client: General (Makefile.am)
Patch: Jens Geyer

Reverted makefile.am - tabs are not optional there
2014-10-03 20:42:54 +02:00
Jens Geyer
aaa8947f3a THRIFT-2768: Whitespace Fixup
Client: General (Makefile.am, *.thrift)
Patch: Jens Geyer

DocTest.thrift has NOT been changed, the trailing whitespaces are part of the test case.
2014-10-03 20:30:38 +02:00
Jens Geyer
6d15c3090f THRIFT-2628 struct member name conflicts due to lowercased names
Client: Erlang
Patch: Alisdair Sullivan

This closes #228
2014-10-02 10:06:07 +02:00
Jens Geyer
cc4ac4955c THRIFT-2689 struct names that differ only in capitalization of first character generate broken erlang code
Client: Erlang
Patch: Alisdair Sullivan

This closes #204
2014-10-01 21:13:39 +02:00
Konrad Grochowski
99b9e1d405 THRIFT-2746: compiler/cpp/README.md updated
Client: Build
Patch: Konrad Grochowski

Haskell compiler no longer need to be disabled when building with mingw
2014-10-01 00:14:14 +02:00
Randy Abernethy
ab3f848dec THRIFT-2746: Replace C++11 code in IDL compiler
Client: compiler (haskell and cpp generators)
Patch: Randy Abernethy

This patch replaces various bits of C++11 code in the Apache
Thrift compiler which fail to compile on older versions of
gcc (such as 4.4.7)
2014-09-30 14:09:41 -07:00
Konrad Grochowski
485d71acd1 THRIFT-2664: py - fixed errors on calling oneway functions
Client: Python-Compiler
Patch: Dustin Spicuzza

'recv_' method is resolved later, thus disregarding exceptions send from
oneway methods calls

This closes #188
2014-09-29 23:38:15 +02:00
Konrad Grochowski
03394b54fb THRIFT-2662: py - Fix incorrect indentation when oneway function is used
Client: Python-Compiler
Patch: Dustin Spicuzza

fixes python generator when py:tornado option is enabled

This closes #186
2014-09-29 23:04:30 +02:00
Konrad Grochowski
05d64b4e3b THRIFT-2707: rb - support for oneway messages fixed
Client: Ruby Library, Ruby Compiler
Patch: Konrad Grochowski

now oneway method calls will use proper message type

This closes #217
2014-09-29 22:08:58 +02:00
Roger Meier
63243c6a29 THRIFT-2709 c_glib: Support server implementation
Patch: Simon South
2014-09-29 20:29:58 +02:00
James Broadhead
51ba56c31b py.twisted: Avoid synchronous exceptions
This is an update of the patch posted to:
https://issues.apache.org/jira/browse/THRIFT-585
and a re-write of 8345772

Patch: Mattias de Zalenski, James Broadhead

Jira: THRIFT-585
2014-09-28 22:39:55 +02:00
Jens Geyer
3dcef37686 THRIFT-2714 Graphviz generator is missing from MSVC++ project files
Client: Graphviz
Patch: Jens Geyer
2014-09-17 22:55:56 +02:00
Jens Geyer
a86886e77d THRIFT-2704 - compiler: T_ONEWAY type used for oneway methods instead of T_CALL
Patch: Konrad Grochowski

This closes #216
2014-09-17 22:36:00 +02:00
Jens Geyer
2de7e19899 THRIFT-2702 empty enums lead to invalid code
Client: Delphi
Patch: Jens Geyer
2014-09-12 00:23:53 +02:00
Jens Geyer
86b309cde0 THRIFT-2513 clean up enum value assignment
Client: Compiler (General)
Patch: Jens Geyer
2014-09-12 00:23:51 +02:00
Jens Geyer
089bcd3f8c THRIFT-1040 Can't end typedef lines with a semicolon
Client: Compiler (General)
Patch: Konrad Grochowski
2014-09-11 22:36:41 +02:00
Jens Geyer
ae0b22cc29 THRIFT-2513 clean up enum value assignment
Patch: Dave Watson

This closes #88

Summary:
Clean up how enum values are handled if an integer value is not
explicitly specified in the thrift file.

For example, the following used to be a compile error, but
works now:

  enum MyEnum {
	SOMEVALUE
  }
  struct MyStruct {
	1: MyEnum e = SOMEVALUE
  }

This change also cleans up some of the error handling with out-of-range
values.  Previously thrift simply issued a warning for enum values that
didn't fit in an i32, but serialized them as i32 anyway.  Now
out-of-range enum values result in a compile failure.

Test Plan:
Included a new unit test to verify the assignment of enum values.  I
also verified that g++ makes the same enum value assignments when
compiling these enums as C++ code.
2014-09-04 23:40:14 +02:00
Jens Geyer
067779bbda THRIFT-2679 golang generation fails for service names less than 5 characters
Client: Go
Patch: Dustin Spicuzza & Jens Geyer
2014-09-04 22:35:38 +02:00
Roger Meier
0cc6d3c7bd THRIFT-2690
c_glib: Incorrect behaviour when serializing a map with typedef'd keys

Patch: Simon South
2014-09-04 00:24:17 +02:00
Roger Meier
d62473c3b0 THRIFT-1266 generated C code for iterating over nested maps is wrong
Patch: Simon South
2014-09-04 00:16:50 +02:00
Konrad Grochowski
b3f6ea100f THRIFT-2067 C++: all generated objects provide ostream operator<< 2014-09-03 23:41:32 +02:00
Jens Geyer
d0bd17e726 THRIFT-2666 Usage of PYTHONHASHSEED breaks older Python code
Client: Python
Patch: Jens Geyer
2014-09-01 23:05:08 +02:00
Keith Lazuka
e26a19bba0 THRIFT-2676 Avoid 'i386' name collision in generated Cocoa/objc code
This fixes a bug in the cocoa code generator where the variable
used by a for-loop can conflict with a built-in symbol when the
temporary variable counter is equal to 386. The generated variable
name, 'i386', conflicts with a macro built-in to the compiler.

I can reproduce this bug on Xcode 5 as well as Xcode 6. It appears
to only affect iOS projects, not OS X projects.

My fix simply prefixes the generated variable with 'idx' instead of 'i'.

This test code demonstrates the problem, regardless of Thrift codegen.

    int i386 = 42;
    printf("foobar %d\n", i386);

Which results in the following compiler error:

/Users/keith/Desktop/ReservedSymbolTest/ReservedSymbolTest/ViewController.m:22:7: error: expected identifier or '('
  int i386 = 99;
      ^
<built-in>:143:14: note: expanded from here
             ^
1 error generated.
2014-09-01 22:04:36 +02:00
Roger Meier
db8751b1bc THRIFT-2673 PHP: generated Service_method_result code should not have validators
Patch: Stig Bakken
2014-09-01 21:58:07 +02:00
Roger Meier
008f42cb38 THRIFT-2684 c_glib: Improvements to map deserialization in generated code
Patch: Simon South
2014-09-01 20:26:01 +02:00
Roger Meier
546209c961 THRIFT-2683 c_glib: Seg fault when deserializing a map with typedef'd keys
Patch: Simon South
2014-09-01 20:23:26 +02:00
kedzie
f9b8f5e641 THRIFT-2670 Android parcelable generator
-add 'android' option to java compiler which will generate Parcelable structures for Android
-cleaned up warnings
2014-08-23 22:27:45 +02:00
Roger Meier
311f7157a2 THRIFT-2571 Simplify cross compilation using CMake
fix CMake build and update README.md
2014-08-17 22:24:30 +02:00
Roger Meier
8720260e39 THRIFT-2667 create Windows Installer via CPack
Signed-off-by: Roger Meier <roger@apache.org>
2014-08-15 23:07:12 +02:00
Noam Zilberstein
af5d64adb7 THRIFT-2641 Improvements to Haskell Compiler/Libraries
- test/test.sh integration
- add json and compact protocol

This closes #175

Signed-off-by: Roger Meier <roger@apache.org>
2014-08-10 21:11:43 +02:00
Jens Geyer
044e89de0a THRIFT-2653 improved Delphi const generation
Client: Delphi
Patch: Jens Geyer
2014-08-07 22:50:15 +02:00
Jens Geyer
c20eeaae82 THRIFT-2589 const of BaseType in IDL generates static instead of const properties
Client: C#
Patch: Thomas Lazar
2014-08-07 22:41:24 +02:00
alisdair sullivan
ca44a622df THRIFT-2651: struct names that are restricted erlang terms generate invalid type signatures
patch: alisdairsullivan@yahoo.ca
client: erlang

fixes error exposed in THRIFT-2647 by avoiding using restricted identifiers in erlang type signatures generated by the compiler
2014-08-07 17:40:22 +02:00
Roger Meier
d52edba00f THRIFT-2231 Support tornado-4.x (Python)
Client: Python
Patch: Roey Berman
Signed-off-by: Roger Meier <roger@apache.org>
2014-08-07 17:04:23 +02:00
Roger Meier
16c164ed30 THRIFT-2647 compiler-hs: don't decapitalize field names, do decapitalize argument bindings
Client: Haskell
Patch: John Chee
2014-08-07 03:09:23 +02:00
Jens Geyer
a0b8674116 THRIFT-2639 c_glib: Expose as properties members of generated structs
Client: C-glib
Patch: Simon South

Fixes error: 'to_string' is not a member of 'std' for non-C++11 conformant compilers
2014-08-03 19:14:11 +02:00
Roger Meier
f341c590dc THRIFT-2152 Generated Haskell files does not compile
fully qualified module names at usage site for structs

Patch: John Chee & Roger Meier
2014-08-02 18:05:23 +02:00
Jens Geyer
b360ed393c THRIFT-2645 generated Go server code always sets Success retval
Client: Go
Patch: Jens Geyer
2014-08-02 16:23:13 +02:00
Jens Geyer
790a3881b2 THRIFT-2621 Add basic default hash code method to python
Client: Python
Patch: Kishor Patil & Jens Geyer
2014-08-01 22:25:51 +02:00
Roger Meier
8033e7e794 Revert "THRIFT-585 exceptions in the autogenerated send_METHOD functions are not propagated"
This reverts commit 8345772f29.
2014-07-30 01:01:50 +02:00
Roger Meier
60b7ad6b3d THRIFT-2639 c_glib: Expose as properties members of generated structs
Patch: Simon South

Signed-off-by: Roger Meier <roger@apache.org>
2014-07-29 23:25:53 +02:00
Jens Geyer
8345772f29 THRIFT-585 exceptions in the autogenerated send_METHOD functions are not propagated
Client: Python (Twisted)
Patch: Mattias de Zalenski, James Broadhead

This closes #165
2014-07-26 18:02:12 +02:00
Roger Meier
3c494114b1 THRIFT-1188 C++: Use bit fields for a more compact __isset struct
Patch: Eric Rannaud
2014-07-26 14:43:57 +02:00
Roger Meier
84d1188842 THRIFT-2637 "java:fullcamel_service_methods" option to automatically camel-case Java service methods
Patch: Tom Lee
2014-07-25 23:26:11 +02:00