Commit Graph

850 Commits

Author SHA1 Message Date
Ilya Maykov
c00011a752 THRIFT-1204: Ruby autogenerated files should require 'thrift' gem
Library: Ruby
Patch: Ilya Maykov
This patch does 2 things:
1) Adds a "require 'thrift'" line to the *_types.rb and *_constants.rb files,
   to be consistent with *_service.rb which was generating the thrift require
   already.
2) Adds a "rubygems" option to the --gen rb compiler target. When this option
   is specified, the compiler will add a "require 'rubygems'" line to the top
   of each gen-rb file. Defaults to false.


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1294949 13f79535-47bb-0310-9956-ffa450edef68
2012-02-29 02:40:28 +00:00
Bryan Duxbury
b2507dbb0c THRIFT-1518. cpp: Generated C++ code only sends the first optional field in the write() function for a struct
There was some incorrect else if logic added to the CPP generated code, which this patch replaces with the proper functionality.

Patch: Thomas Wiggins

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1292508 13f79535-47bb-0310-9956-ffa450edef68
2012-02-22 21:14:10 +00:00
Bryan Duxbury
b405ca6be8 THRIFT-1447. java: NullpointerException in ProcessFunction.class :in 'oneway' method
Patch: Ihor Mysak

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1244272 13f79535-47bb-0310-9956-ffa450edef68
2012-02-14 23:35:22 +00:00
Jake Farrell
afb9f970a4 Thrift-556:Ruby compiler does not correctly referred to top-level modules when a submodule masks the top-level name
Client: rb
Patch: Ben Kelly

Prepends a :: to every  place that references the top-level module.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1242376 13f79535-47bb-0310-9956-ffa450edef68
2012-02-09 16:17:50 +00:00
Jake Farrell
f9f01fa1e0 THRIFT-1394:Treatment of optional fields is not consistent between C++ and Java
Client: cpp
Patch: Diwaker Gupta

In CPP, all optional fields are guarded by the isset helper struct. On Java, however, the generated code takes advantage of nullable types: for containers, structs, exceptions, enums, and, notably, strings, the generator elides explicit use of an "isset" bit vector and instead emits checks of the form "field null". This leads to varying behavior between the two languages: an optional string field with a default value will have {{isset[fieldid]}} false on C, but the equivalent test in Java will be true.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236529 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:48:26 +00:00
Jake Farrell
b2c4952799 Thrift-1465:Visibility of methods in generated java code
Client: java
Patch: Ashutosh Chauhan

Changes visibility of processor getProcessMap() and getEmptyArgs() methods


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236515 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:01:54 +00:00
Jake Farrell
ba02146682 THRIFT-1504: Cocoa Generator should use local file imports for base Thrift headers
Client: cocoa
Patch: Steve White

Updates thrift headers as global imports instead of local imports



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236503 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 03:06:54 +00:00
Roger Meier
0838bf56f5 THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton
fix: add missing area of XML documentation generation

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1234095 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 19:42:23 +00:00
Roger Meier
bc2be31e48 THRIFT-1496 PHP compiler not namespacing enums
Patch: Andrew Grumet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1233930 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 14:34:49 +00:00
Roger Meier
26cbb388ec THRIFT-1410 C# Partial Classes (for service implementation class)
Patch: Kieran Benton

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232585 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 21:32:50 +00:00
Roger Meier
f0e517db99 THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton

changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232578 13f79535-47bb-0310-9956-ffa450edef68
2012-01-17 21:20:56 +00:00
Roger Meier
eaa61d8fda THRIFT-1267 Node.js can't throw exceptions
Patch: Henrique Mendonca

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1230797 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 21:38:29 +00:00
Roger Meier
333bbf3d88 THRIFT-1485 Performance: pass large and/or refcounted arguments as "const"
Patch: Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228965 13f79535-47bb-0310-9956-ffa450edef68
2012-01-08 21:51:08 +00:00
Bryan Duxbury
bad4174a57 THRIFT-1479. php: Compiled PHP process functions missing writeMessageEnd()
This patch adds in the missing call.

Patch: Andrew Grumet

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1226892 13f79535-47bb-0310-9956-ffa450edef68
2012-01-03 17:35:26 +00:00
Bryan Duxbury
9704630bab THRIFT-1483. java: java compiler does not generate type parameters for services in extended clauses
Patch: Ruslan Shevchenko

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1226889 13f79535-47bb-0310-9956-ffa450edef68
2012-01-03 17:28:45 +00:00
Bryan Duxbury
a3df547c84 THRIFT-317. java: Issues with Java struct validation
Nested structs will now be validated before serialization starts.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1225035 13f79535-47bb-0310-9956-ffa450edef68
2011-12-27 22:26:59 +00:00
Roger Meier
94eecc8259 THRIFT-1168 C++ cob client/server: void functions that throw exceptions
Patch: NewBlood

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1221891 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 21:23:28 +00:00
Bryan Duxbury
1e79cb40f5 THRIFT-1469. java: Java isset space optimization
This patch gives the generated code some variable-sized options for the isset bit vector. The compiler will attempt to use byte, short, int and long types before reverting to a BitSet for structs with a LOT of optional fields. This should save a fair amount of memory in a lot of cases.

Patch: Brian Bloniarz

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1221828 13f79535-47bb-0310-9956-ffa450edef68
2011-12-21 18:13:29 +00:00
Roger Meier
12d705390d THRIFT-1461 Recent TNonblockingServer changes broke --enable-boostthreads=yes, Windows
Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1214547 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 23:35:28 +00:00
Jake Farrell
a99027c708 Thrift-1462: add more strict compiler flags
Reverting MINGW addition for c+++0x 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213905 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 20:12:26 +00:00
Roger Meier
6e96965fdb THRIFT-1462 add more strict compiler flags
FIX: check for MINGW and use reduced compiler flag set for mingw

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213523 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 00:36:01 +00:00
Roger Meier
ca10fd4a51 THRIFT-1462 add more strict compiler flags(-Wall -Wextra -std=c++0x -pedantic)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213459 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 22:00:23 +00:00
Roger Meier
aad8fb4fec fix compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212892 13f79535-47bb-0310-9956-ffa450edef68
2011-12-10 21:50:10 +00:00
Roger Meier
e1d2458f1a THRIFT-1452 generate a swap() method for all generated structs
fix compiler warnings, when having empty structs

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212593 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 19:33:07 +00:00
Jake Farrell
343c61d6a7 Thrift-1441: Generate constructor with parameters for exception class to let it update message property automatically.
Client:delphi
Patch: Kenjiro Fukumitsu

Add the function to delphi generator that generates constructor with parameters to initialize members,if the class is exception and have more than zero parameters.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212226 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 02:29:56 +00:00
Jake Farrell
3318201c2f Thrift-1452: generate a swap() method for all generated structs
Client: cpp
Patch: Dave Watson

Convenience method for all C++ thrift types to add swap() function



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212130 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 21:15:50 +00:00
Roger Meier
284a9b56d7 THRIFT-1037 Proposed changes to support Silverlight, Windows Phone and AsyncCTP v3
Patch: Damian Mehers & Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211880 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 13:39:56 +00:00
Jake Farrell
23bf35daa3 Thrift-1454:Better handling of write on a closed TSocket
Client: cpp
Patch: Dave Watson

TSocket.send() was expecting a send() on the underlying socket
to fail by returning zero, but the actual behavior is to raise
an exception.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211736 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 02:02:20 +00:00
Jake Farrell
a2c5674920 Thrift-1445:minor C++ generator variable cleanup
Client: cpp
Patch: Dave Watson

In generate_process_function(), service_func_name is always used as a
string literal. Therefore, construct it with the double quotes
built-in, rather than having to add them everywhere we use it.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210757 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 02:59:04 +00:00
Jake Farrell
9689d89df1 Thrift-1340: Add support of ARC to Objective-C
Client: Objective-c
Patch: Hirano Satoshi

Adds -objc-arc flag to compiler and if used removes the retain/release/autorelease from generated code



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210732 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 01:07:17 +00:00
Jake Farrell
6fa2b30940 Thrift-1446:Compile error with Delphi 2009 in constant initializer
Client: delphi
Patch: Kenjiro Fukumitsu 

Generated code cannot be compiled with Delphi 2009 due to the bug in constant initializer.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210728 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 00:59:30 +00:00
Jake Farrell
3775a683af Thrift-1090: Document the generation of a file called "Constants.java"
Client: java
Patch: Mike Riley

Adds program_name to the Constants file in java to match all other client libs.


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210724 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 00:48:04 +00:00
Jake Farrell
9901069442 Updating trunk to 0.9.0 version.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1208214 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 02:09:46 +00:00
Jake Farrell
a1b671dba7 Thrift-1330: PHP Namespaces no longer generated
Client: php
Patch: Mike Riley

Fixes namespaces in PHP generator to with with php >= 5.3.x



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1206532 13f79535-47bb-0310-9956-ffa450edef68
2011-11-26 18:24:43 +00:00
Roger Meier
94519b3943 THRIFT-1434 Node.js Thrift compiler fails to generate server code using inheritance
Patch: Wade Simmons

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1205592 13f79535-47bb-0310-9956-ffa450edef68
2011-11-23 21:02:46 +00:00
Jake Farrell
ac10256fcc Thrift-1435: make TException.Message property conformant to the usual expectations
Client: delphi
Patch: Jens Geyer

Make delphi exceptions act like standard TException within other languages 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1205415 13f79535-47bb-0310-9956-ffa450edef68
2011-11-23 14:30:41 +00:00
Jake Farrell
a6c031ad41 Thrift-1432: Javascript struct constants declared in the same file as their struct definition will cause an error
Client: js
Patch: Mike Riley

Flips print out of constants and structs within the generator to allow for use of constants within the structs.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1204495 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 13:52:51 +00:00
Jake Farrell
e0c5316736 Thrift-1426: Dist package missing files for release 0.8
Client: build
Patch: Jake Farrell

Cleans up dist target and removes extra folders.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1202686 13f79535-47bb-0310-9956-ffa450edef68
2011-11-16 12:58:36 +00:00
Bryan Duxbury
02357f29e8 THRIFT-1411. java: java generator does not provide type parameter for TBaseProcessor
Patch: Jake Douglas

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1201961 13f79535-47bb-0310-9956-ffa450edef68
2011-11-14 23:12:20 +00:00
Jake Farrell
605c760ba6 Thrift-1251: Generated java code should indicate which fields are required and which are optional
Client: java
Patch: Jake Farrell

Fixes optional/required comments on fields.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198386 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 15:02:30 +00:00
Roger Meier
6f7681f91d THRIFT-1361 revert compiler/cpp/src/thrifty.yy change
=> breaks mingw build
=> memleak fixes reported by cppcheck

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198347 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 12:04:28 +00:00
Roger Meier
38315786e5 THRIFT-1361 Optional replacement of pthread by boost::thread
Patch: Alexandre Parenteau
rev3

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198339 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 11:29:41 +00:00
Roger Meier
1b6153bdd1 THRIFT-1277 Node.js serializes false booleans as null
revert patch => breaks js

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198334 13f79535-47bb-0310-9956-ffa450edef68
2011-11-06 10:37:11 +00:00
Jake Farrell
28459dc9c5 Thrift-1415: delphi: add version Info to the library
Client: delphi
Patch: Jens Geyer 

Adding versioning to delphi library



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1197957 13f79535-47bb-0310-9956-ffa450edef68
2011-11-05 13:36:27 +00:00
Jake Farrell
48bb0e2ad4 Thrift-1277: Node.js serializes false booleans as null
Client: js
Patch: Hans Duedal 

When serializing boolean types, false booleans are serialized as null instead of false switching to  using loose compare instead



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1197955 13f79535-47bb-0310-9956-ffa450edef68
2011-11-05 13:16:34 +00:00
Jake Farrell
aad3d1d63e Thrift-1409: Name conflict check does not work properly for exception object(Delphi).
Client: delphi
Patch: Kenjiro Fukumitsu

Delphi compiler's naming check does not work properly with exception object in the function that generates struct writer.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195747 13f79535-47bb-0310-9956-ffa450edef68
2011-11-01 01:08:46 +00:00
Jake Farrell
601bb5e87f THRIFT-1413: Generated code does not read MapEnd / ListEnd / SetEnd
Client: delphi
Patch: Jens Geyer

The generated code lacks calls to ReadMapEnd, ReadListEnd and ReadSetEnd. Although actually no problem occurs with the BinaryProtocol, other protocols (like JSON) do some important things there.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195466 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 14:13:13 +00:00
Jake Farrell
73a921f85c Thrift-1408: Delphi Test Server: Exception test case fails due to naming conflict with e.message
Client: delphi
Patch: jens Geyer

Fix name comflict with e.message 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195461 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 14:07:14 +00:00
Jake Farrell
f55f33bfba THRIFT-1405: Delphi compiler does not generates container serializer properly
Client: delphi
Patch: Kenjiro Fukumitsu

Fixess a bug in the function that generates serializer of containers



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1189009 13f79535-47bb-0310-9956-ffa450edef68
2011-10-26 02:40:14 +00:00
Jake Farrell
d2b3bb4e23 THRIFT-1406: Build error after applying THRIFT-1395
Client: delphi
Patch: Jens Geyer

Fixes build failure due to t_delphi_generator.cc:780: error: integer constant is too 
large for 'long' type



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1189006 13f79535-47bb-0310-9956-ffa450edef68
2011-10-26 02:29:48 +00:00