[thrift] branch master updated: THRIFT-4469: Make isServing volatile

2019-01-03 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 36ffe1e  THRIFT-4469: Make isServing volatile
36ffe1e is described below

commit 36ffe1e8dc5168ea683bb10896377eaffc057667
Author: Beluga Behr 
AuthorDate: Wed Jan 2 19:24:33 2019 -0500

THRIFT-4469: Make isServing volatile
---
 lib/java/src/org/apache/thrift/server/TServer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/java/src/org/apache/thrift/server/TServer.java 
b/lib/java/src/org/apache/thrift/server/TServer.java
index 80f4f86..bac06b2 100644
--- a/lib/java/src/org/apache/thrift/server/TServer.java
+++ b/lib/java/src/org/apache/thrift/server/TServer.java
@@ -123,7 +123,7 @@ public abstract class TServer {
*/
   protected TProtocolFactory outputProtocolFactory_;
 
-  private boolean isServing;
+  private volatile boolean isServing;
 
   protected TServerEventHandler eventHandler_;
 



[thrift] branch master updated: THRIFT-4724: fix dub.json dependencies limit on openssl deimos

2019-01-05 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new d2c6dc8  THRIFT-4724: fix dub.json dependencies limit on openssl deimos
d2c6dc8 is described below

commit d2c6dc8e44e40a2b439a8aaadd224e2960a08f9e
Author: James E. King III 
AuthorDate: Sat Jan 5 09:33:02 2019 -0500

THRIFT-4724: fix dub.json dependencies limit on openssl deimos
---
 dub.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dub.json b/dub.json
index 1e26860..af76afc 100644
--- a/dub.json
+++ b/dub.json
@@ -11,10 +11,10 @@
   "version": "~>2.0.2"
 },
 "openssl": {
-  "version": "~>1.1.6"
+  "version": ">=1.1.6"
 }
   },
-  "systemDependencies": "requires openssl 1.0 until deimos module is updated",
+  "systemDependencies": "On systems with native openssl 1.0.x use dub package 
openssl~>1.1, on systems with native openssl 1.1.x use dub package 
openssl~>2.0",
   "targetType": "library",
   "sourcePaths": [
 "lib/d/src" 



[thrift] branch master updated: THRIFT-4726: Remove SLF4J Logging Guards

2019-01-06 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 93e8ec2  THRIFT-4726: Remove SLF4J Logging Guards
93e8ec2 is described below

commit 93e8ec2d6a372cd6f68b7c11508ff7f8ea043f08
Author: Beluga Behr 
AuthorDate: Sun Jan 6 15:20:02 2019 -0500

THRIFT-4726: Remove SLF4J Logging Guards
---
 lib/java/src/org/apache/thrift/server/TThreadPoolServer.java |  8 +++-
 lib/java/src/org/apache/thrift/transport/TSaslTransport.java | 12 +---
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java 
b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
index 3b5f21e..1697ad6 100644
--- a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
+++ b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
@@ -320,11 +320,9 @@ public class TThreadPoolServer extends TServer {
 // Ignore err-logging all transport-level/type exceptions
 if ((realCause != null && realCause instanceof TTransportException)
 || (x instanceof TTransportException)) {
-  if (LOGGER.isDebugEnabled()) {
-// Write to debug, just in case the exception gets required
-LOGGER
-.debug("Received TTransportException during processing of 
message, ignoring: ", x);
-  }
+  LOGGER.debug(
+  "Received TTransportException during processing of message. 
Ignoring.",
+  x);
 } else {
   // Log the exception at error level and continue
   LOGGER.error("Error occurred during processing of message.", x);
diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java 
b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
index 80f3557..bed3b39 100644
--- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
@@ -158,9 +158,9 @@ abstract class TSaslTransport extends TTransport {
 messageHeader[0] = status.getValue();
 EncodingUtils.encodeBigEndian(payload.length, messageHeader, STATUS_BYTES);
 
-if (LOGGER.isDebugEnabled())
-  LOGGER.debug(getRole() + ": Writing message with status {} and payload 
length {}",
-   status, payload.length);
+LOGGER.debug("{}: Writing message with status {} and payload length {}",
+getRole(), status, payload.length);
+
 underlyingTransport.write(messageHeader);
 underlyingTransport.write(payload);
 underlyingTransport.flush();
@@ -197,10 +197,8 @@ abstract class TSaslTransport extends TTransport {
   String remoteMessage = new String(payload, StandardCharsets.UTF_8);
   throw new TTransportException("Peer indicated failure: " + 
remoteMessage);
 }
-
-if (LOGGER.isDebugEnabled())
-  LOGGER.debug(getRole() + ": Received message with status {} and payload 
length {}",
-   status, payload.length);
+LOGGER.debug("{}: Received message with status {} and payload length {}",
+getRole(), status, payload.length);
 return new SaslResponse(status, payload);
   }
 



[thrift] branch master updated: THRIFT-4487: replace gettimeofday implementation on windows

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 4eac57a  THRIFT-4487: replace gettimeofday implementation on windows
4eac57a is described below

commit 4eac57abcfc5f6fb591d894fe446add243392557
Author: James E. King III 
AuthorDate: Mon Jan 14 08:10:42 2019 -0500

THRIFT-4487: replace gettimeofday implementation on windows
---
 lib/cpp/src/thrift/windows/GetTimeOfDay.cpp | 77 +
 1 file changed, 33 insertions(+), 44 deletions(-)

diff --git a/lib/cpp/src/thrift/windows/GetTimeOfDay.cpp 
b/lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
index 820828f..0a0292c 100644
--- a/lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
+++ b/lib/cpp/src/thrift/windows/GetTimeOfDay.cpp
@@ -25,12 +25,6 @@
   #include 
 #endif
 
-#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
-#define DELTA_EPOCH_IN_MICROSECS 116444736Ui64
-#else
-#define DELTA_EPOCH_IN_MICROSECS 116444736ULL
-#endif
-
 #if !defined(__MINGW32__)
 struct timezone {
   int tz_minuteswest; /* minutes W of Greenwich */
@@ -43,50 +37,45 @@ int thrift_gettimeofday(struct timeval* tv, struct 
timezone* tz) {
   return gettimeofday(tv,tz);
 }
 #else
-int thrift_gettimeofday(struct timeval* tv, struct timezone* tz) {
-  FILETIME ft;
-  unsigned __int64 tmpres(0);
-  static int tzflag;
+#define WIN32_LEAN_AND_MEAN
+#include 
+#include 
+#include 
+#include 
 
-  if (NULL != tv) {
-GetSystemTimeAsFileTime();
+// This code started from a "FREE implementation" posted to Stack Overflow at:
+// 
https://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows
+// added: assert
+// added: error handling
+// added: C++ style casts
+int thrift_gettimeofday(struct timeval * tp, struct timezone * tzp)
+{
+// We don't fill it in so prove nobody is looking for the data
+assert(tzp == NULL);
 
-tmpres |= ft.dwHighDateTime;
-tmpres <<= 32;
-tmpres |= ft.dwLowDateTime;
+// Note: some broken versions only have 8 trailing zero's, the correct 
epoch has 9 trailing zero's
+// This magic number is the number of 100 nanosecond intervals since 
January 1, 1601 (UTC)
+// until 00:00:00 January 1, 1970 
+static const uint64_t EPOCH = static_cast(1164447360ULL);
 
-/*converting file time to unix epoch*/
-tmpres -= DELTA_EPOCH_IN_MICROSECS;
-tmpres /= 10; /*convert into microseconds*/
-tv->tv_sec = (long)(tmpres / 100UL);
-tv->tv_usec = (long)(tmpres % 100UL);
-  }
+SYSTEMTIME  system_time;
+FILETIMEfile_time;
+uint64_ttime;
 
-  if (NULL != tz) {
-if (!tzflag) {
-  _tzset();
-  tzflag++;
+GetSystemTime( _time );
+if (!SystemTimeToFileTime( _time, _time )) {
+  DWORD lastError = GetLastError();
+  std::stringstream ss;
+  ss << "SystemTimeToFileTime failed: 0x" << std::hex << lastError;
+  using apache::thrift::transport::TTransportException;
+  throw TTransportException(TTransportException::INTERNAL_ERROR, ss.str());
 }
+time =  static_cast(file_time.dwLowDateTime )  ;
+time += static_cast(file_time.dwHighDateTime) << 32;
 
-long time_zone(0);
-errno_t err(_get_timezone(_zone));
-if (err == NO_ERROR) {
-  tz->tz_minuteswest = time_zone / 60;
-} else {
-  return -1;
-}
-
-int day_light(0);
-err = (_get_daylight(_light));
-if (err == NO_ERROR) {
-  tz->tz_dsttime = day_light;
-  return 0;
-} else {
-  return -1;
-}
-  }
-
-  return 0;
+tp->tv_sec  = static_cast((time - EPOCH) / 1000L);
+tp->tv_usec = static_cast(system_time.wMilliseconds * 1000);
+return 0;
 }
 #endif
 



[thrift] branch master updated: THRIFT-4737: fixed

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new f61d9e5  THRIFT-4737: fixed
f61d9e5 is described below

commit f61d9e52827ec14f35dde0f5c0740837a5572c83
Author: Christian Bürckert 
AuthorDate: Mon Jan 14 14:36:22 2019 +0100

THRIFT-4737: fixed

THRIFT-4737: [added beforeSend to add customHeaders to jqXHR in jqRequest]
Client: [lib/js]

locally tested - custom headers where missing when using jq. So I added 
these lines to fix it.
---
 lib/js/src/thrift.js | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 9bf8127..fad24d6 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -438,7 +438,12 @@ Thrift.TXHRTransport.prototype = {
 }
 },
 context: client,
-success: jQuery.makeArray(args).pop()
+success: jQuery.makeArray(args).pop(),
+beforeSend: function (xreq) {
+Object.keys(thriftTransport.customHeaders).forEach(function 
(prop) {
+xreq.setRequestHeader(prop, 
thriftTransport.customHeaders[prop]);
+});
+}
 });
 
 return jqXHR;



[thrift] branch master updated: THRIFT-4733: Fix test unix socket address already in use

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new fe11c48  THRIFT-4733: Fix test unix socket address already in use
fe11c48 is described below

commit fe11c48ee185c9aead78d0c67c644c575df255a8
Author: junnplus 
AuthorDate: Sat Jan 12 02:15:05 2019 +0800

THRIFT-4733: Fix test unix socket address already in use
---
 lib/py/test/test_sslsocket.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/py/test/test_sslsocket.py b/lib/py/test/test_sslsocket.py
index f1344e5..598c174 100644
--- a/lib/py/test/test_sslsocket.py
+++ b/lib/py/test/test_sslsocket.py
@@ -213,6 +213,7 @@ class TSSLSocketTest(unittest.TestCase):
 return
 fd, path = tempfile.mkstemp()
 os.close(fd)
+os.unlink(path)
 try:
 server = self._server_socket(unix_socket=path, keyfile=SERVER_KEY, 
certfile=SERVER_CERT)
 self._assert_connection_success(server, path=path, 
cert_reqs=ssl.CERT_NONE)



[thrift] branch master updated: THRIFT-4691: ensure CPAN module runs unit tests

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new bbc1377  THRIFT-4691: ensure CPAN module runs unit tests
bbc1377 is described below

commit bbc137787496154fb794b210ad783899f2d3092f
Author: James E. King III 
AuthorDate: Mon Jan 14 12:07:10 2019 -0500

THRIFT-4691: ensure CPAN module runs unit tests
---
 configure.ac |  2 +-
 lib/perl/MANIFEST.SKIP   |  5 +++--
 lib/perl/Makefile.PL | 13 +
 lib/perl/Makefile.am |  4 ++--
 lib/perl/build-cpan-dist.sh  |  5 -
 lib/perl/{test => t}/Makefile.am |  0
 lib/perl/{test => t}/memory_buffer.t |  0
 lib/perl/{test => t}/multiplex.t |  0
 lib/perl/{test => t}/processor.t |  0
 9 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index d229734..c5683ec 100755
--- a/configure.ac
+++ b/configure.ac
@@ -821,7 +821,7 @@ AC_CONFIG_FILES([
   lib/nodejs/Makefile
   lib/nodets/Makefile
   lib/perl/Makefile
-  lib/perl/test/Makefile
+  lib/perl/t/Makefile
   lib/php/Makefile
   lib/php/test/Makefile
   lib/dart/Makefile
diff --git a/lib/perl/MANIFEST.SKIP b/lib/perl/MANIFEST.SKIP
index 7963b42..9b04450 100644
--- a/lib/perl/MANIFEST.SKIP
+++ b/lib/perl/MANIFEST.SKIP
@@ -8,6 +8,7 @@ Makefile
 Makefile.am
 Makefile.in
 pm_to_blib
-test/Makefile.am
-test/Makefile.in
+t/Makefile
+t/Makefile.am
+t/Makefile.in
 tools/FixupDist.pl
diff --git a/lib/perl/Makefile.PL b/lib/perl/Makefile.PL
index bdeaad2..5e60ab4 100644
--- a/lib/perl/Makefile.PL
+++ b/lib/perl/Makefile.PL
@@ -33,4 +33,17 @@ WriteMakefile( ABSTRACT => 'Apache Thrift is a software 
framework for scalable c
'Bit::Vector' => 0,
'Class::Accessor' => 0
},
+#  SIGN => 1,
VERSION_FROM => 'lib/Thrift.pm' );
+
+# THRIFT-4691
+package MY; # so that "SUPER" works right
+sub test {
+# Adds gen-perl and gen-perl2 to the test execution as include paths
+# Could not find anything in MakeMaker that would do this...
+my @result;
+for (@result = shift->SUPER::test(@_)) {
+s/\$\(TEST_FILES\)/-Igen-perl -Igen-perl2 \$(TEST_FILES)/ig;
+}
+@result;
+}
diff --git a/lib/perl/Makefile.am b/lib/perl/Makefile.am
index fa0f16b..abae1e7 100644
--- a/lib/perl/Makefile.am
+++ b/lib/perl/Makefile.am
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-SUBDIRS = test
+SUBDIRS = t
 
 Makefile-perl.mk : Makefile.PL
$(PERL) Makefile.PL MAKEFILE=Makefile-perl.mk 
INSTALLDIRS=$(INSTALLDIRS) INSTALL_BASE=$(PERL_PREFIX)
@@ -95,7 +95,7 @@ BUILT_SOURCES = $(PERL_GEN)
 
 check-local: $(PERL_GEN)
$(PERL) -Iblib/lib -I@abs_srcdir@ -I@builddir@/gen-perl2 
-I@builddir@/gen-perl \
-   @abs_srcdir@/test.pl @abs_srcdir@/test/*.t
+   @abs_srcdir@/test.pl @abs_srcdir@/t/*.t
 
 $(THRIFTTEST_GEN): $(THRIFT_IF) $(THRIFT)
$(THRIFT) --gen perl $<
diff --git a/lib/perl/build-cpan-dist.sh b/lib/perl/build-cpan-dist.sh
index ae22e7e..ac0ff0b 100755
--- a/lib/perl/build-cpan-dist.sh
+++ b/lib/perl/build-cpan-dist.sh
@@ -12,9 +12,10 @@ rm -rf Thrift-*
 
 # setup cpan without a prompt
 echo | cpan
-cpan install HTTP::Date
+cpan install HTTP::Date Log::Log4perl
 cpan install CPAN
 cpan install CPAN::Meta ExtUtils::MakeMaker JSON::PP
+# cpan install Module::Signature
 
 perl Makefile.PL
 rm MYMETA.yml
@@ -47,6 +48,8 @@ if [[ "$DISTDIR" != "$NEWDIR" ]]; then
 fi
 cd $DISTDIR
 cp -p ../Makefile.PL .
+cp -pr ../gen-perl .
+cp -pr ../gen-perl2 .
 perl ../tools/FixupDist.pl
 cd ..
 tar cvzf $DISTFILE $DISTDIR
diff --git a/lib/perl/test/Makefile.am b/lib/perl/t/Makefile.am
similarity index 100%
rename from lib/perl/test/Makefile.am
rename to lib/perl/t/Makefile.am
diff --git a/lib/perl/test/memory_buffer.t b/lib/perl/t/memory_buffer.t
similarity index 100%
rename from lib/perl/test/memory_buffer.t
rename to lib/perl/t/memory_buffer.t
diff --git a/lib/perl/test/multiplex.t b/lib/perl/t/multiplex.t
similarity index 100%
rename from lib/perl/test/multiplex.t
rename to lib/perl/t/multiplex.t
diff --git a/lib/perl/test/processor.t b/lib/perl/t/processor.t
similarity index 100%
rename from lib/perl/test/processor.t
rename to lib/perl/t/processor.t



[thrift] 01/01: Merge pull request #1678 from BELUGABEHR/THRIFT-4725

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 010ccf0a0c7023fea0f6bf4e4078ebdff7e61982
Merge: ee006ec e20ab3e
Author: James E. King III 
AuthorDate: Mon Jan 14 16:54:59 2019 -0500

Merge pull request #1678 from BELUGABEHR/THRIFT-4725

THRIFT-4725: Change Return Type Signature of Process Methods

 CHANGES.md  |  1 +
 lib/java/README.md  |  5 +
 lib/java/src/org/apache/thrift/TAsyncProcessor.java | 13 +
 lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java | 11 +--
 lib/java/src/org/apache/thrift/TBaseProcessor.java  |  7 +++
 lib/java/src/org/apache/thrift/TMultiplexedProcessor.java   |  7 ---
 lib/java/src/org/apache/thrift/TProcessor.java  |  4 +---
 lib/java/src/org/apache/thrift/server/TSimpleServer.java|  4 +---
 .../src/org/apache/thrift/server/TThreadPoolServer.java |  3 ++-
 .../test/org/apache/thrift/TestMultiplexedProcessor.java|  3 +--
 10 files changed, 32 insertions(+), 26 deletions(-)



svn commit: r1851295 - /thrift/cms-site/trunk/content/docs/Languages.md

2019-01-14 Thread jking
Author: jking
Date: Mon Jan 14 20:58:32 2019
New Revision: 1851295

URL: http://svn.apache.org/viewvc?rev=1851295=rev
Log:
CMS commit to thrift by jking

Modified:
thrift/cms-site/trunk/content/docs/Languages.md

Modified: thrift/cms-site/trunk/content/docs/Languages.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/docs/Languages.md?rev=1851295=1851294=1851295=diff
==
--- thrift/cms-site/trunk/content/docs/Languages.md (original)
+++ thrift/cms-site/trunk/content/docs/Languages.md Mon Jan 14 20:58:32 2019
@@ -3,7 +3,7 @@ title: "Language and Feature Matrix"
 kind: doc
 ---
 [This page on 
GitHub](https://github.com/apache/thrift/blob/master/LANGUAGES.md)
-
+ 
 [snippet:path=LANGUAGES.md]
 
 




svn commit: r1039010 - /websites/production/thrift/content/

2019-01-14 Thread jking
Author: jking
Date: Mon Jan 14 20:59:24 2019
New Revision: 1039010

Log:
Publishing svnmucc operation to thrift site by jking

Added:
websites/production/thrift/content/
  - copied from r1039009, websites/staging/thrift/trunk/content/



[thrift] branch master updated: Fix languages file left column readme links. [ci skip]

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new ee006ec  Fix languages file left column readme links. [ci skip]
ee006ec is described below

commit ee006ecb0da884e7d70f6f1e87d6c4b27197e55c
Author: James E. King III 
AuthorDate: Mon Jan 14 15:57:43 2019 -0500

Fix languages file left column readme links. [ci skip]
---
 LANGUAGES.md | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/LANGUAGES.md b/LANGUAGES.md
index 4b5e200..67f5565 100644
--- a/LANGUAGES.md
+++ b/LANGUAGES.md
@@ -34,7 +34,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 
 
 
-ActionScript
+https://github.com/apache/thrift/blob/master/lib/as3/README.md;>ActionScript
 0.3.0
 
 ActionScript 3
@@ -45,7 +45,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22AS3%20-%20Compiler%22%2C%20%22AS3%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">ActionScript
 
 
-C (glib)
+https://github.com/apache/thrift/blob/master/lib/c_glib/README.md;>C 
(glib)
 0.6.0
 
 2.48.22.56.0
@@ -56,7 +56,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22C%20glib%20-%20Compiler%22%2C%20%22C%20glib%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">C
 (glib)
 
 
-C++
+https://github.com/apache/thrift/blob/master/lib/cpp/README.md;>C++
 0.2.0
 
 C++98 (through 0.12.0)C++11 (after 
0.12.0)
@@ -67,7 +67,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22C%2B%2B%20-%20Compiler%22%2C%20%22C%2B%2B%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">C++
 
 
-C#
+https://github.com/apache/thrift/blob/master/lib/csharp/README.md;>C#
 0.2.0
 
 .NET3.5 / 
mono3.2.8.0.NET4.6.1 / mono4.6.2.7
@@ -78,7 +78,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22C%23%20-%20Compiler%22%2C%20%22C%23%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">C#
 (.NET)
 
 
-Cocoa
+https://github.com/apache/thrift/blob/master/lib/cocoa/README.md;>Cocoa
 0.2.0
 
 unknown
@@ -89,7 +89,7 @@ The Language/Library Levels indicate the minimum and maximum 
versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22Cocoa%20-%20Compiler%22%2C%20%22Cocoa%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">Cocoa
 
 
-Common LISP
+https://github.com/apache/thrift/blob/master/lib/cl/README.md;>Common 
LISP
 0.12.0
 
 SBCL 1.4.5SBCL 1.4.15
@@ -100,7 +100,7 @@ The Language/Library Levels indicate the minimum and 
maximum versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22Common%20LISP%20-%20Compiler%22%2C%20%22Common%20LISP%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">Common
 LISP
 
 
-Dlang
+https://github.com/apache/thrift/blob/master/lib/d/README.md;>Dlang
 0.9.0
 
 2.075.12.083.2
@@ -111,7 +111,7 @@ The Language/Library Levels indicate the minimum and 
maximum versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22D%20-%20Compiler%22%2C%20%22D%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">D
 
 
-Dart
+https://github.com/apache/thrift/blob/master/lib/dart/README.md;>Dart
 0.10.0
 
 1.22.11.24.3
@@ -122,7 +122,7 @@ The Language/Library Levels indicate the minimum and 
maximum versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22Dart%20-%20Compiler%22%2C%20%22Dart%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">Dart
 
 
-Delphi
+https://github.com/apache/thrift/blob/master/lib/delphi/README.md;>Delphi
 0.8.0
 
 2010unknown
@@ -133,7 +133,7 @@ The Language/Library Levels indicate the minimum and 
maximum versions that are u
 https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22Delphi%20-%20Compiler%22%2C%20%22Delphi%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">Delphi
 
 
-.NET Core
+https://github.com/apache/thrift/blo

[thrift] branch master updated (ee006ec -> 010ccf0)

2019-01-14 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from ee006ec  Fix languages file left column readme links. [ci skip]
 add e20ab3e  THRIFT-4725: Change Return Type Signature of Process Methods
 new 010ccf0  Merge pull request #1678 from BELUGABEHR/THRIFT-4725

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.md  |  1 +
 lib/java/README.md  |  5 +
 lib/java/src/org/apache/thrift/TAsyncProcessor.java | 13 +
 lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java | 11 +--
 lib/java/src/org/apache/thrift/TBaseProcessor.java  |  7 +++
 lib/java/src/org/apache/thrift/TMultiplexedProcessor.java   |  7 ---
 lib/java/src/org/apache/thrift/TProcessor.java  |  4 +---
 lib/java/src/org/apache/thrift/server/TSimpleServer.java|  4 +---
 .../src/org/apache/thrift/server/TThreadPoolServer.java |  3 ++-
 .../test/org/apache/thrift/TestMultiplexedProcessor.java|  3 +--
 10 files changed, 32 insertions(+), 26 deletions(-)



[thrift] branch master updated: THRIFT-4163: update cmake build type handling

2019-01-21 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new ef32bc1  THRIFT-4163: update cmake build type handling
ef32bc1 is described below

commit ef32bc10b70aa2926957fd8f35691563234f08b6
Author: James E. King III 
AuthorDate: Thu Jan 17 14:08:44 2019 -0500

THRIFT-4163: update cmake build type handling
---
 build/cmake/BuildType.cmake   | 36 +++
 build/cmake/DefineCMakeDefaults.cmake | 11 +++-
 build/cmake/DefineOptions.cmake   |  3 +++
 lib/csharp/src/Protocol/TProtocolException.cs |  2 +-
 lib/csharp/src/TException.cs  |  2 +-
 lib/hs/CMakeLists.txt |  2 +-
 6 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/build/cmake/BuildType.cmake b/build/cmake/BuildType.cmake
new file mode 100644
index 000..b3bf353
--- /dev/null
+++ b/build/cmake/BuildType.cmake
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# originally from:
+# 
https://raw.githubusercontent.com/OpenChemistry/tomviz/master/cmake/BuildType.cmake
+
+# Set a default build type if none was specified
+set(default_build_type "RelWithDebInfo")
+if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
+  set(default_build_type "Debug")
+endif()
+
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  message(STATUS "Setting build type to '${default_build_type}' as none was 
specified.")
+  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
+  STRING "Choose the type of build." FORCE)
+  # Set the possible values of build type for cmake-gui
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
+"MinSizeRel" "RelWithDebInfo")
+endif()
diff --git a/build/cmake/DefineCMakeDefaults.cmake 
b/build/cmake/DefineCMakeDefaults.cmake
index 7ae2136..6714357 100644
--- a/build/cmake/DefineCMakeDefaults.cmake
+++ b/build/cmake/DefineCMakeDefaults.cmake
@@ -34,17 +34,12 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
 # since cmake 2.4.0
 set(CMAKE_COLOR_MAKEFILE ON)
 
-# Set the default build type to release with debug info
-if (NOT CMAKE_BUILD_TYPE)
-  set(CMAKE_BUILD_TYPE RelWithDebInfo
-CACHE STRING
-  "Choose the type of build, options are: None Debug Release 
RelWithDebInfo MinSizeRel."
-  )
-endif (NOT CMAKE_BUILD_TYPE)
-
 # Create the compile command database for clang by default
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
+# Set the CMAKE_BUILD_TYPE if it is not already defined
+include(BuildType)
+
 # Put the libraries and binaries that get built into directories at the
 # top of the build tree rather than in hard-to-find leaf
 # directories. This simplifies manual testing and the use of the build
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index e9b094c..8e334d9 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -145,6 +145,9 @@ message(STATUS 
"--")
 message(STATUS "Thrift version:   
${thrift_VERSION} 
(${thrift_VERSION_MAJOR}.${thrift_VERSION_MINOR}.${thrift_VERSION_PATCH})")
 message(STATUS "Thrift package version:   
${PACKAGE_VERSION}")
 message(STATUS "Build configuration Summary")
+if (UNIX)
+message(STATUS "  Build type: 
${CMAKE_BUILD_TYPE}")
+endif ()
 message(STATUS "  Build Thrift compiler:  
${BUILD_COMPILER}")
 message(STATUS "  Build compiler plugin support:  ${WITH_PLUGIN}")
 message(STATUS "  Build with unit tests:  
${BUILD_TESTING}")
diff --git a/lib/csharp/src/Protocol/TProtocolException.cs 
b/lib/csharp/src/Protocol/TProtocolException.cs
index 41c26a3..7bef236 100644
--- a/lib/csharp/src/Protocol/TProtocolException.cs
+++ b/lib/csharp/src/Protocol/TProtocolExceptio

[thrift] branch master updated: THRIFT-4654 Minor fixes for dart 1 & 2 compatibility (backwards compatible) (#1617)

2019-01-21 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new f1eadad  THRIFT-4654 Minor fixes for dart 1 & 2 compatibility 
(backwards compatible) (#1617)
f1eadad is described below

commit f1eadad76edb3c680b9b964601d440ea05df02ca
Author: Rob Becker 
AuthorDate: Mon Jan 21 20:24:01 2019 -0700

THRIFT-4654 Minor fixes for dart 1 & 2 compatibility (backwards compatible) 
(#1617)

* THRIFT-4654 Minor fixes for dart 1 & 2 compatibility
* update dockerfiles for CI to test dart 2
* THRIFT-4654 update pubspec for tests
* THRIFT-4654 update dart test generator and readme to 1.24.3
* THRIFT-4654 update generated dart sdk to a range
* fix the dart tutorials
* Add .dart_tool directories to .gitignore
* THRIFT-4654: use dart 2.1.0 and fix cross test dart client timeout
---
 .gitignore |  2 ++
 build/docker/ubuntu-bionic/Dockerfile  |  4 ++--
 build/docker/ubuntu-xenial/Dockerfile  |  6 +++---
 .../cpp/src/thrift/generate/t_dart_generator.cc|  2 +-
 lib/dart/README.md |  2 +-
 lib/dart/lib/src/browser/t_web_socket.dart |  7 +++
 lib/dart/lib/src/console/t_web_socket.dart |  7 +++
 lib/dart/lib/src/protocol/t_compact_protocol.dart  |  4 ++--
 lib/dart/lib/src/protocol/t_json_protocol.dart |  8 
 lib/dart/lib/src/serializer/t_deserializer.dart|  4 ++--
 lib/dart/lib/src/serializer/t_serializer.dart  |  2 +-
 lib/dart/lib/src/transport/t_http_transport.dart   |  5 ++---
 lib/dart/lib/thrift.dart   |  5 +++--
 lib/dart/pubspec.yaml  | 15 +--
 lib/dart/test/protocol/t_protocol_test.dart|  6 +++---
 .../test/transport/t_framed_transport_test.dart| 14 +++---
 lib/dart/test/transport/t_http_transport_test.dart | 12 ++--
 .../test/transport/t_socket_transport_test.dart| 22 +++---
 test/dart/test_client/pubspec.yaml |  6 +++---
 test/tests.json|  2 ++
 tutorial/dart/client/pubspec.yaml  |  3 +--
 tutorial/dart/client/web/index.html|  3 +--
 tutorial/dart/console_client/pubspec.yaml  |  4 ++--
 tutorial/dart/server/pubspec.yaml  |  4 ++--
 24 files changed, 72 insertions(+), 77 deletions(-)

diff --git a/.gitignore b/.gitignore
index b3a5920..82d3d48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -196,6 +196,7 @@ project.lock.json
 /lib/d/test/transport_test
 /lib/d/unittest/
 /lib/dart/coverage
+/lib/dart/**/.dart_tool
 /lib/dart/**/.packages
 /lib/dart/**/packages
 /lib/dart/**/.pub/
@@ -305,6 +306,7 @@ project.lock.json
 /test/cpp/TestServer
 /test/csharp/obj
 /test/csharp/bin
+/test/dart/**/.dart_tool
 /test/dart/**/.packages
 /test/dart/**/packages
 /test/dart/**/.pub/
diff --git a/build/docker/ubuntu-bionic/Dockerfile 
b/build/docker/ubuntu-bionic/Dockerfile
index 43c99a9..db19112 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -15,7 +15,7 @@
 # Using all stock Ubuntu Bionic packaging except for:
 # - cl: want latest
 # - d: dmd does not come with Ubuntu
-# - dart: does not come with Ubuntu. Pinned to last 1.x release
+# - dart: does not come with Ubuntu - we use 2.x here
 # - dotnet: does not come with Ubuntu
 # - go: want latest
 # - nodejs: want v8, bionic comes with v6
@@ -46,7 +46,6 @@ RUN apt-get update && \
 RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 
&& \
 curl 
https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
 > \
   /etc/apt/sources.list.d/dart_stable.list
-ENV DART_VERSION 1.24.3-1
 
 # dotnet (netcore)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > 
/etc/apt/trusted.gpg.d/microsoft.gpg && \
@@ -118,6 +117,7 @@ RUN \
 mv deimos-openssl-1.1.0h/C/* /usr/include/dmd/druntime/import/C/ && \
 rm -rf deimos-openssl-1.1.0h
 
+ENV DART_VERSION 2.1.0-1
 RUN apt-get install -y --no-install-recommends \
   `# Dart dependencies` \
   dart=$DART_VERSION
diff --git a/build/docker/ubuntu-xenial/Dockerfile 
b/build/docker/ubuntu-xenial/Dockerfile
index 3372b4d..88895a0 100644
--- a/build/docker/ubuntu-xenial/Dockerfile
+++ b/build/docker/ubuntu-xenial/Dockerfile
@@ -14,7 +14,7 @@
 # Apache Thrift Docker build environment for Ubuntu Xenial
 # Using all stock Ubuntu Xenial packaging except for:
 # - d: does not come with Ubuntu so we're installing 2.075.1 for coverage
-# - dart: does not come with Ubuntu so we're installing 1.22.1 for coverage
+# - dart: does not come with Ubuntu so we're installing 1.24.3 for coverage
 # - dotne

[thrift] branch master updated: THRIFT-4747: The 'omitempty' tag should not be appended to optional fields that have a default value

2019-01-21 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new c28a739  THRIFT-4747: The 'omitempty' tag should not be appended to 
optional fields that have a default value
c28a739 is described below

commit c28a739b8cb62fca9ea869d8d157c0b1d64565b8
Author: Renan Cakirerk 
AuthorDate: Mon Jan 21 16:25:10 2019 -0800

THRIFT-4747: The 'omitempty' tag should not be appended to optional fields 
that have a default value
---
 compiler/cpp/src/thrift/generate/t_go_generator.cc | 8 +++-
 lib/go/test/GoTagTest.thrift   | 1 +
 lib/go/test/tests/gotag_test.go| 9 +
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc 
b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index ec16b87..11246f3 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -1338,7 +1338,13 @@ void 
t_go_generator::generate_go_struct_definition(ostream& out,
   t_type* fieldType = (*m_iter)->get_type();
   string goType = type_to_go_type_with_opt(fieldType, 
is_pointer_field(*m_iter));
   string gotag = "db:\"" + escape_string((*m_iter)->get_name())  + "\" ";
-  if ((*m_iter)->get_req() == t_field::T_OPTIONAL) {
+
+  // Only add the `omitempty` tag if this field is optional and has no 
default value.
+  // Otherwise a proper value like `false` for a bool field will be 
ommitted from
+  // the JSON output since Go Marshal won't output `zero values`.
+  bool has_default = (*m_iter)->get_value();
+  bool is_optional = (*m_iter)->get_req() == t_field::T_OPTIONAL;
+  if (is_optional && !has_default) {
 gotag += "json:\"" + escape_string((*m_iter)->get_name()) + 
",omitempty\"";
   } else {
 gotag += "json:\"" + escape_string((*m_iter)->get_name()) + "\"";
diff --git a/lib/go/test/GoTagTest.thrift b/lib/go/test/GoTagTest.thrift
index 508b3b6..5667c6e 100644
--- a/lib/go/test/GoTagTest.thrift
+++ b/lib/go/test/GoTagTest.thrift
@@ -21,4 +21,5 @@ struct tagged {
 1: string string_thing,
 2: i64 int_thing (go.tag = "json:\"int_thing,string\""),
 3: optional i64 optional_int_thing
+4: optional bool optional_bool_thing = false
 }
diff --git a/lib/go/test/tests/gotag_test.go b/lib/go/test/tests/gotag_test.go
index 32f056f..ff2f14e 100644
--- a/lib/go/test/tests/gotag_test.go
+++ b/lib/go/test/tests/gotag_test.go
@@ -51,3 +51,12 @@ func TestOptionalTag(t *testing.T) {
t.Error("Unexpected default tag value for optional field")
}
 }
+
+func TestOptionalTagWithDefaultValue(t *testing.T) {
+   s := gotagtest.Tagged{}
+   st := reflect.TypeOf(s)
+   field, ok := st.FieldByName("OptionalBoolThing")
+   if !ok || field.Tag.Get("json") != "optional_bool_thing" {
+   t.Error("Unexpected default tag value for optional field that 
has a default value")
+   }
+}



[thrift] branch master updated: update docker readme file [ci skip]

2019-01-21 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new cd9e8c9  update docker readme file [ci skip]
cd9e8c9 is described below

commit cd9e8c9bf75d7aaae7fed1cf3e19f8d25e49a2cf
Author: James E. King III 
AuthorDate: Tue Jan 22 00:00:53 2019 -0500

update docker readme file [ci skip]
---
 build/docker/README.md | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build/docker/README.md b/build/docker/README.md
index d00f87d..56b98a9 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -167,7 +167,7 @@ Last updated: October 1, 2017
 
 | Language  | ubuntu-xenial | ubuntu-bionic | Notes |
 | : | : | : | : |
-| as of | Mar 06, 2018  | Jan 4, 2019   |   |
+| as of | Mar 06, 2018  | Jan 21, 2019  |   |
 | as3   |   |   | Not in CI |
 | C++ gcc   | 5.4.0 | 7.3.0 |   |
 | C++ clang | 3.8   | 6.0   |   |
@@ -175,23 +175,23 @@ Last updated: October 1, 2017
 | c_glib| 2.48.2| 2.56.0|   |
 | cl (sbcl) |   | 1.4.15|   |
 | d | 2.075.1   | 2.083.1   |   |
-| dart  | 1.22.1| 1.24.3|   |
+| dart  | 1.24.3| 2.1.0 |   |
 | delphi|   |   | Not in CI |
-| dotnet| 2.1.4 | 2.2.101   |   |
+| dotnet| 2.1.503   | 2.2.103   |   |
 | erlang| 18.3  | 20.2.2|   |
 | go| 1.7.6 | 1.11.4|   |
 | haskell   | 7.10.3| 8.0.2 |   |
 | haxe  | 3.2.1 | 3.4.4 | THRIFT-4352: avoid 3.4.2 |
-| java  | 1.8.0_151 | 1.8.0_191 |   |
+| java  | 1.8.0_191 | 1.8.0_191 |   |
 | js|   |   | Unsure how to look for version 
info? |
 | lua   | 5.2.4 | 5.2.4 | Lua 5.3: see THRIFT-4386 |
-| nodejs| 6.13.0| 8.15.0|   |
+| nodejs| 6.16.0| 8.15.0|   |
 | ocaml |   | 4.05.0| THRIFT-4517: ocaml 4.02.3 on 
xenial appears broken |
 | perl  | 5.22.1| 5.26.1|   |
-| php   | 7.0.22| 7.2.10|   |
+| php   | 7.0.32| 7.2.10|   |
 | python| 2.7.12| 2.7.15rc1 |   |
 | python3   | 3.5.2 | 3.6.7 |   |
 | ruby  | 2.3.1p112 | 2.5.1p57  |   |
-| rust  | 1.17.0| 1.30.0|   |
+| rust  | 1.30.0| 1.30.0|   |
 | smalltalk |   |   | Not in CI |
 | swift |   | 4.2.1 |   |



svn commit: r1851819 - /thrift/cms-site/trunk/content/tutorial/java.md

2019-01-22 Thread jking
Author: jking
Date: Tue Jan 22 14:03:15 2019
New Revision: 1851819

URL: http://svn.apache.org/viewvc?rev=1851819=rev
Log:
Fix THRIFT-4093

Modified:
thrift/cms-site/trunk/content/tutorial/java.md

Modified: thrift/cms-site/trunk/content/tutorial/java.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/tutorial/java.md?rev=1851819=1851818=1851819=diff
==
--- thrift/cms-site/trunk/content/tutorial/java.md (original)
+++ thrift/cms-site/trunk/content/tutorial/java.md Tue Jan 22 14:03:15 2019
@@ -9,10 +9,14 @@ library_lang: "java"
 
 ### Client
 
-[snippet:path=tutorial/java/src/JavaClient.java:lang=java:lines=21]
+[snippet:path=tutorial/java/src/JavaClient.java:lang=java]
+
+### CalculatorHandler
+
+[snippet:path=tutorial/java/src/CalculatorHandler.java:lang=java]
 
 ### Server
 
-[snippet:path=tutorial/java/src/JavaServer.java:lang=java:lines=20]
+[snippet:path=tutorial/java/src/JavaServer.java:lang=java]
 
 ## Additional Information




svn commit: r1039345 - /websites/production/thrift/content/

2019-01-22 Thread jking
Author: jking
Date: Tue Jan 22 14:03:59 2019
New Revision: 1039345

Log:
Fix THRIFT-4093

Added:
websites/production/thrift/content/
  - copied from r1039344, websites/staging/thrift/trunk/content/



svn commit: r1851834 - /thrift/cms-site/trunk/lib/path.pm

2019-01-22 Thread jking
Author: jking
Date: Tue Jan 22 16:45:03 2019
New Revision: 1851834

URL: http://svn.apache.org/viewvc?rev=1851834=rev
Log:
CMS commit to thrift by jking

Modified:
thrift/cms-site/trunk/lib/path.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1851834=1851833=1851834=diff
==
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Tue Jan 22 16:45:03 2019
@@ -134,6 +134,7 @@ powered_by: [
 # Apache Projects using Thrift: Project name, website
 apache_projects: [
[ "Aurora", "http://aurora.apache.org; ],
+[ "Camel", "http://camel.apache.org/; ],
[ "Hadoop", "http://wiki.apache.org/hadoop/HDFS-APIs; ],
[ "HBase", "http://wiki.apache.org/hadoop/Hbase/ThriftApi; ],
[ "Parquet", "https://parquet.apache.org; ],
@@ -156,7 +157,7 @@ oss_projects: [
 # - remarks
 external_packages: [
[ "(all)",   "Docker",
"https://hub.docker.com/_/thrift/;,
"Dockerfile", "",  "thrift compiler in 
/usr/local/bin/thrift" ],
-[ "ActionScript","Maven", 
"https://repository.apache.org/#nexus-search;quick~libthrift-as3;, 
"lib/as3/build.xml",  "jking"  "" ],
+[ "ActionScript","Maven", 
"https://repository.apache.org/#nexus-search;quick~libthrift-as3;, 
"lib/as3/build.xml",  "jking", "" ],
 [ "C (glib)","",  "",  
  "",   "", 
 "no official ASF package available" ],
 [ "C++", "",  "",      
  "",   "", 
 "no official ASF package available" ],
 [ "C#",  "NuGet", 
"https://www.nuget.org/packages/ApacheThrift;, 
"ApacheThrift.nuspec","jfarrell, codesf, jking",   "multi-framework 
nupkg for csharp and netcore" ],




[thrift] branch master updated: update NOTICE [ci skip]

2019-01-23 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 022b8bf  update NOTICE [ci skip]
022b8bf is described below

commit 022b8bf91c83bd63f637f88a178a095d5d04b85f
Author: James E. King III 
AuthorDate: Wed Jan 23 14:09:06 2019 -0500

update NOTICE [ci skip]
---
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NOTICE b/NOTICE
index 902dc8d..37824e7 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Thrift
-Copyright 2006-2017 The Apache Software Foundation.
+Copyright (C) 2006 - 2019, The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[thrift] branch master updated: Change Travis CI to use three cross test jobs again as we hit the 90 minute limit we had negotiated.

2019-01-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 5870cc8  Change Travis CI to use three cross test jobs again as we hit 
the 90 minute limit we had negotiated.
5870cc8 is described below

commit 5870cc81e8c716cf938c8f077549548885d30dcd
Author: James E. King III 
AuthorDate: Tue Jan 22 09:37:31 2019 -0500

Change Travis CI to use three cross test jobs again as we hit the 90 minute 
limit we had negotiated.
---
 .travis.yml | 9 -
 1 file changed, 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 75685d5..255f1d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -68,15 +68,6 @@ jobs:
 
 # = stage: thrift ===
 # - phase: cross 
-# apache/thrift official PR builds can exceed 50 minutes per job so 
combine all cross tests
-- stage: thrift
-  script: build/docker/run.sh
-  if: repo = apache/thrift
-  env:
-- JOB="Cross Language Tests"
-- SCRIPT="cross-test.sh"
-
-# fork based PR builds cannot exceed 50 minutes per job
 - stage: thrift
   script: build/docker/run.sh
   if: repo != apache/thrift



[thrift] branch master updated: fix travis CI cross

2019-01-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new b2a4afe  fix travis CI cross
b2a4afe is described below

commit b2a4afec2ac11ee78bc4f094e552150191316258
Author: James E. King III 
AuthorDate: Tue Jan 22 09:38:17 2019 -0500

fix travis CI cross
---
 .travis.yml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 255f1d9..5b93140 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -70,7 +70,6 @@ jobs:
 # - phase: cross 
 - stage: thrift
   script: build/docker/run.sh
-  if: repo != apache/thrift
   env:
 - JOB="Cross Language Tests (Binary Protocol)"
 - SCRIPT="cross-test.sh"
@@ -78,7 +77,6 @@ jobs:
 
 - stage: thrift
   script: build/docker/run.sh
-  if: repo != apache/thrift
   env:
 - JOB="Cross Language Tests (Header, JSON Protocols)"
 - SCRIPT="cross-test.sh"
@@ -86,7 +84,6 @@ jobs:
 
 - stage: thrift
   script: build/docker/run.sh
-  if: repo != apache/thrift
   env:
 - JOB="Cross Language Tests (Compact and Multiplexed Protocols)"
 - SCRIPT="cross-test.sh"



[thrift] branch master updated (b2a4afe -> dd63da1)

2019-01-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from b2a4afe  fix travis CI cross
 new f83d3f9  add const to member functions
 new 7190ca7  remove unused headers
 new d12dbed  remove unused headers
 new bfdbd03  use chrono
 new 6a01d46  remove unused code
 new c1bfe3d  remove WIN XP macros
 new fc222b3  remove useless assert code
 new c349cdb  add override and const
 new 72a878e  change timeous_ms to unsigned type
 new f6460fa  change doc
 new f7a4ead  fix warings
 new 9fed901  fix static analyzer warings
 new 8cd3f92  fix c++17 building on windows
 new dd63da1  Merge pull request #1690 from cyyever/const_members

The 5571 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.md |   1 +
 build/cmake/DefineCMakeDefaults.cmake  |  11 ++
 .../cpp/src/thrift/generate/t_delphi_generator.cc  |   2 -
 lib/cpp/CMakeLists.txt |   1 -
 lib/cpp/Makefile.am|   4 +-
 lib/cpp/README.md  |  12 +-
 lib/cpp/src/thrift/concurrency/Monitor.cpp |  54 ++--
 lib/cpp/src/thrift/concurrency/Monitor.h   |  29 ++--
 lib/cpp/src/thrift/concurrency/Mutex.h |   1 -
 lib/cpp/src/thrift/concurrency/Thread.h|   4 +-
 lib/cpp/src/thrift/concurrency/ThreadFactory.h |   5 -
 lib/cpp/src/thrift/concurrency/ThreadManager.cpp   |  30 ++--
 lib/cpp/src/thrift/concurrency/ThreadManager.h |   3 +-
 lib/cpp/src/thrift/concurrency/TimerManager.cpp|  91 +
 lib/cpp/src/thrift/concurrency/TimerManager.h  |  22 +--
 lib/cpp/src/thrift/concurrency/Util.cpp|  44 --
 lib/cpp/src/thrift/concurrency/Util.h  | 151 -
 lib/cpp/src/thrift/server/TNonblockingServer.cpp   |   2 +-
 lib/cpp/src/thrift/transport/TBufferTransports.h   |  12 +-
 lib/cpp/src/thrift/transport/TFileTransport.cpp|  28 ++--
 lib/cpp/src/thrift/transport/TFileTransport.h  |  14 +-
 lib/cpp/src/thrift/transport/THeaderTransport.h|   4 +-
 lib/cpp/src/thrift/transport/THttpClient.h |   2 +-
 lib/cpp/src/thrift/transport/THttpServer.h |   4 +-
 .../thrift/transport/TNonblockingServerSocket.h|   4 +-
 lib/cpp/src/thrift/transport/TPipe.cpp |   2 +-
 lib/cpp/src/thrift/transport/TPipe.h   |   8 +-
 lib/cpp/src/thrift/transport/TPipeServer.h |   6 +-
 lib/cpp/src/thrift/transport/TSocket.cpp   |   2 +-
 lib/cpp/src/thrift/transport/TSocket.h |   8 +-
 lib/cpp/src/thrift/transport/TTransport.h  |   2 +-
 lib/cpp/src/thrift/transport/TTransportUtils.cpp   |   2 +-
 lib/cpp/src/thrift/transport/TTransportUtils.h |  28 ++--
 lib/cpp/src/thrift/transport/TVirtualTransport.h   |  10 +-
 lib/cpp/src/thrift/transport/TZlibTransport.h  |   2 +-
 lib/cpp/src/thrift/windows/TWinsockSingleton.cpp   |   2 -
 lib/cpp/src/thrift/windows/config.h|  32 -
 lib/cpp/test/AllProtocolTests.tcc  |   2 +-
 lib/cpp/test/OneWayHTTPTest.cpp|   2 +-
 lib/cpp/test/TransportTest.cpp |   2 -
 lib/cpp/test/concurrency/Tests.cpp |   8 +-
 lib/cpp/test/concurrency/ThreadFactoryTests.h  |   5 +-
 lib/cpp/test/concurrency/ThreadManagerTests.h  |  13 +-
 lib/cpp/test/concurrency/TimerManagerTests.h   |  19 ++-
 test/cpp/src/StressTest.cpp|   9 +-
 test/cpp/src/StressTestNonBlocking.cpp |   9 +-
 46 files changed, 194 insertions(+), 514 deletions(-)
 delete mode 100644 lib/cpp/src/thrift/concurrency/Util.cpp
 delete mode 100644 lib/cpp/src/thrift/concurrency/Util.h



[thrift] branch master updated: THRIFT-4748: add jitpack support [ci skip]

2019-01-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 0cd2099  THRIFT-4748: add jitpack support [ci skip]
0cd2099 is described below

commit 0cd2099fa327caca294f4bf83ac85aa924e2db47
Author: James E. King III 
AuthorDate: Tue Jan 22 09:50:26 2019 -0500

THRIFT-4748: add jitpack support [ci skip]
---
 jitpack.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/jitpack.yml b/jitpack.yml
new file mode 100644
index 000..a640d5d
--- /dev/null
+++ b/jitpack.yml
@@ -0,0 +1,2 @@
+install:
+  - gradle -Prelease=true -p lib/java/ clean install



[thrift] branch master updated: THRIFT-4680: fix up std::min, std::max, and numeric limits min/max on Windows; remove NOMINMAX from cmake build

2018-12-18 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 9b75e4f  THRIFT-4680: fix up std::min, std::max, and numeric limits 
min/max on Windows; remove NOMINMAX from cmake build
9b75e4f is described below

commit 9b75e4fe745a9b08e6ccdc0998ec7a69272f5b4c
Author: James E. King III 
AuthorDate: Mon Dec 17 16:21:14 2018 -0500

THRIFT-4680: fix up std::min, std::max, and numeric limits min/max on 
Windows; remove NOMINMAX from cmake build
---
 build/cmake/DefinePlatformSpecifc.cmake  |  3 ---
 compiler/cpp/src/thrift/generate/t_go_generator.cc   |  2 +-
 lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp|  2 +-
 lib/cpp/src/thrift/transport/TBufferTransports.h |  2 +-
 lib/cpp/src/thrift/transport/TFileTransport.cpp  |  5 ++---
 lib/cpp/src/thrift/transport/THeaderTransport.cpp|  2 +-
 lib/cpp/test/TMemoryBufferTest.cpp   |  2 +-
 .../src/ext/thrift_protocol/php_thrift_protocol.cpp  |  4 ++--
 lib/py/src/ext/protocol.h|  4 ++--
 lib/py/src/ext/protocol.tcc  | 20 ++--
 test/cpp/src/TestClient.cpp  |  8 
 11 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index 8af4b6c..a809c07 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -61,9 +61,6 @@ if(MSVC)
 set(STATIC_POSTFIX "md" CACHE STRING "Set static library postfix" 
FORCE)
 endif(WITH_MT)
 
-# Disable Windows.h definition of macros for min and max
-add_definitions("-DNOMINMAX")
-
 # Disable boost auto linking pragmas - cmake includes the right files
 add_definitions("-DBOOST_ALL_NO_LIB")
 
diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc 
b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index 235a0b7..5ada4fa 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -1323,7 +1323,7 @@ void 
t_go_generator::generate_go_struct_definition(ostream& out,
   if (tstruct->is_union())
 (*m_iter)->set_req(t_field::T_OPTIONAL);
   if (sorted_keys_pos != (*m_iter)->get_key()) {
-int first_unused = std::max(1, sorted_keys_pos++);
+int first_unused = (std::max)(1, sorted_keys_pos++);
 while (sorted_keys_pos != (*m_iter)->get_key()) {
   ++sorted_keys_pos;
 }
diff --git a/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp 
b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
index cd38b01..0e46f11 100644
--- a/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
+++ b/lib/cpp/src/thrift/qt/TQIODeviceTransport.cpp
@@ -91,7 +91,7 @@ uint32_t TQIODeviceTransport::read(uint8_t* buf, uint32_t 
len) {
   "read(): underlying QIODevice is not open");
   }
 
-  actualSize = (uint32_t)std::min((qint64)len, dev_->bytesAvailable());
+  actualSize = (uint32_t)(std::min)((qint64)len, dev_->bytesAvailable());
   readSize = dev_->read(reinterpret_cast(buf), actualSize);
 
   if (readSize < 0) {
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h 
b/lib/cpp/src/thrift/transport/TBufferTransports.h
index 53d895f..79aace6 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.h
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
@@ -449,7 +449,7 @@ private:
   // Common initialization done by all constructors.
   void initCommon(uint8_t* buf, uint32_t size, bool owner, uint32_t wPos) {
 
-maxBufferSize_ = std::numeric_limits::max();
+maxBufferSize_ = (std::numeric_limits::max)();
 
 if (buf == NULL && size != 0) {
   assert(owner);
diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp 
b/lib/cpp/src/thrift/transport/TFileTransport.cpp
index 9c408ac..b08a5f1 100644
--- a/lib/cpp/src/thrift/transport/TFileTransport.cpp
+++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp
@@ -65,7 +65,6 @@ using stdcxx::shared_ptr;
 using std::cerr;
 using std::cout;
 using std::endl;
-using std::min;
 using std::string;
 using namespace apache::thrift::protocol;
 using namespace apache::thrift::concurrency;
@@ -705,8 +704,8 @@ eventInfo* TFileTransport::readEvent() {
   readState_.event_->eventBuffPos_ = 0;
 }
 // take either the entire event or the remaining bytes in the buffer
-int reclaimBuffer = min((uint32_t)(readState_.bufferLen_ - 
readState_.bufferPtr_),
-readState_.event_->eventSize_ - 
readState_.event_->eventBuffPos_);
+int reclaimBuffer = (std::min)((uint32_t)(readState_.bufferLen_ - 
readState_.bufferPtr_),
+ 

[thrift] branch master updated: Update a couple of our m4 files for autoconf

2018-12-17 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 56ac72e  Update a couple of our m4 files for autoconf
56ac72e is described below

commit 56ac72e74ae354c286c41f5d5a3c0b8723feb587
Author: James E. King III 
AuthorDate: Mon Dec 17 09:32:24 2018 -0500

Update a couple of our m4 files for autoconf
---
 aclocal/ax_boost_base.m4 |  6 +++---
 aclocal/ax_cxx_compile_stdcxx.m4 | 42 
 2 files changed, 7 insertions(+), 41 deletions(-)

diff --git a/aclocal/ax_boost_base.m4 b/aclocal/ax_boost_base.m4
index 19c71b6..d540395 100644
--- a/aclocal/ax_boost_base.m4
+++ b/aclocal/ax_boost_base.m4
@@ -33,7 +33,7 @@
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 42
+#serial 45
 
 # example boost program (need to pass version)
 m4_define([_AX_BOOST_BASE_PROGRAM],
@@ -113,8 +113,8 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
 dnl are found, e.g. when only header-only libraries are installed!
 AS_CASE([${host_cpu}],
   [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
-  [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
-  [libsubdirs="lib"],
+  
[ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64],[libsubdirs="lib64
 lib lib64"],
+  [libsubdirs="lib"]
 )
 
 dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
diff --git a/aclocal/ax_cxx_compile_stdcxx.m4 b/aclocal/ax_cxx_compile_stdcxx.m4
index 5032bba..9e9eaed 100644
--- a/aclocal/ax_cxx_compile_stdcxx.m4
+++ b/aclocal/ax_cxx_compile_stdcxx.m4
@@ -33,19 +33,18 @@
 #   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov 

 #   Copyright (c) 2015 Paul Norman 
 #   Copyright (c) 2015 Moritz Klammler 
-#   Copyright (c) 2016 Krzesimir Nowak 
+#   Copyright (c) 2016, 2018 Krzesimir Nowak 
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-#serial 7
+#serial 10
 
 dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
 dnl  (serial version number 13).
 
-AX_REQUIRE_DEFINED([AC_MSG_WARN])
 AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
   m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
 [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
@@ -61,14 +60,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
 [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
   AC_LANG_PUSH([C++])dnl
   ac_success=no
-  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
-  ax_cv_cxx_compile_cxx$1,
-  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
-[ax_cv_cxx_compile_cxx$1=yes],
-[ax_cv_cxx_compile_cxx$1=no])])
-  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
-ac_success=yes
-  fi
 
   m4_if([$2], [noext], [], [dnl
   if test x$ac_success = xno; then
@@ -139,7 +130,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
   [define if the compiler supports basic C++$1 syntax])
   fi
   AC_SUBST(HAVE_CXX$1)
-  m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks 
may change in incompatible ways anytime])])
 ])
 
 
@@ -587,20 +577,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus <= 201402L
+#elif __cplusplus < 201703L
 
 #error "This is not a C++17 compiler"
 
 #else
 
-#if defined(__clang__)
-  #define REALLY_CLANG
-#else
-  #if defined(__GNUC__)
-#define REALLY_GCC
-  #endif
-#endif
-
 #include 
 #include 
 #include 
@@ -608,16 +590,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
 namespace cxx17
 {
 
-#if !defined(REALLY_CLANG)
   namespace test_constexpr_lambdas
   {
 
-// TODO: test it with clang++ from git
-
 constexpr int foo = [](){return 42;}();
 
   }
-#endif // !defined(REALLY_CLANG)
 
   namespace test::nested_namespace::definitions
   {
@@ -852,12 +830,9 @@ namespace cxx17
 
   }
 
-#if !defined(REALLY_CLANG)
   namespace test_template_argument_deduction_for_class_templates
   {
 
-// TODO: test it with clang++ from git
-
 template 
 struct pair
 {
@@ -876,7 +851,6 @@ namespace cxx17
 }
 
   }
-#endif // !defined(REALLY_CLANG)
 
   namespace test_non_type_auto_template_parameters
   {
@@ -890,12 +864,9 @@ namespace cxx17
 
   }
 
-#if !defined(REALLY_CLANG)
   namespace test_structured_bindings
   {
 
-// TODO: test it with clang++ from git
-
 int arr[2] = { 1, 2 };
 std::pair pr = { 1, 2 };
 
@@ -927,14 +898,10 @@ namespace cxx17
 con

[thrift] tag hier deleted (was 790a388)

2018-12-26 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to tag hier
in repository https://gitbox.apache.org/repos/asf/thrift.git.


*** WARNING: tag hier was deleted! ***

 was 790a388  THRIFT-2621 Add basic default hash code method to python 
Client: Python Patch: Kishor Patil & Jens Geyer

The revisions that were on this tag are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[thrift] tag 0.12.0 deleted (was 384647d)

2018-12-27 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to tag 0.12.0
in repository https://gitbox.apache.org/repos/asf/thrift.git.


*** WARNING: tag 0.12.0 was deleted! ***

 was 384647d  Version 0.12.0

The revisions that were on this tag are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[thrift] 04/04: Fix c++98 build

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 44ee32cef57cbbd0ad62dfa026f0ee5e746f5c2b
Author: proller 
AuthorDate: Mon Dec 10 19:16:30 2018 +0300

Fix c++98 build
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp 
b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index b5cfe26..a34d135 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -21,7 +21,9 @@
 
 #include 
 #include 
+#if __cplusplus >= 201703L
 #include 
+#endif
 
 #include 
 



[thrift] 01/04: Fix build with c++17

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit f201bf05fbb56a33112e9f7ccf3790dffeab383e
Author: proller 
AuthorDate: Thu Dec 6 14:13:15 2018 +0300

Fix build with c++17
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp 
b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 0cec259..910fe52 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -188,7 +189,9 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
-random_shuffle(servers_.begin(), servers_.end());
+std::random_device rng;
+std::mt19937 urng(rng());
+std::shuffle(servers_.begin(), servers_.end(), urng);
   }
 
   for (size_t i = 0; i < numServers; ++i) {



[thrift] 03/04: Correct c++17 definition

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit e6e7e62981e285d6d7e023a618be3bafa514edae
Author: proller 
AuthorDate: Mon Dec 10 16:45:06 2018 +0300

Correct c++17 definition
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp 
b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 2a983e3..b5cfe26 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -189,7 +189,7 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
-#if __cplusplus >= 201500L // c++17
+#if __cplusplus >= 201703L
 std::random_device rng;
 std::mt19937 urng(rng());
 std::shuffle(servers_.begin(), servers_.end(), urng);



[thrift] branch master updated (9c3d2d6 -> 44ee32c)

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from 9c3d2d6  Fix build compiler with cmake
 new f201bf0  Fix build with c++17
 new db61f10  Fix build with old c++
 new e6e7e62  Correct c++17 definition
 new 44ee32c  Fix c++98 build

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)



[thrift] 02/04: Fix build with old c++

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit db61f10497bcf069da03537629dcc79b0523ebe4
Author: proller 
AuthorDate: Mon Dec 10 16:25:04 2018 +0300

Fix build with old c++
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp 
b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 910fe52..2a983e3 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -189,9 +189,13 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
+#if __cplusplus >= 201500L // c++17
 std::random_device rng;
 std::mt19937 urng(rng());
 std::shuffle(servers_.begin(), servers_.end(), urng);
+#else
+std::random_shuffle(servers_.begin(), servers_.end());
+#endif
   }
 
   for (size_t i = 0; i < numServers; ++i) {



[thrift] branch master updated: Add node.ts to the languages markdown

2018-12-17 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 33772b7  Add node.ts to the languages markdown
33772b7 is described below

commit 33772b7d78dc3e73154f1942320e1a6ef3301e1b
Author: James E. King III 
AuthorDate: Mon Dec 17 09:57:27 2018 -0500

Add node.ts to the languages markdown
---
 LANGUAGES.md | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/LANGUAGES.md b/LANGUAGES.md
index 7c83053..acf9083 100644
--- a/LANGUAGES.md
+++ b/LANGUAGES.md
@@ -1,8 +1,8 @@
 # Apache Thrift Language Support #
 
-Last Modified: 2018-07-06
+Last Modified: 2018-12-17
 
-Guidance For: 0.11.0 or later
+Guidance For: 0.12.0 or later
 
 Thrift supports many programming languages and has an impressive test suite 
that exercises most of the languages, protocols, and transports that represents 
a matrix of thousands of possible combinations.  Each language typically has a 
minimum required version as well as support libraries - some mandatory and some 
optional.  All of this information is provided below to help you assess whether 
you can use Apache Thrift with your project.  Obviously this is a complex 
matrix to maintain and  [...]
 
@@ -243,6 +243,17 @@ The Language/Library Levels indicate the minimum and 
maximum versions that are u
 https://issues.apache.org/jira/browse/THRIFT/component/12314320;>node.js
 
 
+node.ts
+0.12.0
+
+3.1.6
+
+
+
+
+https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20resolution%20%3D%20Unresolved%20and%20Component%20in%20(%22TypeScript%20-%20Library%22)%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC">node.ts
+
+
 OCaml
 0.2.0
 



[thrift] branch master updated: THRIFT-4684: Fix WCF related C# code generation

2018-12-25 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 087d881  THRIFT-4684: Fix WCF related C# code generation
087d881 is described below

commit 087d88108d34e3b08bc24eb555ec2d98b5293c31
Author: Shaoyu Zhang 
AuthorDate: Sat Dec 22 23:12:01 2018 +0800

THRIFT-4684: Fix WCF related C# code generation

Client: C#
Complete the namespace in System.ServiceModel in WCF related code.
Also when generating fields in fault classes, we follow the same behavior 
in normal struct,
to avoid generating unused private fields, when auto properties are also 
generated.
---
 .../cpp/src/thrift/generate/t_csharp_generator.cc   | 21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc 
b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
index 37d6f9d..9d1e29e 100644
--- a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
@@ -422,7 +422,7 @@ string t_csharp_generator::csharp_type_usings() {
  + ((async_) ? "using System.Threading.Tasks;\n" : "") + "using 
Thrift;\n"
  + "using Thrift.Collections;\n" + ((serialize_ || wcf_) ? "#if 
!SILVERLIGHT\n" : "")
  + ((serialize_ || wcf_) ? "using System.Xml.Serialization;\n" : "")
- + ((serialize_ || wcf_) ? "#endif\n" : "") + (wcf_ ? "//using 
System.ServiceModel;\n" : "")
+ + ((serialize_ || wcf_) ? "#endif\n" : "")
  + "using System.Runtime.Serialization;\n";
 }
 
@@ -903,7 +903,10 @@ void t_csharp_generator::generate_csharp_wcffault(ostream& 
out, t_struct* tstruc
 
   // make private members with public Properties
   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
-indent(out) << "private " << declare_field(*m_iter, false, "_") << endl;
+// if the field is requied, then we use auto-properties
+if (!field_is_required((*m_iter)) && (!nullable_ || 
field_has_default((*m_iter {
+  indent(out) << "private " << declare_field(*m_iter, false, "_") << endl;
+}
   }
   out << endl;
 
@@ -1475,7 +1478,7 @@ void 
t_csharp_generator::generate_sync_service_interface(t_service* tservice) {
   generate_csharp_doc(f_service_, tservice);
 
   if (wcf_) {
-indent(f_service_) << "[ServiceContract(Namespace=\"" << wcf_namespace_ << 
"\")]" << endl;
+indent(f_service_) << "[System.ServiceModel.ServiceContract(Namespace=\"" 
<< wcf_namespace_ << "\")]" << endl;
   }
   indent(f_service_) << "public interface ISync" << extends_iface << " {" << 
endl;
 
@@ -1487,12 +1490,12 @@ void 
t_csharp_generator::generate_sync_service_interface(t_service* tservice) {
 
 // if we're using WCF, add the corresponding attributes
 if (wcf_) {
-  indent(f_service_) << "[OperationContract]" << endl;
+  indent(f_service_) << "[System.ServiceModel.OperationContract]" << endl;
 
   const std::vector& xceptions = 
(*f_iter)->get_xceptions()->get_members();
   vector::const_iterator x_iter;
   for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
-indent(f_service_) << "[FaultContract(typeof("
+indent(f_service_) << "[System.ServiceModel.FaultContract(typeof("
   + type_name((*x_iter)->get_type(), false, false) + "Fault))]" << 
endl;
   }
 }
@@ -1514,7 +1517,7 @@ void 
t_csharp_generator::generate_async_service_interface(t_service* tservice) {
   generate_csharp_doc(f_service_, tservice);
 
   if (wcf_) {
-indent(f_service_) << "[ServiceContract(Namespace=\"" << wcf_namespace_ << 
"\")]" << endl;
+indent(f_service_) << "[System.ServiceModel.ServiceContract(Namespace=\"" 
<< wcf_namespace_ << "\")]" << endl;
   }
   indent(f_service_) << "public interface IAsync" << extends_iface << " {" << 
endl;
 
@@ -1526,12 +1529,12 @@ void 
t_csharp_generator::generate_async_service_interface(t_service* tservice) {
 
 // if we're using WCF, add the corresponding attributes
 if (wcf_) {
-  indent(f_service_) << "[OperationContract]" << endl;
+  indent(f_service_) << "[System.ServiceMo

[thrift] branch master updated: THRIFT-3143: Add nodets support

2018-11-29 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 2c69b5a  THRIFT-3143: Add nodets support
2c69b5a is described below

commit 2c69b5a01e589c19855a00b68596d0564bb2bb5b
Author: wilfrem 
AuthorDate: Mon Apr 20 19:24:50 2015 +0900

THRIFT-3143: Add nodets support

Co-authored-by: Mustafa Senol Cosar 
---
 Makefile.am|   2 +-
 compiler/cpp/src/thrift/generate/t_js_generator.cc | 151 +--
 configure.ac   |  18 ++
 lib/Makefile.am|   1 +
 lib/nodets/.gitignore  |   1 +
 lib/nodets/Makefile.am |  45 
 lib/nodets/coding_standards.md |   1 +
 lib/nodets/test/client.ts  |  63 +
 lib/nodets/test/runClient.sh   |  18 ++
 lib/nodets/test/runServer.sh   |  20 ++
 lib/nodets/test/server.ts  |  26 ++
 lib/nodets/test/test-cases.ts  | 113 
 lib/nodets/test/testAll.sh |  38 +++
 lib/nodets/test/test_driver.ts | 278 +++
 lib/nodets/test/test_handler.ts| 299 +
 lib/nodets/test/tsconfig.json  |  22 ++
 package-lock.json  |  18 ++
 package.json   |   6 +-
 test/ThriftTest.thrift |   2 +-
 test/known_failures_Linux.json |   3 +
 test/tests.json|  27 ++
 21 files changed, 1130 insertions(+), 22 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cdb8bd2..511452d 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,7 +54,7 @@ empty :=
 space := $(empty) $(empty)
 comma := ,
 
-CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_CL@ @MAYBE_D@ @MAYBE_JAVA@ 
@MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ 
@MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ 
@MAYBE_LUA@ @MAYBE_RS@ @MAYBE_DOTNETCORE@
+CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_CL@ @MAYBE_D@ @MAYBE_JAVA@ 
@MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ 
@MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ 
@MAYBE_LUA@ @MAYBE_RS@ @MAYBE_DOTNETCORE@ @MAYBE_NODETS@
 CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
 
 if WITH_PY3
diff --git a/compiler/cpp/src/thrift/generate/t_js_generator.cc 
b/compiler/cpp/src/thrift/generate/t_js_generator.cc
index 840168e..61782b9 100644
--- a/compiler/cpp/src/thrift/generate/t_js_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_js_generator.cc
@@ -64,7 +64,7 @@ public:
 
 bool with_ns_ = false;
 
-for( iter = parsed_options.begin(); iter != parsed_options.end(); ++iter) {
+for (iter = parsed_options.begin(); iter != parsed_options.end(); ++iter) {
   if( iter->first.compare("node") == 0) {
 gen_node_ = true;
   } else if( iter->first.compare("jquery") == 0) {
@@ -80,10 +80,6 @@ public:
   }
 }
 
-if (gen_node_ && gen_ts_) {
-  throw "Invalid switch: [-gen js:node,ts] options not compatible";
-}
-
 if (gen_es6_ && gen_jquery_) {
   throw "Invalid switch: [-gen js:es6,jquery] options not compatible";
 }
@@ -203,6 +199,7 @@ public:
*/
 
   std::string js_includes();
+  std::string ts_includes();
   std::string render_includes();
   std::string declare_field(t_field* tfield, bool init = false, bool obj = 
false);
   std::string function_signature(t_function* tfunction,
@@ -285,7 +282,7 @@ public:
* TypeScript Definition File helper functions
*/
 
-  string ts_function_signature(t_function* tfunction, bool include_callback);
+  string ts_function_signature(t_function* tfunction, bool include_callback, 
bool optional_callback);
   string ts_get_type(t_type* type);
 
   /**
@@ -302,11 +299,11 @@ public:
   string ts_declare() { return (ts_module_.empty() ? "declare " : ""); }
 
   /**
-   * Returns "?" if the given field is optional.
+   * Returns "?" if the given field is optional or has a default value.
* @param t_field The field to check
* @return string
*/
-  string ts_get_req(t_field* field) { return (field->get_req() == 
t_field::T_OPTIONAL ? "?" : ""); }
+  string ts_get_req(t_field* field) {return (field->get_req() == 
t_field::T_OPTIONAL || field->get_value() != NULL ? "?" : ""); }
 
   /**
* Returns the documentation, if the provided documentable object has one.
@@ -415,7 +4

[thrift] branch master updated: THRIFT-4656: Fix infinite loop in PHP TCurlClient

2018-12-05 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 30d3125  THRIFT-4656: Fix infinite loop in PHP TCurlClient
30d3125 is described below

commit 30d3125cc277b6e42034d5ac72fd3e5f248f353a
Author: Josip Sokcevic 
AuthorDate: Tue Oct 30 15:20:26 2018 -0700

THRIFT-4656: Fix infinite loop in PHP TCurlClient

Infinite loop happens when response body is empty and HTTP status is
200. This patch fixes it.
---
 lib/php/lib/Transport/TCurlClient.php | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/lib/php/lib/Transport/TCurlClient.php 
b/lib/php/lib/Transport/TCurlClient.php
index 3d4908d..482b43b 100644
--- a/lib/php/lib/Transport/TCurlClient.php
+++ b/lib/php/lib/Transport/TCurlClient.php
@@ -170,6 +170,24 @@ class TCurlClient extends TTransport
 }
 
 /**
+ * Guarantees that the full amount of data is read. Since TCurlClient gets 
entire payload at
+ * once, parent readAll cannot be used.
+ *
+ * @return string The data, of exact length
+ * @throws TTransportException if cannot read data
+ */
+public function readAll($len)
+{
+$data = $this->read($len);
+
+if (TStringFuncFactory::create()->strlen($data) !== $len) {
+throw new TTransportException('TCurlClient could not read '.$len.' 
bytes');
+}
+
+return $data;
+}
+
+/**
  * Writes some data into the pending buffer
  *
  * @param string $buf The data to write



[thrift] branch master updated: Fix warning: catching polymorphic type ‘class std::runtime_error’ by value

2018-12-05 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 17a9cff  Fix warning: catching polymorphic type ‘class 
std::runtime_error’ by value
17a9cff is described below

commit 17a9cffabb746f7dc481a5af9d8a1aeeda537fb6
Author: proller 
AuthorDate: Wed Dec 5 19:11:20 2018 +0300

Fix warning: catching polymorphic type ‘class std::runtime_error’ by value

../contrib/thrift/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp:902:35: 
warning: catching polymorphic type ‘class std::runtime_error’ by value 
[-Wcatch-value=]
   } catch (std::runtime_error e) {
   ^
../contrib/thrift/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp:915:33: 
warning: catching polymorphic type ‘class std::runtime_error’ by value 
[-Wcatch-value=]
 } catch (std::runtime_error e) {
 ^
---
 lib/cpp/src/thrift/protocol/TJSONProtocol.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp 
b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index a49a148..80def7f 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -899,7 +899,7 @@ uint32_t TJSONProtocol::readJSONDouble(double& num) {
   }
   try {
 num = fromString(str);
-  } catch (std::runtime_error e) {
+  } catch (std::runtime_error& e) {
 throw TProtocolException(TProtocolException::INVALID_DATA,
  "Expected numeric value; got \"" + str + 
"\"");
   }
@@ -912,7 +912,7 @@ uint32_t TJSONProtocol::readJSONDouble(double& num) {
 result += readJSONNumericChars(str);
 try {
   num = fromString(str);
-} catch (std::runtime_error e) {
+} catch (std::runtime_error& e) {
   throw TProtocolException(TProtocolException::INVALID_DATA,
"Expected numeric value; got \"" + str + 
"\"");
 }



[thrift] branch master updated: THRIFT-4676: Fix intermittent CL build failures

2018-12-05 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 54e9587  THRIFT-4676: Fix intermittent CL build failures
54e9587 is described below

commit 54e9587117595d3ecbde1bf8065dc09197808bdb
Author: Allen George 
AuthorDate: Fri Nov 30 15:06:44 2018 -0500

THRIFT-4676: Fix intermittent CL build failures
---
 .gitignore |  9 ++
 tutorial/cl/Makefile.am| 36 --
 tutorial/cl/ensure-externals.sh|  1 +
 ...make-tutorial-server.lisp => load-locally.lisp} | 19 
 tutorial/cl/make-tutorial-client.lisp  |  2 +-
 tutorial/cl/make-tutorial-server.lisp  |  2 +-
 6 files changed, 45 insertions(+), 24 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0e7eedc..b7f7b45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -339,8 +339,17 @@ project.lock.json
 /test/rs/target/
 /test/rs/*.iml
 /test/rs/**/*.iml
+/lib/cl/backport-update.zip
+/lib/cl/lib
+/tutorial/cl/quicklisp.lisp
+/tutorial/cl/externals/
+/tutorial/cl/quicklisp/
 /tutorial/cl/TutorialClient
 /tutorial/cl/TutorialServer
+/tutorial/cl/backport-update.zip
+/tutorial/cl/lib/
+/tutorial/cl/shared-implementation.fasl
+/tutorial/cl/tutorial-implementation.fasl
 /tutorial/cpp/TutorialClient
 /tutorial/cpp/TutorialServer
 /tutorial/c_glib/tutorial_client
diff --git a/tutorial/cl/Makefile.am b/tutorial/cl/Makefile.am
index fb6e83a..2b2013a 100755
--- a/tutorial/cl/Makefile.am
+++ b/tutorial/cl/Makefile.am
@@ -15,19 +15,30 @@
 # KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
+
+setup-local-lisp-env: ensure-externals.sh
+   bash ensure-externals.sh
 
 gen-cl: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen cl -r $<
 
-TutorialServer: make-tutorial-server.lisp
-   $(SBCL) --script make-tutorial-server.lisp
+ALL_FILE_PREREQS = \
+  load-locally.lisp \
+  make-tutorial-server.lisp \
+  make-tutorial-client.lisp \
+  shared-implementation.lisp \
+  thrift-tutorial.asd \
+  tutorial-implementation.lisp
 
-TutorialClient: make-tutorial-client.lisp
+# NOTE: the server and client cannot be built in parallel
+# because on loading the make-tutorial-* scripts SBCL will
+# attempt to compile their dependencies. Unfortunately,
+# because their dependencies are shared, parallel jobs can
+# end up overwriting or corrupting the compiled files
+all-local: gen-cl setup-local-lisp-env $(ALL_FILE_PREREQS)
+   $(SBCL) --script make-tutorial-server.lisp
$(SBCL) --script make-tutorial-client.lisp
 
-all-local: gen-cl TutorialClient TutorialServer
-
 tutorialserver: all
./TutorialServer
 
@@ -35,9 +46,16 @@ tutorialclient: all
./TutorialClient
 
 clean-local:
-   $(RM) -r gen-*
-   $(RM) TutorialServer
-   $(RM) TutorialClient
+   -$(RM) -r gen-*
+   -$(RM) -r externals
+   -$(RM) -r quicklisp
+   -$(RM) -r lib
+   -$(RM) quicklisp.lisp
+   -$(RM) backport-update.zip
+   -$(RM) shared-implementation.fasl
+   -$(RM) tutorial-implementation.fasl
+   -$(RM) TutorialServer
+   -$(RM) TutorialClient
 
 EXTRA_DIST = \
tutorial-implementation.lisp \
diff --git a/tutorial/cl/ensure-externals.sh b/tutorial/cl/ensure-externals.sh
new file mode 12
index 000..5ae8c56
--- /dev/null
+++ b/tutorial/cl/ensure-externals.sh
@@ -0,0 +1 @@
+../../lib/cl/ensure-externals.sh
\ No newline at end of file
diff --git a/tutorial/cl/make-tutorial-server.lisp 
b/tutorial/cl/load-locally.lisp
similarity index 51%
copy from tutorial/cl/make-tutorial-server.lisp
copy to tutorial/cl/load-locally.lisp
index 5621ff3..b52a0a2 100644
--- a/tutorial/cl/make-tutorial-server.lisp
+++ b/tutorial/cl/load-locally.lisp
@@ -12,18 +12,11 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 
-(require "asdf")
-(load (merge-pathnames "../../lib/cl/load-locally.lisp" *load-truename*))
-(asdf:load-system :net.didierverna.clon)
-(asdf:load-asd (merge-pathnames "gen-cl/shared/thrift-gen-shared.asd" 
*load-truename*))
-(asdf:load-asd (merge-pathnames "gen-cl/tutorial/thrift-gen-tutorial.asd" 
*load-truename*))
-(asdf:load-asd (merge-pathnames "thrift-tutorial.asd" *load-truename*))
-(asdf:load-system :thrift-tutorial)
-
-(net.didierverna.clon:nickname-package)
+ Just a script for loading the library itself, using bundled dependencies.
+ This is an identical copy of the file in lib/cl.
 
-(defun main ()
-  "Entry point for the binary."
-  (thrift:serve #u"thrift:

[thrift] branch master updated: THRIFT-4679: Remove unused variable declaration

2018-12-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 208a048  THRIFT-4679: Remove unused variable declaration
208a048 is described below

commit 208a048dc440036bd5304a6fd16e32fda33b4600
Author: griffinmichl 
AuthorDate: Fri Dec 7 10:47:35 2018 -0800

THRIFT-4679: Remove unused variable declaration
---
 lib/nodejs/lib/thrift/json_protocol.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/nodejs/lib/thrift/json_protocol.js 
b/lib/nodejs/lib/thrift/json_protocol.js
index d960be9..727a3b2 100644
--- a/lib/nodejs/lib/thrift/json_protocol.js
+++ b/lib/nodejs/lib/thrift/json_protocol.js
@@ -18,7 +18,6 @@
  */
 
 var Int64 = require('node-int64');
-var InputBufferUnderrunError = require('./transport').InputBufferUnderrunError;
 var Thrift = require('./thrift');
 var Type = Thrift.Type;
 var util = require("util");



[thrift] branch master updated: Fix hs-nodets test and re-enable it

2018-12-03 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new dd965c1  Fix hs-nodets test and re-enable it
dd965c1 is described below

commit dd965c1eb437e0067009492b0d18b1d3f8e79d07
Author: Mustafa Senol Cosar 
AuthorDate: Fri Nov 30 20:02:00 2018 +0300

Fix hs-nodets test and re-enable it
---
 lib/nodets/test/client.ts  | 2 +-
 test/known_failures_Linux.json | 1 -
 test/tests.json| 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/nodets/test/client.ts b/lib/nodets/test/client.ts
index eb3db79..4fa3c28 100644
--- a/lib/nodets/test/client.ts
+++ b/lib/nodets/test/client.ts
@@ -56,7 +56,7 @@ runTests();
 function runTests() {
   testDriver(client, function (status: string) {
 console.log(status);
-connection.end();
+process.exit(0);
   });
 }
 
diff --git a/test/known_failures_Linux.json b/test/known_failures_Linux.json
index 6d3a05e..1ab2af5 100644
--- a/test/known_failures_Linux.json
+++ b/test/known_failures_Linux.json
@@ -321,7 +321,6 @@
   "hs-csharp_binary_framed-ip",
   "hs-csharp_compact_buffered-ip",
   "hs-csharp_compact_framed-ip",
-  "hs-nodets_binary_buffered-ip",
   "nodejs-cpp_binary_http-domain",
   "nodejs-cpp_binary_http-ip",
   "nodejs-cpp_binary_http-ip-ssl",
diff --git a/test/tests.json b/test/tests.json
index b70dbd8..43d6ded 100644
--- a/test/tests.json
+++ b/test/tests.json
@@ -730,7 +730,7 @@
   ]
 },
 "client": {
-  "timeout": 5,
+  "timeout": 6,
   "command": [
 "runClient.sh"
   ]



[thrift] branch master updated: Fix build compiler with cmake

2018-12-10 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 9c3d2d6  Fix build compiler with cmake
9c3d2d6 is described below

commit 9c3d2d6c0ac6805fdb52cff582067a9cb6863caf
Author: louyl 
AuthorDate: Mon Dec 10 17:20:07 2018 +0800

Fix build compiler with cmake
---
 compiler/cpp/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index e618877..0df790e 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -113,7 +113,7 @@ THRIFT_ADD_COMPILER(xml "Enable compiler for XML" ON)
 # we also add the current binary directory for generated files
 include_directories(${CMAKE_CURRENT_BINARY_DIR} src)
 
-if(NOT ${WITH_PLUGIN})
+if(NOT DEFINED WITH_PLUGIN OR NOT ${WITH_PLUGIN})
 list(APPEND thrift-compiler_SOURCES ${compiler_core})
 endif()
 



[thrift] branch master updated: THRIFT-4671 handle client's unexpected close.

2018-11-23 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 7abb7d5  THRIFT-4671 handle client's unexpected close.
7abb7d5 is described below

commit 7abb7d5fbc700db2338719bc88b7f4b10304942b
Author: lixiasong 
AuthorDate: Fri Nov 23 09:17:57 2018 +0800

THRIFT-4671 handle client's unexpected close.

handle client's unexpected close. Avoid the server work thread falling into 
dead loop because :
1. the function return result from INT32 coverts to UINT32 ;
2. the condition in line 482 "ftype == T_STOP" will never be satisfied when 
the client socket closed before sending data to server.
---
 lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c 
b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
index 1433725..8296a8c 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
@@ -465,7 +465,7 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType 
type, GError **error)
   }
 case T_STRUCT:
   {
-guint32 result = 0;
+gint32 result = 0;
 gchar *name;
 gint16 fid;
 ThriftType ftype;
@@ -475,6 +475,10 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType 
type, GError **error)
 {
   result += thrift_protocol_read_field_begin (protocol, , ,
   , error);
+  if (result < 0)
+  {
+return result;  
+  }
   if (ftype == T_STOP)
   {
 break;
@@ -487,7 +491,7 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType 
type, GError **error)
   }
 case T_SET:
   {
-guint32 result = 0;
+gint32 result = 0;
 ThriftType elem_type;
 guint32 i, size;
 result += thrift_protocol_read_set_begin (protocol, _type, ,
@@ -501,7 +505,7 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType 
type, GError **error)
   }
 case T_MAP:
   {
-guint32 result = 0;
+gint32 result = 0;
 ThriftType elem_type;
 ThriftType key_type;
 guint32 i, size;
@@ -517,7 +521,7 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType 
type, GError **error)
   }
 case T_LIST:
   {
-guint32 result = 0;
+gint32 result = 0;
 ThriftType elem_type;
 guint32 i, size;
 result += thrift_protocol_read_list_begin (protocol, _type, ,



[thrift] branch master updated: THRIFT-4674 Added stream context support for PHP THttpClient

2018-11-27 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 7f0fa6c  THRIFT-4674 Added stream context support for PHP THttpClient
7f0fa6c is described below

commit 7f0fa6c21ec225aebbbc563607646124279e557c
Author: Efimov Evgenij 
AuthorDate: Fri Nov 23 10:57:42 2018 +0300

THRIFT-4674 Added stream context support for PHP THttpClient
---
 lib/php/lib/Transport/THttpClient.php | 25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/lib/php/lib/Transport/THttpClient.php 
b/lib/php/lib/Transport/THttpClient.php
index a89794b..0158809 100644
--- a/lib/php/lib/Transport/THttpClient.php
+++ b/lib/php/lib/Transport/THttpClient.php
@@ -89,13 +89,22 @@ class THttpClient extends TTransport
 protected $headers_;
 
 /**
+ * Context additional options
+ *
+ * @var array
+ */
+protected $context_;
+
+/**
  * Make a new HTTP client.
  *
  * @param string $host
- * @param int $port
+ * @param int$port
  * @param string $uri
+ * @param string $scheme
+ * @param array  $context
  */
-public function __construct($host, $port = 80, $uri = '', $scheme = 'http')
+public function __construct($host, $port = 80, $uri = '', $scheme = 
'http', array $context = array())
 {
 if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != 
'/')) {
 $uri = '/' . $uri;
@@ -108,6 +117,7 @@ class THttpClient extends TTransport
 $this->handle_ = null;
 $this->timeout_ = null;
 $this->headers_ = array();
+$this->context_ = $context;
 }
 
 /**
@@ -211,16 +221,21 @@ class THttpClient extends TTransport
 $headers[] = "$key: $value";
 }
 
-$options = array('method' => 'POST',
+$options = $this->context_;
+
+$baseHttpOptions = isset($options["http"]) ? $options["http"] : 
array();
+
+$httpOptions = $baseHttpOptions + array('method' => 'POST',
 'header' => implode("\r\n", $headers),
 'max_redirects' => 1,
 'content' => $this->buf_);
 if ($this->timeout_ > 0) {
-$options['timeout'] = $this->timeout_;
+$httpOptions['timeout'] = $this->timeout_;
 }
 $this->buf_ = '';
 
-$contextid = stream_context_create(array('http' => $options));
+$options["http"] = $httpOptions;
+$contextid = stream_context_create($options);
 $this->handle_ = @fopen(
 $this->scheme_ . '://' . $host . $this->uri_,
 'r',



[thrift] branch master updated: THRIFT-4668: make socket backlog configurable for python2 Client: py

2018-11-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 7af79c8  THRIFT-4668: make socket backlog configurable for python2 
Client: py
7af79c8 is described below

commit 7af79c83591ddf289abaeacc7f0e97af7397f825
Author: lshgdut 
AuthorDate: Wed Nov 21 10:09:42 2018 +0800

THRIFT-4668: make socket backlog configurable for python2
Client: py
---
 lib/py/src/transport/TSocket.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/py/src/transport/TSocket.py b/lib/py/src/transport/TSocket.py
index c91de9d..a7d6617 100644
--- a/lib/py/src/transport/TSocket.py
+++ b/lib/py/src/transport/TSocket.py
@@ -159,6 +159,15 @@ class TServerSocket(TSocketBase, TServerTransportBase):
 self._unix_socket = unix_socket
 self._socket_family = socket_family
 self.handle = None
+self._backlog = 128
+
+def setBacklog(self, backlog=None):
+if not self.handle:
+self._backlog = backlog
+else:
+# We cann't update backlog when it is already listening, since the
+# handle has been created.
+logger.warn('You have to set backlog before listen.')
 
 def listen(self):
 res0 = self._resolveAddr()
@@ -183,7 +192,7 @@ class TServerSocket(TSocketBase, TServerTransportBase):
 if hasattr(self.handle, 'settimeout'):
 self.handle.settimeout(None)
 self.handle.bind(res[4])
-self.handle.listen(128)
+self.handle.listen(self._backlog)
 
 def accept(self):
 client, addr = self.handle.accept()



[thrift] branch master updated: THRIFT-4670: Twisted, slots, and void method fails with "object has no attribute 'success'"

2018-11-22 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 5112afc  THRIFT-4670: Twisted, slots, and void method fails with 
"object has no attribute 'success'"
5112afc is described below

commit 5112afcc9732381401435b7134a18aab30d4dec9
Author: Palmer Cox 
AuthorDate: Wed Nov 21 15:00:37 2018 -0500

THRIFT-4670: Twisted, slots, and void method fails with "object has no 
attribute 'success'"

For a void method, there is no success value, so, it is an error to
attempt to assign one to the result object. This error is harmless
unless slots is also specified - with slots specified, the attempt to
assign to a non-existent field causes an error which makes the service
method fail.

Client: py
---
 compiler/cpp/src/thrift/generate/t_py_generator.cc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/cpp/src/thrift/generate/t_py_generator.cc 
b/compiler/cpp/src/thrift/generate/t_py_generator.cc
index 9c82b6c..f0a153c 100644
--- a/compiler/cpp/src/thrift/generate/t_py_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_py_generator.cc
@@ -1961,8 +1961,10 @@ void 
t_py_generator::generate_process_function(t_service* tservice, t_function*
   indent(f_service_) << "def write_results_success_" << 
tfunction->get_name()
  << "(self, success, result, seqid, oprot):" << endl;
   indent_up();
-  f_service_ << indent() << "result.success = success" << endl
- << indent() << "oprot.writeMessageBegin(\"" << 
tfunction->get_name()
+  if (!tfunction->get_returntype()->is_void()) {
+f_service_ << indent() << "result.success = success" << endl;
+  }
+  f_service_ << indent() << "oprot.writeMessageBegin(\"" << 
tfunction->get_name()
  << "\", TMessageType.REPLY, seqid)" << endl
  << indent() << "result.write(oprot)" << endl
  << indent() << "oprot.writeMessageEnd()" << endl



[thrift] branch master updated: THRIFT-4666: Attempt to work around dlang client pool test failure

2018-11-19 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new aa177ea  THRIFT-4666: Attempt to work around dlang client pool test 
failure
aa177ea is described below

commit aa177ea4b30b2fe2711ced7b79cfd5947711146f
Author: Allen George 
AuthorDate: Sat Nov 17 18:23:05 2018 -0500

THRIFT-4666: Attempt to work around dlang client pool test failure
---
 lib/d/test/client_pool_test.d | 42 ++
 1 file changed, 34 insertions(+), 8 deletions(-)

diff --git a/lib/d/test/client_pool_test.d b/lib/d/test/client_pool_test.d
index 52207d9..b24c97a 100644
--- a/lib/d/test/client_pool_test.d
+++ b/lib/d/test/client_pool_test.d
@@ -18,6 +18,7 @@
  */
 module client_pool_test;
 
+import core.sync.semaphore : Semaphore;
 import core.time : Duration, dur;
 import core.thread : Thread;
 import std.algorithm;
@@ -28,6 +29,7 @@ import std.getopt;
 import std.range;
 import std.stdio;
 import std.typecons;
+import std.variant : Variant;
 import thrift.base;
 import thrift.async.libevent;
 import thrift.async.socket;
@@ -37,9 +39,12 @@ import thrift.codegen.async_client_pool;
 import thrift.codegen.client;
 import thrift.codegen.client_pool;
 import thrift.codegen.processor;
+import thrift.protocol.base;
 import thrift.protocol.binary;
+import thrift.server.base;
 import thrift.server.simple;
 import thrift.server.transport.socket;
+import thrift.transport.base;
 import thrift.transport.buffered;
 import thrift.transport.socket;
 import thrift.util.cancellation;
@@ -108,11 +113,29 @@ private:
   }
 }
 
+class ServerPreServeHandler : TServerEventHandler {
+  this(Semaphore sem) {
+sem_ = sem;
+  }
+
+  override void preServe() {
+sem_.notify();
+  }
+
+  Variant createContext(TProtocol input, TProtocol output) { return 
Variant.init; }
+  void deleteContext(Variant serverContext, TProtocol input, TProtocol output) 
{}
+  void preProcess(Variant serverContext, TTransport transport) {}
+
+private:
+  Semaphore sem_;
+}
+
 class ServerThread : Thread {
-  this(ExTestHandler handler, TCancellation cancellation) {
+  this(ExTestHandler handler, ServerPreServeHandler serverHandler, 
TCancellation cancellation) {
 super();
 handler_ = handler;
 cancellation_ = cancellation;
+serverHandler_ = serverHandler;
   }
 private:
   void run() {
@@ -123,16 +146,17 @@ private:
   serverTransport.recvTimeout = dur!"seconds"(3);
   auto transportFactory = new TBufferedTransportFactory;
 
-  auto server = new TSimpleServer(
-processor, serverTransport, transportFactory, protocolFactory);
+  auto server = new TSimpleServer(processor, serverTransport, 
transportFactory, protocolFactory);
+  server.eventHandler = serverHandler_;
   server.serve(cancellation_);
 } catch (Exception e) {
   writefln("Server thread on port %s failed: %s", handler_.port, e);
 }
   }
 
-  TCancellation cancellation_;
   ExTestHandler handler_;
+  ServerPreServeHandler serverHandler_;
+  TCancellation cancellation_;
 }
 
 void main(string[] args) {
@@ -145,6 +169,9 @@ void main(string[] args) {
 
   immutable ports = cast(immutable)array(map!"cast(ushort)a"(iota(port, port + 
6)));
 
+  // semaphore that will be incremented whenever each server thread has bound 
and started listening
+  Semaphore sem = new Semaphore(0);
+
 version (none) {
   // Cannot use this due to multiple DMD @@BUG@@s:
   // 1. »function D main is a nested function and cannot be accessed from 
array«
@@ -174,11 +201,10 @@ version (none) {
 }
 
   // Fire up the server threads.
-  foreach (h; handlers) (new ServerThread(h, serverCancellation)).start();
+  foreach (h; handlers) (new ServerThread(h, new ServerPreServeHandler(sem), 
serverCancellation)).start();
 
-  // Give the servers some time to get up. This should really be accomplished
-  // via a barrier here and in the preServe() hook.
-  Thread.sleep(dur!"msecs"(10));
+  // wait until all the handlers signal that they're ready to serve
+  foreach (h; handlers) (sem.wait(dur!`seconds`(1)));
 
   syncClientPoolTest(ports, handlers);
   asyncClientPoolTest(ports, handlers);



[thrift] 01/01: Merge remote-tracking branch 'origin/0.2.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 795d3477d59c9c346e05cd825dc48778cd9fa70b
Merge: e824efc e76f226
Author: James E. King III 
AuthorDate: Tue Jan 8 10:26:52 2019 -0500

Merge remote-tracking branch 'origin/0.2.x'




[thrift] 03/03: Merge remote-tracking branch 'origin/0.8.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit d54824acbd2efe399846eba426186c1d8c2020b8
Merge: 66ba505 be691f4
Author: James E. King III 
AuthorDate: Tue Jan 8 14:37:08 2019 -0500

Merge remote-tracking branch 'origin/0.8.x'




[thrift] 01/03: Merge remote-tracking branch 'origin/0.6.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 88dc0dfa37850563c9d58960d31f98f15ec8511b
Merge: 792de73 5a53060
Author: James E. King III 
AuthorDate: Tue Jan 8 14:34:57 2019 -0500

Merge remote-tracking branch 'origin/0.6.x'




[thrift] 02/03: Merge remote-tracking branch 'origin/0.7.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 66ba505f4792d11de35de1f7ba1cf07a1ffa49d6
Merge: 88dc0df 69bba6e
Author: James E. King III 
AuthorDate: Tue Jan 8 14:36:17 2019 -0500

Merge remote-tracking branch 'origin/0.7.x'




[thrift] branch master updated (792de73 -> d54824a)

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from 792de73  Merge remote-tracking branch 'origin/0.5.x'
 add 981240d  branch for the 0.6 release candidate
 add 68a59b2  merge in changes to CHANGES file
 add e22ff6d  chop the -dev off all version numbers
 add 9601735  merge in THRIFT-1033 from trunk
 add 5baba45  update the changes file
 add eb1e6f7  THRIFT-1032. make dist fails due to c_glib problem
 add 3d60f81  update CHANGES file
 add 923e453  Fix haskell-related bug in the 0.6.x branch for RC1; make 
sure trunk receives the same patch.
 add 38b6574  THRIFT-1038. java: Generated Java code for structures 
containing binary fields (or collections thereof) are not serializable (in the 
Java sense) even though they implement java.io.Serializable
 add 68634a0  merge changes for 0.6 rc2
 add c760098  THRIFT-1112. java: Maven deploy support
 add 1735a73  THRIFT-1074. .keystore and .truststore are missing from the 
0.6.0 distribution
 add 2511cdc  adjust version number to 0.6.1
 add 65e7544  Thrift-1131: C# JSON Protocol is unable to decode escaped 
characters in string Client lib: csharp Patch: Maciek Weksej
 add b46cbbf  Thrift-363: Maven Deploy Patch: jfarrell Client lib: java
 add 11676ad  Thrift-1109: Deploy fb303 along side libthrift to maven repo 
patch: jfarrell client: contrib fb303 java depends on: Thrift-363
 add 209d6dc  Thrift-1133: Java and JavaScript tutorial is broken since we 
have Java maven deployment patch: jfarrell client: js
 add 3ecea50  Adding java build.properties file to the exported files list.
 add 5a53060  Updating CHANGES for 0.6.1.
 new 88dc0df  Merge remote-tracking branch 'origin/0.6.x'
 add f32d13a  Branching for 0.7 release
 add 7ac3d72  Changes updates and configure.ac version for 0.7.0
 add be81e01  Updating version number to 0.7.0 for clients
 add ea3b570  updating 0.7 changes for a missing ticket
 add aac3484  adding missing comma in thrift.js client
 add 69bba6e  Updating python setup.py for deploying client to pypi
 new 66ba505  Merge remote-tracking branch 'origin/0.7.x'
 add c303ab8  Initial branch for the 0.8.x release
 add 48d2e64  Updating versioning to 0.8.0.
 add be691f4  Updating CHANGES for 0.8.0 release
 new d54824a  Merge remote-tracking branch 'origin/0.8.x'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:



[thrift] 02/03: Merge remote-tracking branch 'origin/0.4.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit c70aca4fbba61bb7ed839ffcfda1c3cabc435c9e
Merge: 6b87ca4 1b7729f
Author: James E. King III 
AuthorDate: Tue Jan 8 14:29:02 2019 -0500

Merge remote-tracking branch 'origin/0.4.x'




[thrift] branch master updated (795d347 -> 792de73)

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from 795d347  Merge remote-tracking branch 'origin/0.2.x'
 add b405edb  cut a branch for preparing for the 0.3.0 release
 add b9b7048  bump some version numbers to where they belong
 add fe55e75  THRIFT-373. Include js and as3 libraries in release tarballs
 add 910cd83  Merge in THRIFT-784 and THRIFT-646
 add 0851779  THRIFT-799. Files missing proper Apache license header
 add d08e302  Renaming release 0.3.0 branch "0.3.x" to match convention
 add b8ca398  add apache license to TFieldIdEnum.java
 add 15c9877  add apache license header to TestTBinaryProtocol.java
 add fb3e147  add some more missing licenses
 add dcdd550  add ASL to handful of files
 add 51d1a50  Add ASL to Thrift.sln
 add 04345ad  add rat_exclude file that contains patterns RAT should ignore
 add 4d88150  Fix the NOTICE file
 add 2f5e776  Thrift now a TLP - INFRA-3116
 new 6b87ca4  Merge remote-tracking branch 'origin/0.3.x'
 add 088e42e  branching to prep 0.4 for release
 add d26ef49  THRIFT-247. Commit files missing from r985031
 add 2acb33c  change version in configure.ac from 0.4.0-dev to 0.4.0
 add 38e1ba3  update the changes file
 add 48fa172  Update the NOTICE file
 add 0c4f88a  revert THRIFT-682, since it doesn't build anywhere, 
apparently.
 add 1b7729f  Thrift now a TLP - INFRA-3116
 new c70aca4f Merge remote-tracking branch 'origin/0.4.x'
 add 51099cc  Branching trunk to 0.5.x to prepare for release.
 add 0b483e1  fix version and rubygem version
 add 7f7795d  THRIFT-939. java:  optional binary fields throw NPE on 
default byte[] getters
 add e25771d  Thrift now a TLP - INFRA-3116
 new 792de73  Merge remote-tracking branch 'origin/0.5.x'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:



[thrift] 03/03: Merge remote-tracking branch 'origin/0.5.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 792de73ae64f8b175d4720b80f842661d55b6e4a
Merge: c70aca4f e25771d
Author: James E. King III 
AuthorDate: Tue Jan 8 14:29:40 2019 -0500

Merge remote-tracking branch 'origin/0.5.x'




[thrift] 01/03: Merge remote-tracking branch 'origin/0.3.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 6b87ca45c048b4d9362c4d0168e029a7cd1c6805
Merge: 795d347 2f5e776
Author: James E. King III 
AuthorDate: Tue Jan 8 14:15:41 2019 -0500

Merge remote-tracking branch 'origin/0.3.x'




[thrift] branch master updated (d54824a -> a5df390)

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from d54824a  Merge remote-tracking branch 'origin/0.8.x'
 add dddc5df  Initial branch for the 0.9.x release
 add c6c01f2  Updating CHANGES and versioning for 0.9.0 release.
 add 1a15f7c  Thrift-1643:Denial of Service attack in 
TBinaryProtocol.readString Client: java Patch: Niraj Tolia
 add 352a50e  Thrift-1743: Add Composer.json for Thrift 0.9.x release 
Client: PHP Patch: Xavier HAUSHERR
 new a7e587b  Merge remote-tracking branch 'origin/0.9.x'
 add ff980c1  0.9.1 versioning and CHANGES
 add 9c929c8  THRIFT-1743: Add composer.json for new Symfony 2.1 Dependency 
Manager
 new 9e84ec0  Merge remote-tracking branch 'origin/0.9.1'
 add 591e20f  Thrift-2600: 0.9.2 release client: release patch: jfarrell
 new 04d6d02  Merge remote-tracking branch 'origin/0.9.2'
 add 53dd398  THRIFT-2805: 0.9.3 release client: release Patch: jfarrell
 new 9313fbe  Merge remote-tracking branch 'origin/0.9.3'
 add b2a4d4a  THRIFT-3775: 0.10.0 release Client: release Patch: jfarrell
 add 858809f  THRIFT-4546: Fix broken packagist.org
 new 803bc50  Merge remote-tracking branch 'origin/0.10.0'
 add 1c7bf3e  THRIFT-4398 Update EXTRA_DIST for "make dist" Client: Build 
process Patch: Jens Geyer
 add 1310dc1  Version 0.11.0
 add fc0ff81  THRIFT-3580 THeader for Haskell Client: hs
 add 327ebb6  Version 0.11.0
 add 0d8da22  THRIFT-4546: Fix broken packagist.org
 new a5df390  Merge remote-tracking branch 'origin/0.11.0'

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build/docker/old/debian-jessie/Dockerfile | 1 +
 contrib/thrift-maven-plugin/pom.xml   | 8 
 contrib/thrift.spec   | 2 ++
 3 files changed, 7 insertions(+), 4 deletions(-)



[thrift] 05/06: Merge remote-tracking branch 'origin/0.10.0'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 803bc50b979d15033caa8670b4fb2266616bd9d8
Merge: 9313fbe 858809f
Author: James E. King III 
AuthorDate: Tue Jan 8 14:48:21 2019 -0500

Merge remote-tracking branch 'origin/0.10.0'

 build/docker/old/debian-jessie/Dockerfile | 1 +
 contrib/thrift-maven-plugin/pom.xml   | 8 
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --cc build/docker/old/debian-jessie/Dockerfile
index 7bc74fc,000..941b4bb
mode 100644,00..100644
--- a/build/docker/old/debian-jessie/Dockerfile
+++ b/build/docker/old/debian-jessie/Dockerfile
@@@ -1,204 -1,0 +1,205 @@@
 +# Licensed under the Apache License, Version 2.0 (the "License");
 +# you may not use this file except in compliance with the License.
 +# You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +# Apache Thrift Docker build environment for Debian
 +#
 +# Known missing client libraries:
 +#  - dotnetcore
 +#  - rust
 +
 +FROM buildpack-deps:jessie-scm
 +MAINTAINER Apache Thrift 
 +
 +ENV DEBIAN_FRONTEND noninteractive
 +
 +# Add apt sources
 +# jessie-backports for cmake and some ruby bits
 +RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > 
/etc/apt/sources.list.d/jessie-backports.list
 +
 +# Dart
 +RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add 
- && \
 +curl 
https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
 > /etc/apt/sources.list.d/dart_stable.list && \
 +sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# General dependencies` \
 +  bison \
 +  build-essential \
 +  clang \
 +  debhelper \
 +  flex \
 +  pkg-config && \
 +apt-get -t jessie-backports install -y --no-install-recommends cmake
 +
 +RUN apt-get install -y --no-install-recommends \
 +`# C++ dependencies` \
 +  libboost-dev \
 +  libboost-filesystem-dev \
 +  libboost-program-options-dev \
 +  libboost-system-dev \
 +  libboost-test-dev \
 +  libboost-thread-dev \
 +  libevent-dev \
 +  libssl-dev \
 +  qt5-default \
 +  qtbase5-dev \
 +  qtbase5-dev-tools
 +
 +RUN apt-get install -y --no-install-recommends \
 +`# Java dependencies` \
 +  ant \
 +  ant-optional \
 +  openjdk-7-jdk \
 +  maven
 +
 +RUN apt-get install -y --no-install-recommends \
 +`# Python dependencies` \
 +  python-all \
 +  python-all-dbg \
 +  python-all-dev \
 +  python-pip \
 +  python-setuptools \
 +  python-twisted \
 +  python-zope.interface \
 +  python3-all \
 +  python3-all-dbg \
 +  python3-all-dev \
 +  python3-setuptools \
 +  python3-pip
 +
 +RUN apt-get install -y --no-install-recommends \
 +`# Ruby dependencies` \
 +  ruby \
++  ruby-bundler \
 +  ruby-dev \
 +`# Perl dependencies` \
 +  libbit-vector-perl \
 +  libclass-accessor-class-perl \
 +  libcrypt-ssleay-perl \
 +  libio-socket-ssl-perl \
 +  libnet-ssleay-perl
 +
 +RUN apt-get -t jessie-backports install -y ruby-bundler
 +RUN apt-get install -y --no-install-recommends \
 +`# Php dependencies` \
 +  php5 \
 +  php5-dev \
 +  php5-cli \
 +  php-pear \
 +  re2c \
 +  phpunit \
 +`# GlibC dependencies` \
 +  libglib2.0-dev
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# Erlang dependencies` \
 +  erlang-base \
 +  erlang-eunit \
 +  erlang-dev \
 +  erlang-tools \
 +  rebar
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# Haskell dependencies` \
 +  ghc \
 +  cabal-install \
 +`# Haxe dependencies` \
 +  neko \
 +  neko-dev \
 +  libneko0
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# Node.js dependencies` \
 +  nodejs \
 +  nodejs-dev \
 +  nodejs-legacy \
 +  npm
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# CSharp dependencies` \
 +  libmono-system-web2.0-cil \
 +  mono-devel
 +
 +RUN apt-get update && apt-get install -y --no-install-recommends \
 +`# D dependencies` \
 +  xdg-utils \
 +`# Dart dependencies` \
 +  dart \
 +`# Lua dependencies` \
 +  lua5.2 \
 +  lua5.2-dev \
 +`# MinGW dependencies` \
 +  mingw32 \

[thrift] 01/06: Merge remote-tracking branch 'origin/0.9.x'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit a7e587b17920f5ba7eea6e6b79fa493055f8524f
Merge: d54824a 352a50e
Author: James E. King III 
AuthorDate: Tue Jan 8 14:38:37 2019 -0500

Merge remote-tracking branch 'origin/0.9.x'




[thrift] 03/06: Merge remote-tracking branch 'origin/0.9.2'

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 04d6d02624e346e9197fe4538f8d37d588808e05
Merge: 9e84ec0 591e20f
Author: James E. King III 
AuthorDate: Tue Jan 8 14:43:23 2019 -0500

Merge remote-tracking branch 'origin/0.9.2'




[thrift] branch master updated (e824efc -> 795d347)

2019-01-08 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from e824efc  add/move a couple build related tools around
 add ada549f  Branching for 0.2 release
 add 72a1a88  THRIFT-642. Release notes in NEWS file for 0.2.0
 add e76f226  Thrift now a TLP - INFRA-3116
 new 795d347  Merge remote-tracking branch 'origin/0.2.x'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:



[thrift] branch master updated: automatize the double rendering test

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new caf7da9  automatize the double rendering test
caf7da9 is described below

commit caf7da976755694ee2a905cc8b85e36852f87558
Author: Ozan Can Altiok 
AuthorDate: Mon Jan 7 14:14:11 2019 +0300

automatize the double rendering test
---
 lib/js/Gruntfile.js|  3 ++-
 lib/js/test/test-double-rendering.html |  6 +++---
 lib/js/test/test-double-rendering.js   | 22 ++
 3 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/lib/js/Gruntfile.js b/lib/js/Gruntfile.js
index bb7691a..b32a016 100644
--- a/lib/js/Gruntfile.js
+++ b/lib/js/Gruntfile.js
@@ -270,7 +270,7 @@ module.exports = function(grunt) {
 
   grunt.registerTask('installAndGenerate', [
 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
-'shell:ThriftGenDeepConstructor',
+'shell:ThriftGenDeepConstructor', 'shell:ThriftGenDoubleConstants',
 'shell:InstallTestLibs',
   ]);
 
@@ -282,6 +282,7 @@ module.exports = function(grunt) {
 'wait',
 'qunit:ThriftDeepConstructor',
 'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
+'qunit:ThriftJS_DoubleRendering',
 'qunit:ThriftWS',
 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
 'qunit:ThriftWSES6',
diff --git a/lib/js/test/test-double-rendering.html 
b/lib/js/test/test-double-rendering.html
index 240cb39..7a430a5 100644
--- a/lib/js/test/test-double-rendering.html
+++ b/lib/js/test/test-double-rendering.html
@@ -29,11 +29,11 @@
   
 
   
-  
+  
 
   
-  
-  
+  
+  
 
   
   
diff --git a/lib/js/test/test-double-rendering.js 
b/lib/js/test/test-double-rendering.js
index b4b79b8..1790c1b 100644
--- a/lib/js/test/test-double-rendering.js
+++ b/lib/js/test/test-double-rendering.js
@@ -20,29 +20,11 @@
 
 /*
  * JavaScript test suite for double constants inside
- * DebugProtoTest.thrift. These tests will run against Normal (-gen js)
+ * DoubleConstantsTest.thrift. These tests will run against Normal (-gen js)
  * Apache Thrift interfaces.
  *
- * Synchronous blocking calls should be identical in both
- * Normal and jQuery interfaces. All synchronous tests belong
- * here.
- *
- * Asynchronous success callbacks passed as the last parameter
- * of an RPC call should be identical in both Normal and jQuery
- * interfaces. Async success tests belong here.
- *
- * Asynchronous exception processing is different in Normal
- * and jQuery interfaces. Such tests belong in the test-nojq.js
- * or test-jq.js files respectively. jQuery specific XHR object
- * tests also belong in test-jq.js. Do not create any jQuery
- * dependencies in this file or in test-nojq.js
- *
  * To compile client code for this test use:
- *  $ thrift -gen js ThriftTest.thrift
- *  $ thrift -gen js DebugProtoTest.thrift
- *
- * See also:
- * ++ test-nojq.js for "-gen js" only tests
+ *  $ thrift -gen js DoubleConstantsTest.thrift
  */
 
 // double assertion threshold



[thrift] 06/22: remove boost::thread and boost::mutex code

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit c109e019790a87ef1f874dfac3482ac45a57d3ab
Author: cyy 
AuthorDate: Sat Jan 5 13:45:07 2019 +0800

remove boost::thread and boost::mutex code
---
 .travis.yml|   2 +-
 build/cmake/DefineOptions.cmake|   7 +-
 build/cmake/DefinePlatformSpecifc.cmake|   4 +-
 build/cmake/README-MSYS2.md|   2 +-
 build/cmake/README.md  |   2 +-
 build/cmake/config.h.in|   3 -
 build/wincpp/build-thrift.bat  |   1 -
 configure.ac   |  18 --
 contrib/transport-sample/ThriftCommon.h|   2 -
 lib/cpp/CMakeLists.txt |   9 +-
 lib/cpp/Makefile.am|   7 -
 lib/cpp/src/thrift/concurrency/BoostMonitor.cpp| 214 -
 lib/cpp/src/thrift/concurrency/BoostMutex.cpp  |  73 ---
 .../src/thrift/concurrency/BoostThreadFactory.cpp  | 162 
 .../src/thrift/concurrency/BoostThreadFactory.h|  63 --
 .../src/thrift/concurrency/PlatformThreadFactory.h |   8 +-
 lib/cpp/src/thrift/concurrency/Thread.h|  11 +-
 lib/cpp/src/thrift/server/TNonblockingServer.cpp   |   2 +-
 lib/cpp/src/thrift/windows/TWinsockSingleton.cpp   |  10 -
 lib/cpp/src/thrift/windows/TWinsockSingleton.h |  12 --
 lib/cpp/src/thrift/windows/config.h|   3 -
 lib/cpp/test/CMakeLists.txt|   2 +-
 lib/cpp/test/Makefile.am   |   2 -
 lib/cpp/test/TNonblockingSSLServerTest.cpp |   2 +-
 lib/cpp/test/TNonblockingServerTest.cpp|   2 +-
 lib/cpp/test/concurrency/ThreadManagerTests.h  |   8 +-
 26 files changed, 19 insertions(+), 612 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e09b8a4..96e0b51 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -142,7 +142,7 @@ jobs:
 - JOB="C++98 (Boost Thread)"
 - SCRIPT="cmake.sh"
 - BUILD_LIBS="CPP TESTING TUTORIALS"
-- BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON 
-DCMAKE_CXX_EXTENSIONS=OFF --DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF 
-DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
+- BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON 
-DCMAKE_CXX_EXTENSIONS=OFF -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF 
-DWITH_HASKELL=OFF"
 - BUILD_ENV="-e CC=clang -e CXX=clang++"
 
 - script: build/docker/run.sh
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index f419229..43b73e4 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -88,9 +88,7 @@ if(WITH_CPP)
 find_package(OpenSSL QUIET)
 CMAKE_DEPENDENT_OPTION(WITH_OPENSSL "Build with OpenSSL support" ON
"OPENSSL_FOUND" OFF)
-option(WITH_STDTHREADS "Build with C++ std::thread support" OFF)
-CMAKE_DEPENDENT_OPTION(WITH_BOOSTTHREADS "Build with Boost threads 
support" OFF
-"NOT WITH_STDTHREADS;Boost_FOUND" OFF)
+option(WITH_STDTHREADS "Build with C++ std::thread support" ON)
 endif()
 CMAKE_DEPENDENT_OPTION(BUILD_CPP "Build C++ library" ON
"BUILD_LIBRARIES;WITH_CPP;Boost_FOUND" OFF)
@@ -107,7 +105,7 @@ CMAKE_DEPENDENT_OPTION(BUILD_C_GLIB "Build C (GLib) 
library" ON
 
 if(BUILD_CPP)
 set(boost_components)
-if(WITH_BOOSTTHREADS OR BUILD_TESTING)
+if(BUILD_TESTING)
 list(APPEND boost_components system thread)
 endif()
 if(BUILD_TESTING)
@@ -206,7 +204,6 @@ message(STATUS " Library features:")
 message(STATUS "  Build shared libraries: 
${WITH_SHARED_LIB}")
 message(STATUS "  Build static libraries: 
${WITH_STATIC_LIB}")
 message(STATUS "  Build with Boost static link library:   
${WITH_BOOST_STATIC}")
-message(STATUS "  Build with Boost thread support:
${WITH_BOOSTTHREADS}")
 message(STATUS "  Build with boost/tr1/functional (forced)
${WITH_BOOST_FUNCTIONAL}")
 message(STATUS "  Build with boost/smart_ptr (forced) 
${WITH_BOOST_SMART_PTR}")
 message(STATUS "  Build with C++ std::thread support: 
${WITH_STDTHREADS}")
diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index 626f5e5..cbd5ca8 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -90,9 +90,7 @@ add_definitions("-D__STDC_FORMAT_MACROS")
 add_definitions("-D__STDC_LI

[thrift] 12/22: remove stdcxx namespace and use std directly

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit d65e91c47613e54eb0c2bf521ae2cd4242d58ed9
Author: cyy 
AuthorDate: Sat Jan 5 16:43:55 2019 +0800

remove stdcxx namespace and use std directly
---
 contrib/zeromq/TZmqServer.h | 5 +++--
 lib/cpp/Makefile.am | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/zeromq/TZmqServer.h b/contrib/zeromq/TZmqServer.h
index 43f86c0..ecd13b4 100644
--- a/contrib/zeromq/TZmqServer.h
+++ b/contrib/zeromq/TZmqServer.h
@@ -20,6 +20,7 @@
 #ifndef _THRIFT_SERVER_TZMQSERVER_H_
 #define _THRIFT_SERVER_TZMQSERVER_H_ 1
 
+#include 
 #include 
 #include 
 
@@ -28,7 +29,7 @@ namespace apache { namespace thrift { namespace server {
 class TZmqServer : public TServer {
  public:
   TZmqServer(
-  apache::thrift::stdcxx::shared_ptr processor,
+  std::shared_ptr processor,
   zmq::context_t& ctx, const std::string& endpoint, int type)
 : TServer(processor)
 , processor_(processor)
@@ -56,7 +57,7 @@ class TZmqServer : public TServer {
   }
 
  private:
-  apache::thrift::stdcxx::shared_ptr processor_;
+  std::shared_ptr processor_;
   int zmq_type_;
   zmq::socket_t sock_;
 };
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 11d6b05..85bb9ab 100755
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -159,7 +159,6 @@ include_thrift_HEADERS = \
  src/thrift/TApplicationException.h \
  src/thrift/TLogging.h \
  src/thrift/TToString.h \
- src/thrift/stdcxx.h \
  src/thrift/TBase.h
 
 include_concurrencydir = $(include_thriftdir)/concurrency



[thrift] 17/22: replace boost static_assert with static_assert

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 7007506960437a51fad46a2426ebadee50b7817f
Author: cyy 
AuthorDate: Sun Jan 6 10:12:45 2019 +0800

replace boost static_assert with static_assert
---
 lib/cpp/src/thrift/protocol/TBase64Utils.cpp | 2 --
 lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc  | 8 
 lib/cpp/src/thrift/protocol/TCompactProtocol.tcc | 8 
 lib/cpp/src/thrift/protocol/TDebugProtocol.cpp   | 1 -
 lib/cpp/src/thrift/protocol/THeaderProtocol.cpp  | 1 -
 lib/cpp/src/thrift/protocol/TProtocol.h  | 3 +--
 6 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/lib/cpp/src/thrift/protocol/TBase64Utils.cpp 
b/lib/cpp/src/thrift/protocol/TBase64Utils.cpp
index beb76eb..7474f5a 100644
--- a/lib/cpp/src/thrift/protocol/TBase64Utils.cpp
+++ b/lib/cpp/src/thrift/protocol/TBase64Utils.cpp
@@ -19,8 +19,6 @@
 
 #include 
 
-#include 
-
 using std::string;
 
 namespace apache {
diff --git a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc 
b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
index d6f6dbb..902ef98 100644
--- a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
@@ -165,8 +165,8 @@ uint32_t TBinaryProtocolT::writeI64(const int64_t i64) {
 
 template 
 uint32_t TBinaryProtocolT::writeDouble(const double 
dub) {
-  BOOST_STATIC_ASSERT(sizeof(double) == sizeof(uint64_t));
-  BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t));
+  static_assert(std::numeric_limits::is_iec559);
 
   uint64_t bits = bitwise_cast(dub);
   bits = ByteOrder_::toWire64(bits);
@@ -388,8 +388,8 @@ uint32_t TBinaryProtocolT::readI64(int64_t& i64) {
 
 template 
 uint32_t TBinaryProtocolT::readDouble(double& dub) {
-  BOOST_STATIC_ASSERT(sizeof(double) == sizeof(uint64_t));
-  BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t));
+  static_assert(std::numeric_limits::is_iec559);
 
   union bytes {
 uint8_t b[8];
diff --git a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc 
b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
index d40c331..2b8207a 100644
--- a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
@@ -253,8 +253,8 @@ uint32_t TCompactProtocolT::writeI64(const 
int64_t i64) {
  */
 template 
 uint32_t TCompactProtocolT::writeDouble(const double dub) {
-  BOOST_STATIC_ASSERT(sizeof(double) == sizeof(uint64_t));
-  BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t));
+  static_assert(std::numeric_limits::is_iec559);
 
   uint64_t bits = bitwise_cast(dub);
   bits = THRIFT_htolell(bits);
@@ -653,8 +653,8 @@ uint32_t TCompactProtocolT::readI64(int64_t& 
i64) {
  */
 template 
 uint32_t TCompactProtocolT::readDouble(double& dub) {
-  BOOST_STATIC_ASSERT(sizeof(double) == sizeof(uint64_t));
-  BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t));
+  static_assert(std::numeric_limits::is_iec559);
 
   union {
 uint64_t bits;
diff --git a/lib/cpp/src/thrift/protocol/TDebugProtocol.cpp 
b/lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
index d3c6beb..0e6d4a2 100644
--- a/lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TDebugProtocol.cpp
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using std::string;
 
diff --git a/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp 
b/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
index a19d545..6242e30 100644
--- a/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/THeaderProtocol.cpp
@@ -26,7 +26,6 @@
 
 #include 
 
-#include 
 #include 
 
 namespace apache {
diff --git a/lib/cpp/src/thrift/protocol/TProtocol.h 
b/lib/cpp/src/thrift/protocol/TProtocol.h
index 28e1bb7..746973d 100644
--- a/lib/cpp/src/thrift/protocol/TProtocol.h
+++ b/lib/cpp/src/thrift/protocol/TProtocol.h
@@ -29,7 +29,6 @@
 #include 
 
 #include 
-#include 
 
 #ifdef HAVE_NETINET_IN_H
 #include 
@@ -48,7 +47,7 @@
 // 
http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
 template 
 static inline To bitwise_cast(From from) {
-  BOOST_STATIC_ASSERT(sizeof(From) == sizeof(To));
+  static_assert(sizeof(From) == sizeof(To));
 
   // BAD!!!  These are all broken with -O2.
   //return *reinterpret_cast();  // BAD!!!



[thrift] 04/22: force c++11 in GNU autotools

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 0705d9956750b9d61d763c8d8e38bb98e86870eb
Author: cyy 
AuthorDate: Sat Jan 5 10:52:48 2019 +0800

force c++11 in GNU autotools
---
 configure.ac | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index e04891f..9885e1b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -102,10 +102,7 @@ AC_PROG_AWK
 AC_PROG_RANLIB
 
 AC_LANG([C++])
-AX_CXX_COMPILE_STDCXX_11([noext], [optional])
-if test "$ac_success" = "no"; then
-  CXXFLAGS="$CXXFLAGS -Wno-variadic-macros -Wno-long-long -Wno-c++11-long-long"
-fi
+AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
 
 AM_EXTRA_RECURSIVE_TARGETS([style])
 AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or 
-iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec 
clang-format -i {} \;')



[thrift] 09/22: remove boost smart ptr

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 9f837bbfb4c61ad8afe80950b6ce677a5cd39aeb
Author: cyy 
AuthorDate: Sat Jan 5 14:49:24 2019 +0800

remove boost smart ptr
---
 build/cmake/DefineOptions.cmake |  6 -
 build/cmake/DefinePlatformSpecifc.cmake |  2 --
 lib/cpp/src/thrift/stdcxx.h | 39 +++--
 3 files changed, 8 insertions(+), 39 deletions(-)

diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 43b73e4..7465c80 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -45,11 +45,6 @@ if (WITH_BOOST_FUNCTIONAL)
 add_definitions(-DFORCE_BOOST_FUNCTIONAL)
 endif()
 
-option(WITH_BOOST_SMART_PTR "Use boost/smart_ptr.hpp even under C++11 or 
later" OFF)
-if (WITH_BOOST_SMART_PTR)
-add_definitions(-DFORCE_BOOST_SMART_PTR)
-endif()
-
 option(WITH_BOOST_STATIC "Build with Boost static link library" OFF)
 set(Boost_USE_STATIC_LIBS ${WITH_BOOST_STATIC})
 if (NOT WITH_BOOST_STATIC)
@@ -205,7 +200,6 @@ message(STATUS "  Build shared libraries:   
  ${WITH_SHARED_LIB}
 message(STATUS "  Build static libraries: 
${WITH_STATIC_LIB}")
 message(STATUS "  Build with Boost static link library:   
${WITH_BOOST_STATIC}")
 message(STATUS "  Build with boost/tr1/functional (forced)
${WITH_BOOST_FUNCTIONAL}")
-message(STATUS "  Build with boost/smart_ptr (forced) 
${WITH_BOOST_SMART_PTR}")
 message(STATUS "  Build with C++ std::thread support: 
${WITH_STDTHREADS}")
 message(STATUS "  Build with libevent support:
${WITH_LIBEVENT}")
 message(STATUS "  Build with OpenSSL support: ${WITH_OPENSSL}")
diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index cbd5ca8..98fb589 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -125,7 +125,5 @@ if (WITH_PLUGIN)
   if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION 
VERSION_LESS "4.8")
 message(SEND_ERROR "Thrift compiler plug-in support is not possible with 
older gcc ( < 4.8 ) compiler")
   endif()
-  message(STATUS "Forcing use of boost::smart_ptr to build WITH_PLUGIN")
-  add_definitions("-DFORCE_BOOST_SMART_PTR=1")
 endif()
 
diff --git a/lib/cpp/src/thrift/stdcxx.h b/lib/cpp/src/thrift/stdcxx.h
index c8cabf5..1a65f87 100644
--- a/lib/cpp/src/thrift/stdcxx.h
+++ b/lib/cpp/src/thrift/stdcxx.h
@@ -87,42 +87,19 @@
 //
 ///
 
-// We can use std for memory functions only if the compiler supports template 
aliasing
-// The macro BOOST_NO_CXX11_SMART_PTR is defined as 1 under Visual Studio 2010 
and 2012
-// which do not support the feature, so we must continue to use C++98 and 
boost on them.
-// We cannot use __cplusplus to detect this either, since Microsoft advertises 
an older one.
-
-#if defined(BOOST_NO_CXX11_SMART_PTR) || (defined(_MSC_VER) && _MSC_VER < 
1800) || defined(FORCE_BOOST_SMART_PTR)
-#include 
-#else
 #include 
-#endif
 
 namespace apache { namespace thrift { namespace stdcxx {
 
-#if defined(BOOST_NO_CXX11_SMART_PTR) || (defined(_MSC_VER) && _MSC_VER < 
1800) || defined(FORCE_BOOST_SMART_PTR)
-
-  using ::boost::const_pointer_cast;
-  using ::boost::dynamic_pointer_cast;
-  using ::boost::enable_shared_from_this;
-  using ::boost::make_shared;
-  using ::boost::scoped_ptr;
-  using ::boost::shared_ptr;
-  using ::boost::static_pointer_cast;
-  using ::boost::weak_ptr;
+using ::std::const_pointer_cast;
+using ::std::dynamic_pointer_cast;
+using ::std::enable_shared_from_this;
+using ::std::make_shared;
+template  using scoped_ptr = std::unique_ptr;   // 
compiler must support template aliasing
+using ::std::shared_ptr;
+using ::std::static_pointer_cast;
+using ::std::weak_ptr;
 
-#else
-
-  using ::std::const_pointer_cast;
-  using ::std::dynamic_pointer_cast;
-  using ::std::enable_shared_from_this;
-  using ::std::make_shared;
-  template  using scoped_ptr = std::unique_ptr; // 
compiler must support template aliasing
-  using ::std::shared_ptr;
-  using ::std::static_pointer_cast;
-  using ::std::weak_ptr;
-
-#endif
 
 }}} // apache::thrift::stdcxx
 



[thrift] 02/22: use noexcept instead of throw() in library

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 7b935597bac2336c7f4d282069ab4d78ca473543
Author: cyy 
AuthorDate: Sat Jan 5 10:04:25 2019 +0800

use noexcept instead of throw() in library
---
 lib/cpp/src/thrift/TApplicationException.h   |  4 ++--
 lib/cpp/src/thrift/Thrift.h  |  4 ++--
 lib/cpp/src/thrift/protocol/TProtocolException.h |  4 ++--
 lib/cpp/src/thrift/transport/TSSLSocket.cpp  |  6 +++---
 lib/cpp/src/thrift/transport/TSSLSocket.h| 14 +++---
 lib/cpp/src/thrift/transport/TTransportException.cpp |  2 +-
 lib/cpp/src/thrift/transport/TTransportException.h   |  6 +++---
 lib/cpp/src/thrift/transport/TZlibTransport.h|  2 +-
 8 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lib/cpp/src/thrift/TApplicationException.h 
b/lib/cpp/src/thrift/TApplicationException.h
index 81d9424..60618fb 100644
--- a/lib/cpp/src/thrift/TApplicationException.h
+++ b/lib/cpp/src/thrift/TApplicationException.h
@@ -57,7 +57,7 @@ public:
   TApplicationException(TApplicationExceptionType type, const std::string& 
message)
 : TException(message), type_(type) {}
 
-  virtual ~TApplicationException() throw() {}
+  virtual ~TApplicationException() noexcept {}
 
   /**
* Returns an error code that provides information about the type of error
@@ -67,7 +67,7 @@ public:
*/
   TApplicationExceptionType getType() const { return type_; }
 
-  virtual const char* what() const throw() {
+  virtual const char* what() const noexcept {
 if (message_.empty()) {
   switch (type_) {
   case UNKNOWN:
diff --git a/lib/cpp/src/thrift/Thrift.h b/lib/cpp/src/thrift/Thrift.h
index e8e70eb..b41d5d2 100644
--- a/lib/cpp/src/thrift/Thrift.h
+++ b/lib/cpp/src/thrift/Thrift.h
@@ -82,9 +82,9 @@ public:
 
   TException(const std::string& message) : message_(message) {}
 
-  virtual ~TException() throw() {}
+  virtual ~TException() noexcept {}
 
-  virtual const char* what() const throw() {
+  virtual const char* what() const noexcept {
 if (message_.empty()) {
   return "Default TException.";
 } else {
diff --git a/lib/cpp/src/thrift/protocol/TProtocolException.h 
b/lib/cpp/src/thrift/protocol/TProtocolException.h
index 6e536b4..10178e1 100644
--- a/lib/cpp/src/thrift/protocol/TProtocolException.h
+++ b/lib/cpp/src/thrift/protocol/TProtocolException.h
@@ -59,7 +59,7 @@ public:
   TProtocolException(TProtocolExceptionType type, const std::string& message)
 : apache::thrift::TException(message), type_(type) {}
 
-  virtual ~TProtocolException() throw() {}
+  virtual ~TProtocolException() noexcept {}
 
   /**
* Returns an error code that provides information about the type of error
@@ -69,7 +69,7 @@ public:
*/
   TProtocolExceptionType getType() const { return type_; }
 
-  virtual const char* what() const throw() {
+  virtual const char* what() const noexcept {
 if (message_.empty()) {
   switch (type_) {
   case UNKNOWN:
diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp 
b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
index 251ef2f..5f8a2c0 100644
--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
@@ -1046,14 +1046,14 @@ void buildErrors(string& errors, int errno_copy, int 
sslerrno) {
 /**
  * Default implementation of AccessManager
  */
-Decision DefaultClientAccessManager::verify(const sockaddr_storage& sa) 
throw() {
+Decision DefaultClientAccessManager::verify(const sockaddr_storage& sa) 
noexcept {
   (void)sa;
   return SKIP;
 }
 
 Decision DefaultClientAccessManager::verify(const string& host,
 const char* name,
-int size) throw() {
+int size) noexcept {
   if (host.empty() || name == NULL || size <= 0) {
 return SKIP;
   }
@@ -1062,7 +1062,7 @@ Decision DefaultClientAccessManager::verify(const string& 
host,
 
 Decision DefaultClientAccessManager::verify(const sockaddr_storage& sa,
 const char* data,
-int size) throw() {
+int size) noexcept {
   bool match = false;
   if (sa.ss_family == AF_INET && size == sizeof(in_addr)) {
 match = (memcmp(&((sockaddr_in*))->sin_addr, data, size) == 0);
diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.h 
b/lib/cpp/src/thrift/transport/TSSLSocket.h
index ec30cc1..d8fd77e 100644
--- a/lib/cpp/src/thrift/transport/TSSLSocket.h
+++ b/lib/cpp/src/thrift/transport/TSSLSocket.h
@@ -335,7 +335,7 @@ public:
   TSSLException(const std::string& message)
 : TTransportException(TTransportException::INTERNAL_ERROR, message) {}
 
-  virtual const char*

[thrift] 18/22: replace boost unique_ptr with std::unique_ptr

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 77d26e2e5c2f9624f6d4b5f20819448164a7ae1b
Author: cyy 
AuthorDate: Sun Jan 6 10:17:35 2019 +0800

replace boost unique_ptr with std::unique_ptr
---
 lib/cpp/src/thrift/transport/TFileTransport.cpp | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp 
b/lib/cpp/src/thrift/transport/TFileTransport.cpp
index c9f65b8..afb4411 100644
--- a/lib/cpp/src/thrift/transport/TFileTransport.cpp
+++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp
@@ -25,13 +25,6 @@
 #include 
 
 #include 
-#if (BOOST_VERSION >= 105700)
-#include 
-using boost::movelib::unique_ptr;
-#else
-#include 
-using boost::interprocess::unique_ptr;
-#endif
 
 #ifdef HAVE_SYS_TIME_H
 #include 
@@ -49,6 +42,7 @@ using boost::interprocess::unique_ptr;
 #include 
 #include 
 #include 
+#include 
 #ifdef HAVE_SYS_STAT_H
 #include 
 #endif
@@ -203,8 +197,6 @@ void TFileTransport::write(const uint8_t* buf, uint32_t 
len) {
   enqueueEvent(buf, len);
 }
 
-// this is needed until boost 1.57 as the older unique_ptr implementation
-// has no default deleter in interprocess
 template 
 struct uniqueDeleter
 {
@@ -228,7 +220,7 @@ void TFileTransport::enqueueEvent(const uint8_t* buf, 
uint32_t eventLen) {
 return;
   }
 
-  unique_ptr > toEnqueue(new eventInfo());
+  std::unique_ptr > toEnqueue(new 
eventInfo());
   toEnqueue->eventBuff_ = new uint8_t[(sizeof(uint8_t) * eventLen) + 4];
 
   // first 4 bytes is the event length



[thrift] 20/22: set c++11 in proper place

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 5e16f8b9086ce9bf4fa74993ecc51a7b9354f51e
Author: cyy 
AuthorDate: Sun Jan 6 10:49:20 2019 +0800

set c++11 in proper place
---
 build/cmake/DefineCMakeDefaults.cmake   | 17 +++--
 build/cmake/DefinePlatformSpecifc.cmake | 11 ---
 2 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/build/cmake/DefineCMakeDefaults.cmake 
b/build/cmake/DefineCMakeDefaults.cmake
index 65ccc69..93255e0 100644
--- a/build/cmake/DefineCMakeDefaults.cmake
+++ b/build/cmake/DefineCMakeDefaults.cmake
@@ -73,19 +73,16 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 # C++ Language Level Defaults - this depends on the compiler capabilities
 #
 if (NOT DEFINED CMAKE_CXX_STANDARD)
-  if (MSVC AND MSVC_VERSION LESS 1800)
-# MSVC 2012 and earlier don't support template aliases so you have to use 
C++98
-set(CMAKE_CXX_STANDARD 98) 
-message(STATUS "Setting C++98 as the default language level (for an older 
MSVC compiler).")
-  else()
-set(CMAKE_CXX_STANDARD 11) # C++11
-message(STATUS "Setting C++11 as the default language level.")
-  endif()
+  set(CMAKE_CXX_STANDARD 11) # C++11
+  message(STATUS "Setting C++11 as the default language level.")
   message(STATUS "To specify a different C++ language level, set 
CMAKE_CXX_STANDARD")
 endif()
 
-if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
-  set(CMAKE_CXX_STANDARD_REQUIRED OFF) # can degrade to C++98 if compiler does 
not support C++11
+if (CMAKE_CXX_STANDARD EQUAL 98)
+  message(FATAL_ERROR "only C++11 or above C++ standard is supported")
+elseif (CMAKE_CXX_STANDARD EQUAL 11)
+  # should not fallback to C++98
+  set(CMAKE_CXX_STANDARD_REQUIRED ON)
 endif()
 
 if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index 98fb589..3f112b6 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -95,17 +95,6 @@ if(WITH_STDTHREADS)
 endif()
 
 # C++ Language Level
-if (NOT CMAKE_CXX_STANDARD)
-  set(CMAKE_CXX_STANDARD 11)
-elseif (CMAKE_CXX_STANDARD EQUAL 98)
-  message(FATAL_ERROR "only C++11 or above C++ standard is supported")
-endif()
-
-if (CMAKE_CXX_STANDARD EQUAL 11)
-  # should not fallback to C++98
-  set(CMAKE_CXX_STANDARD_REQUIRED ON)
-endif()
-
 set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
 if (CMAKE_CXX_STANDARD_REQUIRED)
   string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must 
support it]")



[thrift] branch master updated (93e8ec2 -> 0140cbf)

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


from 93e8ec2  THRIFT-4726: Remove SLF4J Logging Guards
 new 3cf0667  force c++11 in cmake
 new 7b93559  use noexcept instead of throw() in library
 new e42cf50  use noexcept instead of throw() in compiler generated code
 new 0705d99  force c++11 in GNU autotools
 new 83b65f0  allow specifing CMAKE_CXX_STANDARD above c++11
 new c109e01  remove boost::thread and boost::mutex code
 new 2150a34  remove boost::thread in CI
 new f23e6a5  remove boost::thread in CI
 new 9f837bb  remove boost smart ptr
 new 52637b3  remove std tr1
 new 316723a  remove stdcxx namespace and use std directly
 new d65e91c  remove stdcxx namespace and use std directly
 new 8cb3b68  remove stdcxx namespace and use std directly
 new 0f43f95  revert noexcept changings
 new e9421b8  remove std tr1
 new 7f8aef7  replace boost::atomic with std::atomic
 new 7007506  replace boost static_assert with static_assert
 new 77d26e2  replace boost unique_ptr with std::unique_ptr
 new 863262d  add static_assert message
 new 5e16f8b  set c++11 in proper place
 new 1f34504  remove unused boost headers
 new 0140cbf  remove unused variables

The 22 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml|   8 -
 build/appveyor/cl_setenv.bat   |  11 +-
 build/cmake/DefineCMakeDefaults.cmake  |  17 +-
 build/cmake/DefineOptions.cmake|  19 +-
 build/cmake/DefinePlatformSpecifc.cmake|  13 +-
 build/cmake/README-MSYS2.md|   2 +-
 build/cmake/README.md  |   2 +-
 build/cmake/config.h.in|   3 -
 build/wincpp/build-thrift.bat  |   1 -
 .../cpp/src/thrift/generate/t_cpp_generator.cc | 118 ++--
 .../cpp/src/thrift/generate/t_erl_generator.cc |   2 -
 compiler/cpp/src/thrift/generate/t_go_generator.cc |   3 -
 compiler/cpp/src/thrift/generate/t_hs_generator.cc |   4 -
 compiler/cpp/src/thrift/generate/t_py_generator.cc |   2 -
 compiler/cpp/src/thrift/plugin/plugin.cc   |  29 +--
 compiler/cpp/src/thrift/plugin/plugin_output.cc|   7 +-
 configure.ac   |  23 +--
 contrib/transport-sample/ThriftCommon.h|   2 -
 contrib/zeromq/TZmqServer.cpp  |   2 +-
 contrib/zeromq/TZmqServer.h|   5 +-
 contrib/zeromq/test-client.cpp |   2 +-
 contrib/zeromq/test-receiver.cpp   |   2 +-
 contrib/zeromq/test-sender.cpp |   2 +-
 contrib/zeromq/test-server.cpp |   2 +-
 lib/c_glib/test/testbufferedtransport.c|   3 -
 lib/c_glib/test/testframedtransport.c  |   3 -
 lib/c_glib/test/testthrifttestclient.cpp   |  12 +-
 lib/c_glib/test/testtransportsocket.c  |   3 -
 lib/cpp/CMakeLists.txt |   9 +-
 lib/cpp/Makefile.am|   8 -
 lib/cpp/src/thrift/TApplicationException.h |   4 +-
 lib/cpp/src/thrift/TDispatchProcessor.h|   8 +-
 lib/cpp/src/thrift/TProcessor.h|  33 ++--
 lib/cpp/src/thrift/Thrift.h|   7 +-
 lib/cpp/src/thrift/async/TAsyncBufferProcessor.h   |   8 +-
 lib/cpp/src/thrift/async/TAsyncChannel.cpp |   5 +-
 lib/cpp/src/thrift/async/TAsyncChannel.h   |   5 +-
 lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h |  20 +-
 lib/cpp/src/thrift/async/TAsyncProcessor.h |  20 +-
 .../src/thrift/async/TAsyncProtocolProcessor.cpp   |  18 +-
 lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h |  18 +-
 .../src/thrift/async/TConcurrentClientSyncInfo.h   |   4 +-
 lib/cpp/src/thrift/async/TEvhttpClientChannel.h|   2 +-
 lib/cpp/src/thrift/async/TEvhttpServer.cpp |  19 +-
 lib/cpp/src/thrift/async/TEvhttpServer.h   |   8 +-
 lib/cpp/src/thrift/concurrency/BoostMonitor.cpp| 214 -
 lib/cpp/src/thrift/concurrency/BoostMutex.cpp  |  73 ---
 .../src/thrift/concurrency/BoostThreadFactory.cpp  | 162 
 .../src/thrift/concurrency/BoostThreadFactory.h|  63 --
 lib/cpp/src/thrift/concurrency/FunctionRunner.h|  18 +-
 lib/cpp/src/thrift/concurrency/Monitor.cpp |   8 +-
 lib/cpp/src/thrift/concurrency/Mutex.h |   6 +-
 .../src/thrift/concurrency/PlatformThreadFactory.h |   8 +-
 .../src/thrift/concurrency/PosixThreadFactory.cpp  |  26 +--
 .../sr

[thrift] 03/22: use noexcept instead of throw() in compiler generated code

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit e42cf5023e3fc7fddf7e6f897aa1fb7d4a090afc
Author: cyy 
AuthorDate: Sat Jan 5 10:05:48 2019 +0800

use noexcept instead of throw() in compiler generated code
---
 compiler/cpp/src/thrift/generate/t_cpp_generator.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc 
b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
index 3e8f728..0839302 100644
--- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
@@ -1097,7 +1097,7 @@ void 
t_cpp_generator::generate_struct_declaration(ostream& out,
   }
 
   if (tstruct->annotations_.find("final") == tstruct->annotations_.end()) {
-out << endl << indent() << "virtual ~" << tstruct->get_name() << "() 
throw();" << endl;
+out << endl << indent() << "virtual ~" << tstruct->get_name() << "() 
noexcept;" << endl;
   }
 
   // Declare all fields
@@ -1226,7 +1226,7 @@ void t_cpp_generator::generate_struct_definition(ostream& 
out,
   // Destructor
   if (tstruct->annotations_.find("final") == tstruct->annotations_.end()) {
 force_cpp_out << endl << indent() << tstruct->get_name() << "::~" << 
tstruct->get_name()
-  << "() throw() {" << endl;
+  << "() noexcept {" << endl;
 indent_up();
 
 indent_down();
@@ -1598,7 +1598,7 @@ void 
t_cpp_generator::generate_exception_what_method_decl(std::ostream& out,
   if (external) {
 out << tstruct->get_name() << "::";
   }
-  out << "what() const throw()";
+  out << "what() const noexcept";
 }
 
 namespace struct_ostream_operator_generator {



[thrift] 10/22: remove std tr1

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 52637b33aba090851436b2031476529423ea3281
Author: cyy 
AuthorDate: Sat Jan 5 15:11:17 2019 +0800

remove std tr1
---
 lib/cpp/src/thrift/stdcxx.h | 66 -
 1 file changed, 17 insertions(+), 49 deletions(-)

diff --git a/lib/cpp/src/thrift/stdcxx.h b/lib/cpp/src/thrift/stdcxx.h
index 1a65f87..20910de 100644
--- a/lib/cpp/src/thrift/stdcxx.h
+++ b/lib/cpp/src/thrift/stdcxx.h
@@ -29,57 +29,25 @@
 //
 ///
 
-#if defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || (defined(_MSC_VER) && _MSC_VER < 
1800) || defined(FORCE_BOOST_FUNCTIONAL)
-#if (BOOST_VERSION <= 106500)
-#include 
-#else
-#include 
-#endif
-#define _THRIFT_FUNCTIONAL_TR1_ 1
-#endif
+#include 
 
-#if _THRIFT_FUNCTIONAL_TR1_
-
-  namespace apache { namespace thrift { namespace stdcxx {
-
-using ::std::tr1::bind;
-using ::std::tr1::function;
-
-namespace placeholders {
-  using ::std::tr1::placeholders::_1;
-  using ::std::tr1::placeholders::_2;
-  using ::std::tr1::placeholders::_3;
-  using ::std::tr1::placeholders::_4;
-  using ::std::tr1::placeholders::_5;
-  using ::std::tr1::placeholders::_6;
-  using ::std::tr1::placeholders::_7;
-  using ::std::tr1::placeholders::_8;
-  using ::std::tr1::placeholders::_9;
-} // apache::thrift::stdcxx::placeholders
-  }}} // apache::thrift::stdcxx
-
-#else
-
-  #include 
-
-  namespace apache { namespace thrift { namespace stdcxx {
-using ::std::bind;
-using ::std::function;
-
-namespace placeholders {
-  using ::std::placeholders::_1;
-  using ::std::placeholders::_2;
-  using ::std::placeholders::_3;
-  using ::std::placeholders::_4;
-  using ::std::placeholders::_5;
-  using ::std::placeholders::_6;
-  using ::std::placeholders::_7;
-  using ::std::placeholders::_8;
-  using ::std::placeholders::_9;
-} // apache::thrift::stdcxx::placeholders
-  }}} // apache::thrift::stdcxx
+namespace apache { namespace thrift { namespace stdcxx {
+  using ::std::bind;
+  using ::std::function;
+
+  namespace placeholders {
+using ::std::placeholders::_1;
+using ::std::placeholders::_2;
+using ::std::placeholders::_3;
+using ::std::placeholders::_4;
+using ::std::placeholders::_5;
+using ::std::placeholders::_6;
+using ::std::placeholders::_7;
+using ::std::placeholders::_8;
+using ::std::placeholders::_9;
+  } // apache::thrift::stdcxx::placeholders
+}}} // apache::thrift::stdcxx
 
-#endif
 
 ///
 //



[thrift] 13/22: remove stdcxx namespace and use std directly

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 8cb3b6854818bf63d3208afaf4dc9e70c6137500
Author: cyy 
AuthorDate: Sat Jan 5 17:09:34 2019 +0800

remove stdcxx namespace and use std directly
---
 lib/cpp/src/thrift/concurrency/Monitor.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cpp/src/thrift/concurrency/Monitor.cpp 
b/lib/cpp/src/thrift/concurrency/Monitor.cpp
index 8e4ac79..9570cc6 100644
--- a/lib/cpp/src/thrift/concurrency/Monitor.cpp
+++ b/lib/cpp/src/thrift/concurrency/Monitor.cpp
@@ -34,7 +34,7 @@
 namespace apache {
 namespace thrift {
 
-using std::scoped_ptr;
+using std::unique_ptr;
 using std::shared_ptr;
 
 namespace concurrency {
@@ -163,7 +163,7 @@ private:
 }
   }
 
-  scoped_ptr ownedMutex_;
+  unique_ptr ownedMutex_;
   Mutex* mutex_;
 
   mutable pthread_cond_t pthread_cond_;



[thrift] 22/22: remove unused variables

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 0140cbf5674c5573d142c95c182f4ba98de99769
Author: cyy 
AuthorDate: Sun Jan 6 11:21:10 2019 +0800

remove unused variables
---
 compiler/cpp/src/thrift/generate/t_erl_generator.cc | 2 --
 compiler/cpp/src/thrift/generate/t_go_generator.cc  | 3 ---
 compiler/cpp/src/thrift/generate/t_hs_generator.cc  | 4 
 compiler/cpp/src/thrift/generate/t_py_generator.cc  | 2 --
 lib/c_glib/test/testbufferedtransport.c | 3 ---
 lib/c_glib/test/testframedtransport.c   | 3 ---
 lib/c_glib/test/testtransportsocket.c   | 3 ---
 lib/cpp/src/thrift/protocol/TJSONProtocol.cpp   | 1 -
 8 files changed, 21 deletions(-)

diff --git a/compiler/cpp/src/thrift/generate/t_erl_generator.cc 
b/compiler/cpp/src/thrift/generate/t_erl_generator.cc
index 587133f..12d91a7 100644
--- a/compiler/cpp/src/thrift/generate/t_erl_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_erl_generator.cc
@@ -415,7 +415,6 @@ const std::string emit_double_as_string(const double value) 
{
 }
 
 void t_erl_generator::generate_type_metadata(std::string function_name, 
vector names) {
-  vector::iterator s_iter;
   size_t num_structs = names.size();
 
   indent(f_types_file_) << function_name << "() ->\n";
@@ -947,7 +946,6 @@ void t_erl_generator::generate_service(t_service* tservice) 
{
 void t_erl_generator::generate_service_metadata(t_service* tservice) {
   export_string("function_names", 0);
   vector functions = tservice->get_functions();
-  vector::iterator f_iter;
   size_t num_functions = functions.size();
 
   indent(f_service_) << "function_names() -> " << endl;
diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc 
b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index 5ada4fa..ec16b87 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -2153,7 +2153,6 @@ void t_go_generator::generate_service_remote(t_service* 
tservice) {
  << (*f_iter)->get_name() << "(";
 t_struct* arg_struct = (*f_iter)->get_arglist();
 const std::vector& args = arg_struct->get_members();
-vector::const_iterator a_iter;
 std::vector::size_type num_args = args.size();
 bool first = true;
 
@@ -2308,7 +2307,6 @@ void t_go_generator::generate_service_remote(t_service* 
tservice) {
   for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
 t_struct* arg_struct = (*f_iter)->get_arglist();
 const std::vector& args = arg_struct->get_members();
-vector::const_iterator a_iter;
 std::vector::size_type num_args = args.size();
 string funcName((*f_iter)->get_name());
 string pubName(publicize(funcName));
@@ -2693,7 +2691,6 @@ void t_go_generator::generate_process_function(t_service* 
tservice, t_function*
 
   // t_struct* xs = tfunction->get_xceptions();
   // const std::vector& xceptions = xs->get_members();
-  vector::const_iterator x_iter;
   f_types_ << indent() << "type " << processorName << " struct {" << endl;
   f_types_ << indent() << "  handler " << publicize(tservice->get_name()) << 
endl;
   f_types_ << indent() << "}" << endl << endl;
diff --git a/compiler/cpp/src/thrift/generate/t_hs_generator.cc 
b/compiler/cpp/src/thrift/generate/t_hs_generator.cc
index ce7cd0c..8f6d4b0 100644
--- a/compiler/cpp/src/thrift/generate/t_hs_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_hs_generator.cc
@@ -590,7 +590,6 @@ void t_hs_generator::generate_hs_struct_arbitrary(ostream& 
out, t_struct* tstruc
   string tname = type_name(tstruct);
   string name = tstruct->get_name();
   const vector& members = tstruct->get_members();
-  vector::const_iterator m_iter;
 
   indent(out) << "instance QC.Arbitrary " << tname << " where " << endl;
   indent_up();
@@ -654,7 +653,6 @@ void t_hs_generator::generate_hs_struct_arbitrary(ostream& 
out, t_struct* tstruc
  */
 void t_hs_generator::generate_hs_struct_reader(ostream& out, t_struct* 
tstruct) {
   const vector& fields = tstruct->get_members();
-  vector::const_iterator f_iter;
 
   string sname = type_name(tstruct);
   string id = tmp("_id");
@@ -725,7 +723,6 @@ void t_hs_generator::generate_hs_struct_reader(ostream& 
out, t_struct* tstruct)
 void t_hs_generator::generate_hs_struct_writer(ostream& out, t_struct* 
tstruct) {
   string name = type_name(tstruct);
   const vector& fields = tstruct->get_sorted_members();
-  vector::const_iterator f_iter;
   string str = tmp("_str");
   string f = tmp("_f");
   s

[thrift] 01/22: force c++11 in cmake

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 3cf066708e29e8cef76102c82cb51e74dfdd0426
Author: root 
AuthorDate: Sat Jan 5 10:03:19 2019 +0800

force c++11 in cmake
---
 build/cmake/DefinePlatformSpecifc.cmake | 21 +++--
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index a809c07..e324f59 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -97,21 +97,14 @@ elseif(WITH_STDTHREADS)
 endif()
 
 # C++ Language Level
-set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
-if (CMAKE_CXX_STANDARD_REQUIRED)
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must 
support it]")
-else()
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [fallback to earlier 
if compiler does not support it]")
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES 
"Clang") AND NOT MINGW)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
 endif()
-if (CMAKE_CXX_EXTENSIONS)
-  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [with 
compiler-specific extensions]")
-else()
-  if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES 
"Clang") AND NOT MINGW)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros 
-Wno-long-long")
-  endif()
-  if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
-  endif()
+if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
 endif()
 
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")



[thrift] 05/22: allow specifing CMAKE_CXX_STANDARD above c++11

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 83b65f06fa380ed94669bdb461344f4f6b591191
Author: cyy 
AuthorDate: Sat Jan 5 11:06:50 2019 +0800

allow specifing CMAKE_CXX_STANDARD above c++11
---
 build/cmake/DefinePlatformSpecifc.cmake | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/build/cmake/DefinePlatformSpecifc.cmake 
b/build/cmake/DefinePlatformSpecifc.cmake
index e324f59..626f5e5 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -97,14 +97,25 @@ elseif(WITH_STDTHREADS)
 endif()
 
 # C++ Language Level
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)
-if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES 
"Clang") AND NOT MINGW)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long")
+if (NOT CMAKE_CXX_STANDARD)
+  set(CMAKE_CXX_STANDARD 11)
+elseif (CMAKE_CXX_STANDARD EQUAL 98)
+  message(FATAL_ERROR "only C++11 or above C++ standard is supported")
 endif()
-if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT MINGW)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-long-long")
+
+if (CMAKE_CXX_STANDARD EQUAL 11)
+  # should not fallback to C++98
+  set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
+
+set(CXX_LANGUAGE_LEVEL "C++${CMAKE_CXX_STANDARD}")
+if (CMAKE_CXX_STANDARD_REQUIRED)
+  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [compiler must 
support it]")
+else()
+  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [fallback to earlier 
if compiler does not support it]")
+endif()
+if (CMAKE_CXX_EXTENSIONS)
+  string(CONCAT CXX_LANGUAGE_LEVEL "${CXX_LANGUAGE_LEVEL} [with 
compiler-specific extensions]")
 endif()
 
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")



[thrift] 16/22: replace boost::atomic with std::atomic

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 7f8aef709937fb0a033ba89eade671a989d16f96
Author: cyy 
AuthorDate: Sun Jan 6 10:05:50 2019 +0800

replace boost::atomic with std::atomic
---
 lib/cpp/src/thrift/server/TThreadPoolServer.h |  6 +++---
 lib/cpp/src/thrift/transport/TFileTransport.h |  7 +++
 lib/cpp/test/TServerIntegrationTest.cpp   | 12 ++--
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/lib/cpp/src/thrift/server/TThreadPoolServer.h 
b/lib/cpp/src/thrift/server/TThreadPoolServer.h
index a957b47..121998c 100644
--- a/lib/cpp/src/thrift/server/TThreadPoolServer.h
+++ b/lib/cpp/src/thrift/server/TThreadPoolServer.h
@@ -20,7 +20,7 @@
 #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_
 #define _THRIFT_SERVER_TTHREADPOOLSERVER_H_ 1
 
-#include 
+#include 
 #include 
 #include 
 
@@ -90,8 +90,8 @@ protected:
   virtual void onClientDisconnected(TConnectedClient* pClient) /* override */;
 
   std::shared_ptr threadManager_;
-  boost::atomic timeout_;
-  boost::atomic taskExpiration_;
+  std::atomic timeout_;
+  std::atomic taskExpiration_;
 };
 
 }
diff --git a/lib/cpp/src/thrift/transport/TFileTransport.h 
b/lib/cpp/src/thrift/transport/TFileTransport.h
index 4fbdd9e..6cc7bd2 100644
--- a/lib/cpp/src/thrift/transport/TFileTransport.h
+++ b/lib/cpp/src/thrift/transport/TFileTransport.h
@@ -24,11 +24,10 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
@@ -347,11 +346,11 @@ private:
 
   // conditions used to block when the buffer is full or empty
   Monitor notFull_, notEmpty_;
-  boost::atomic closing_;
+  std::atomic closing_;
 
   // To keep track of whether the buffer has been flushed
   Monitor flushed_;
-  boost::atomic forceFlush_;
+  std::atomic forceFlush_;
 
   // Mutex that is grabbed when enqueueing and swapping the read/write buffers
   Mutex mutex_;
diff --git a/lib/cpp/test/TServerIntegrationTest.cpp 
b/lib/cpp/test/TServerIntegrationTest.cpp
index 3723679..7976c8b 100644
--- a/lib/cpp/test/TServerIntegrationTest.cpp
+++ b/lib/cpp/test/TServerIntegrationTest.cpp
@@ -18,8 +18,8 @@
  */
 
 #define BOOST_TEST_MODULE TServerIntegrationTest
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -310,10 +310,10 @@ public:
   shared_ptr pProtocol(new TBinaryProtocol(pSocket));
   ParentServiceClient client(pProtocol);
   pSocket->open();
-  bStressConnectionCount.fetch_add(1, boost::memory_order_relaxed);
+  bStressConnectionCount.fetch_add(1, std::memory_order_relaxed);
   for (int i = 0; i < rand() % 1000; ++i) {
   client.incrementGeneration();
-bStressRequestCount.fetch_add(1, boost::memory_order_relaxed);
+bStressRequestCount.fetch_add(1, std::memory_order_relaxed);
   }
 }
   }
@@ -321,9 +321,9 @@ public:
   shared_ptr pServer;
   shared_ptr pEventHandler;
   shared_ptr pServerThread;
-  boost::atomic bStressDone;
-  boost::atomic_int64_t bStressConnectionCount;
-  boost::atomic_int64_t bStressRequestCount;
+  std::atomic bStressDone;
+  std::atomic bStressConnectionCount;
+  std::atomic bStressRequestCount;
 };
 
 template 



[thrift] 21/22: remove unused boost headers

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 1f34504f43a7a409364d4114f180762bf2679e57
Author: cyy 
AuthorDate: Sun Jan 6 11:19:38 2019 +0800

remove unused boost headers
---
 lib/cpp/src/thrift/Thrift.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/cpp/src/thrift/Thrift.h b/lib/cpp/src/thrift/Thrift.h
index b41d5d2..6322742 100644
--- a/lib/cpp/src/thrift/Thrift.h
+++ b/lib/cpp/src/thrift/Thrift.h
@@ -42,9 +42,6 @@
 #include 
 #include 
 
-#include 
-#include 
-
 #include 
 #include 
 



[thrift] 15/22: remove std tr1

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit e9421b826f3db5491b583db5202394e8e3861226
Author: cyy 
AuthorDate: Sat Jan 5 19:28:55 2019 +0800

remove std tr1
---
 build/cmake/DefineOptions.cmake | 6 --
 1 file changed, 6 deletions(-)

diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 7465c80..9aff53c 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -40,11 +40,6 @@ option(BUILD_LIBRARIES "Build Thrift libraries" ON)
 # and enables the library if all are found. This means the default is to build 
as
 # much as possible but leaving out libraries if their dependencies are not met.
 
-option(WITH_BOOST_FUNCTIONAL "Use boost/tr1/functional.hpp even under C++11 or 
later" OFF)
-if (WITH_BOOST_FUNCTIONAL)
-add_definitions(-DFORCE_BOOST_FUNCTIONAL)
-endif()
-
 option(WITH_BOOST_STATIC "Build with Boost static link library" OFF)
 set(Boost_USE_STATIC_LIBS ${WITH_BOOST_STATIC})
 if (NOT WITH_BOOST_STATIC)
@@ -199,7 +194,6 @@ message(STATUS " Library features:")
 message(STATUS "  Build shared libraries: 
${WITH_SHARED_LIB}")
 message(STATUS "  Build static libraries: 
${WITH_STATIC_LIB}")
 message(STATUS "  Build with Boost static link library:   
${WITH_BOOST_STATIC}")
-message(STATUS "  Build with boost/tr1/functional (forced)
${WITH_BOOST_FUNCTIONAL}")
 message(STATUS "  Build with C++ std::thread support: 
${WITH_STDTHREADS}")
 message(STATUS "  Build with libevent support:
${WITH_LIBEVENT}")
 message(STATUS "  Build with OpenSSL support: ${WITH_OPENSSL}")



[thrift] 19/22: add static_assert message

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 863262dad7ee2719a6699d564a249dfea7480032
Author: cyy 
AuthorDate: Sun Jan 6 10:40:58 2019 +0800

add static_assert message
---
 lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc  | 8 
 lib/cpp/src/thrift/protocol/TCompactProtocol.tcc | 8 
 lib/cpp/src/thrift/protocol/TProtocol.h  | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc 
b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
index 902ef98..fe73992 100644
--- a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
@@ -165,8 +165,8 @@ uint32_t TBinaryProtocolT::writeI64(const int64_t i64) {
 
 template 
 uint32_t TBinaryProtocolT::writeDouble(const double 
dub) {
-  static_assert(sizeof(double) == sizeof(uint64_t));
-  static_assert(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) == 
sizeof(uint64_t)");
+  static_assert(std::numeric_limits::is_iec559, 
"std::numeric_limits::is_iec559");
 
   uint64_t bits = bitwise_cast(dub);
   bits = ByteOrder_::toWire64(bits);
@@ -388,8 +388,8 @@ uint32_t TBinaryProtocolT::readI64(int64_t& i64) {
 
 template 
 uint32_t TBinaryProtocolT::readDouble(double& dub) {
-  static_assert(sizeof(double) == sizeof(uint64_t));
-  static_assert(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) == 
sizeof(uint64_t)");
+  static_assert(std::numeric_limits::is_iec559, 
"std::numeric_limits::is_iec559");
 
   union bytes {
 uint8_t b[8];
diff --git a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc 
b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
index 2b8207a..8efec6e 100644
--- a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
@@ -253,8 +253,8 @@ uint32_t TCompactProtocolT::writeI64(const 
int64_t i64) {
  */
 template 
 uint32_t TCompactProtocolT::writeDouble(const double dub) {
-  static_assert(sizeof(double) == sizeof(uint64_t));
-  static_assert(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) == 
sizeof(uint64_t)");
+  static_assert(std::numeric_limits::is_iec559, 
"std::numeric_limits::is_iec559");
 
   uint64_t bits = bitwise_cast(dub);
   bits = THRIFT_htolell(bits);
@@ -653,8 +653,8 @@ uint32_t TCompactProtocolT::readI64(int64_t& 
i64) {
  */
 template 
 uint32_t TCompactProtocolT::readDouble(double& dub) {
-  static_assert(sizeof(double) == sizeof(uint64_t));
-  static_assert(std::numeric_limits::is_iec559);
+  static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) == 
sizeof(uint64_t)");
+  static_assert(std::numeric_limits::is_iec559, 
"std::numeric_limits::is_iec559");
 
   union {
 uint64_t bits;
diff --git a/lib/cpp/src/thrift/protocol/TProtocol.h 
b/lib/cpp/src/thrift/protocol/TProtocol.h
index 746973d..bbc6816 100644
--- a/lib/cpp/src/thrift/protocol/TProtocol.h
+++ b/lib/cpp/src/thrift/protocol/TProtocol.h
@@ -47,7 +47,7 @@
 // 
http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
 template 
 static inline To bitwise_cast(From from) {
-  static_assert(sizeof(From) == sizeof(To));
+  static_assert(sizeof(From) == sizeof(To), "sizeof(From) == sizeof(To)");
 
   // BAD!!!  These are all broken with -O2.
   //return *reinterpret_cast();  // BAD!!!



[thrift] 08/22: remove boost::thread in CI

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit f23e6a5e23c8ad1feaaa6913314c7836246a2925
Author: cyy 
AuthorDate: Sat Jan 5 14:00:03 2019 +0800

remove boost::thread in CI
---
 build/appveyor/cl_setenv.bat | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/build/appveyor/cl_setenv.bat b/build/appveyor/cl_setenv.bat
index 62856cb..c33366d 100644
--- a/build/appveyor/cl_setenv.bat
+++ b/build/appveyor/cl_setenv.bat
@@ -14,9 +14,7 @@
 
 @ECHO OFF
 
-   IF "%PROFILE%" == "MSVC2010" (
-  CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" 
%PLATFORM%
-) ELSE IF "%PROFILE%" == "MSVC2012" (
+IF "%PROFILE%" == "MSVC2012" (
   CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" 
%PLATFORM%
 ) ELSE IF "%PROFILE%" == "MSVC2013" (
   CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" 
%PLATFORM%
@@ -54,12 +52,7 @@ IF "%PROFILE:~0,4%" == "MSVC" (
   SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
   SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
 
-  :: MSVC2010 doesn't "do" std::thread
-  IF "%COMPILER%" == "vc100" (
-SET THREADMODEL=BOOST
-  ) ELSE (
-SET THREADMODEL=STD
-  )
+  SET THREADMODEL=STD
 
   IF "%PYTHON_VERSION%" == "" (
 SET WITH_PYTHON=OFF



svn commit: r31802 - in /dev/thrift: 0.10.0-rc0/ 0.10.0-rc1/ 0.11.0-rc0/ 0.12.0-rc0/

2019-01-07 Thread jking
Author: jking
Date: Mon Jan  7 21:17:48 2019
New Revision: 31802

Log:
remove release candidates

Removed:
dev/thrift/0.10.0-rc0/
dev/thrift/0.10.0-rc1/
dev/thrift/0.11.0-rc0/
dev/thrift/0.12.0-rc0/



[thrift] branch master updated: add/move a couple build related tools around

2019-01-07 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new e824efc  add/move a couple build related tools around
e824efc is described below

commit e824efcb7935e019998264b8982ad5e51858879e
Author: James E. King III 
AuthorDate: Mon Jan 7 16:50:54 2019 -0500

add/move a couple build related tools around
---
 build/fixchanges.sh  | 39 +++
 veralign.sh => build/veralign.sh |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/build/fixchanges.sh b/build/fixchanges.sh
new file mode 100755
index 000..6c57b54
--- /dev/null
+++ b/build/fixchanges.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# fixchanges will take a file as input and look for text matching
+# the pattern [THRIFT-] (the number of digits is not important)
+# which is not a markdown link, and change it to be a markdown link.
+# The tool writes to stdout so you can redirect it to a temporary
+# file and then compare against the original file before replacing
+# it.
+#
+# This tool was developed after the 0.12.0 release to assist with
+# generation of CHANGES.md content.
+#
+
+while IFS='' read -r line || [[ -n "$line" ]]; do
+if [[ "$line" =~ ^(.*)\[(THRIFT-[[:digit:]]+)\][^\(](.*)$ ]]; then
+echo 
"${BASH_REMATCH[1]}[${BASH_REMATCH[2]}](https://issues.apache.org/jira/browse/${BASH_REMATCH[2]})
 ${BASH_REMATCH[3]}"
+else
+echo "$line"
+fi
+done < "$1"
diff --git a/veralign.sh b/build/veralign.sh
similarity index 99%
rename from veralign.sh
rename to build/veralign.sh
index 380aa48..61744b4 100755
--- a/veralign.sh
+++ b/build/veralign.sh
@@ -43,7 +43,7 @@
 declare -A FILES
 
 # These files require a manual touch:
-FILES[CHANGES]=manual
+FILES[CHANGES.md]=manual
 FILES[debian/changelog]=manual
 FILES[doap.rdf]=manual
 



svn commit: r1850697 - /thrift/cms-site/trunk/lib/path.pm

2019-01-07 Thread jking
Author: jking
Date: Mon Jan  7 22:11:40 2019
New Revision: 1850697

URL: http://svn.apache.org/viewvc?rev=1850697=rev
Log:
CMS commit to thrift by jking

Modified:
thrift/cms-site/trunk/lib/path.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1850697=1850696=1850697=diff
==
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Mon Jan  7 22:11:40 2019
@@ -1,5 +1,5 @@
 package path;
-
+ 
 use ASF::Util qw/walk_content_tree Load/;
 use strict;
 use warnings;




svn commit: r31762 - /release/thrift/0.12.0/

2019-01-04 Thread jking
Author: jking
Date: Fri Jan  4 22:36:15 2019
New Revision: 31762

Log:
Apache Thrift 0.12.0 Official Release

Added:
release/thrift/0.12.0/
release/thrift/0.12.0/thrift-0.12.0.exe   (with props)
release/thrift/0.12.0/thrift-0.12.0.exe.asc
release/thrift/0.12.0/thrift-0.12.0.exe.md5
release/thrift/0.12.0/thrift-0.12.0.exe.sha1
release/thrift/0.12.0/thrift-0.12.0.exe.sha256
release/thrift/0.12.0/thrift-0.12.0.tar.gz   (with props)
release/thrift/0.12.0/thrift-0.12.0.tar.gz.asc
release/thrift/0.12.0/thrift-0.12.0.tar.gz.md5
release/thrift/0.12.0/thrift-0.12.0.tar.gz.sha1
release/thrift/0.12.0/thrift-0.12.0.tar.gz.sha256

Added: release/thrift/0.12.0/thrift-0.12.0.exe
==
Binary file - no diff available.

Propchange: release/thrift/0.12.0/thrift-0.12.0.exe
--
svn:executable = *

Propchange: release/thrift/0.12.0/thrift-0.12.0.exe
--
svn:mime-type = application/octet-stream

Added: release/thrift/0.12.0/thrift-0.12.0.exe.asc
==
--- release/thrift/0.12.0/thrift-0.12.0.exe.asc (added)
+++ release/thrift/0.12.0/thrift-0.12.0.exe.asc Fri Jan  4 22:36:15 2019
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEk0jwNpoggYQA+HFAxvKxG+3QJoMFAlwnwPAACgkQxvKxG+3Q
+JoO35Q//X15WA+CRJXQ/9qJFUPsn01nw7gy7g8B00mG/v+Bp6XV8RuI4agkRLWOq
+MtPlmN5AO+sBQMEJizQbASEy8VeppkxSCyE0t2CnZmhmKVj6UhLAptlPb+O1tK+4
+nZZErSWqu/urP8U3g0lAlbrB4nT9qbtCE1cqJtRqMNLcbBOv7AatMzqOx+hNyCEV
+n4c+KibCQkVLJG0Qi8sf+Bzzy51g+EZKXIDz3H40dnAvdAVyZRadAM99eP7+vwym
+kBHGNf2PoZet8o7M8vjTJBlM4rIZPi+5d5P71uAGidk6iQwSHWvC65XrXpx7NcZz
+wOgTIYanSgqvmu/mrEkSuDtr20yQRzOsWmmF6FpbdCmEudV0FnbRjcxwA7mNcGdl
+PkrtANihYmgona+NO8RovCoPBvjLskp7+/jvKBxqA7yhiIGJHYSKMlS7veF05qmp
+lLauAe6MTdmgsK5yyDzF/y3U864B6Usyq/9/sv0beLjCfhh+AztAJOHCTounOt8L
+eKi5gaRZfZKH7qabxu471f6xh1GBEUUxbCd1AMmCrev80VljO18BuhB8IIXa+duG
+izfSvBHRS52AyHARTbxct6EkUynXSvLSabv/woGEyyCX425b9lfk02gTEMFKFM1i
+NcYcX17KChiO9X3K9F87OaKOqoKjde3T9e1XUYNiYeNp2ZknV5I=
+=6x0Y
+-END PGP SIGNATURE-

Added: release/thrift/0.12.0/thrift-0.12.0.exe.md5
==
--- release/thrift/0.12.0/thrift-0.12.0.exe.md5 (added)
+++ release/thrift/0.12.0/thrift-0.12.0.exe.md5 Fri Jan  4 22:36:15 2019
@@ -0,0 +1 @@
+19f1f383cfab9c3b56c1be18ffa372d9  thrift-0.12.0.exe

Added: release/thrift/0.12.0/thrift-0.12.0.exe.sha1
==
--- release/thrift/0.12.0/thrift-0.12.0.exe.sha1 (added)
+++ release/thrift/0.12.0/thrift-0.12.0.exe.sha1 Fri Jan  4 22:36:15 2019
@@ -0,0 +1 @@
+9ad3c81792e9038a393289e7c29db8e851c7dc01  thrift-0.12.0.exe

Added: release/thrift/0.12.0/thrift-0.12.0.exe.sha256
==
--- release/thrift/0.12.0/thrift-0.12.0.exe.sha256 (added)
+++ release/thrift/0.12.0/thrift-0.12.0.exe.sha256 Fri Jan  4 22:36:15 2019
@@ -0,0 +1 @@
+3ef62b5839029c3d6e25da975a398c194e661f48a500a1af0daead3ddf7e602d  
thrift-0.12.0.exe

Added: release/thrift/0.12.0/thrift-0.12.0.tar.gz
==
Binary file - no diff available.

Propchange: release/thrift/0.12.0/thrift-0.12.0.tar.gz
--
svn:mime-type = application/octet-stream

Added: release/thrift/0.12.0/thrift-0.12.0.tar.gz.asc
==
--- release/thrift/0.12.0/thrift-0.12.0.tar.gz.asc (added)
+++ release/thrift/0.12.0/thrift-0.12.0.tar.gz.asc Fri Jan  4 22:36:15 2019
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEk0jwNpoggYQA+HFAxvKxG+3QJoMFAlwv3rwACgkQxvKxG+3Q
+JoN9VhAAiW2BxpEwt1cpTrfT/JkZ3L58uuqT+Geoo59IjTcLnKr/NyT3AVNLHePn
+bg1v6UR6aCbYmj8sBAcRGFuu63lXVoj2JYKPN9OAmTOcR+O+7pZvh3vmIYi4pAXS
+fet3+ef0bFhMd6cohzhzSxysAMWxGFOfexcztqGCHiT20N1qwTEuklpCQxwGof7f
+YKzThaxWze5UW6bkf4ZzYR1YXvTCDvyTGyqKL9/ytg2PjsC1MUlQQyjmffHZEF/T
+gkN+TSbDejpwfEYDQ/5qzKDN69sL8IfKU1Hq8C5hoR8YR5bEKCyxENgfrKiwdF4m
+fc0PCFe3L2bRq7ZmZ3zQweDK5NfgUBvC7qaYA4aF0mCwMdAmaojbFj60wcWRv9ur
+O+a7KIdt3Ol7zTtnNMSe5EfJermn5yy9HT6Gr+ckkqK39n2t45NhC6kBJQSd5ZhF
+zHqPMDJD4I67rmqOPsU9bf4u91dJsZ//PN7ChaRSIhe+hUCpF49NOFwRZD33TaJW
+fWvyqcp0PFTrigTRahdB+WXtPtn2CC5s5kkP4tc2vqlFdNQPYNVJHxmGyaex6jrQ
++YKCt8TLu4f9QcnTl+KVvsMynwZJaDZtDIdw4UPTbgo7bgnCfGe5G0niSu9PYbd/
+7bE/Bf1gzhDEE5XinZi6MnKcne4BsDdJf4fYfJpIdFhzgOodNmw=
+=t+/N
+-END PGP SIGNATURE-

Added: release/thrift/0.12.0/thrift-0.12.0.tar.gz.md5
==
--- release/thrift/0.12.0/thrift-0.12.0.tar.gz.md5 (added

svn commit: r1850446 - /thrift/cms-site/trunk/lib/path.pm

2019-01-04 Thread jking
Author: jking
Date: Fri Jan  4 22:41:10 2019
New Revision: 1850446

URL: http://svn.apache.org/viewvc?rev=1850446=rev
Log:
Update the release to 0.12.0

Modified:
thrift/cms-site/trunk/lib/path.pm

Modified: thrift/cms-site/trunk/lib/path.pm
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1850446=1850445=1850446=diff
==
--- thrift/cms-site/trunk/lib/path.pm (original)
+++ thrift/cms-site/trunk/lib/path.pm Fri Jan  4 22:41:10 2019
@@ -85,8 +85,8 @@ release_url: "https://www.apache.org/dis
 mirror_url: "http://www.apache.org/dyn/closer.cgi?path=;
 jira_url: "http://issues.apache.org/jira/browse/THRIFT;
 
-current_release: "0.11.0"
-current_release_date: "2017-DEC-07"
+current_release: "0.12.0"
+current_release_date: "2019-JAN-04"
 
 # Apache ID, Name, Specialities, Timezone
 committers: [




[thrift] branch master updated: THRIFT-4714: optimize java TFramedTransport to call write once per flush

2019-01-03 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 6503043  THRIFT-4714: optimize java TFramedTransport to call write 
once per flush
6503043 is described below

commit 6503043bc42ab96da14c25f3aee2bb4add719774
Author: James E. King III 
AuthorDate: Thu Jan 3 00:01:18 2019 -0500

THRIFT-4714: optimize java TFramedTransport to call write once per flush
---
 .../AutoExpandingBufferWriteTransport.java | 30 ++---
 .../thrift/transport/TFastFramedTransport.java | 13 +---
 .../apache/thrift/transport/TFramedTransport.java  | 17 +++---
 .../TestAutoExpandingBufferWriteTransport.java | 39 ++
 .../thrift/transport/TestTFramedTransport.java |  4 +--
 5 files changed, 81 insertions(+), 22 deletions(-)

diff --git 
a/lib/java/src/org/apache/thrift/transport/AutoExpandingBufferWriteTransport.java
 
b/lib/java/src/org/apache/thrift/transport/AutoExpandingBufferWriteTransport.java
index ad2ec55..ec7e7d4 100644
--- 
a/lib/java/src/org/apache/thrift/transport/AutoExpandingBufferWriteTransport.java
+++ 
b/lib/java/src/org/apache/thrift/transport/AutoExpandingBufferWriteTransport.java
@@ -25,10 +25,29 @@ public final class AutoExpandingBufferWriteTransport 
extends TTransport {
 
   private final AutoExpandingBuffer buf;
   private int pos;
+  private int res;
 
-  public AutoExpandingBufferWriteTransport(int initialCapacity) {
+  /**
+   * Constructor.
+   * @param initialCapacity the initial capacity of the buffer
+   * @param frontReserve space, if any, to reserve at the beginning such
+   * that the first write is after this reserve.
+   * This allows framed transport to reserve space
+   * for the frame buffer length.
+   * @throws IllegalArgumentException if initialCapacity is less than one
+   * @throws IllegalArgumentException if frontReserve is less than zero
+   * @throws IllegalArgumentException if frontReserve is greater than 
initialCapacity
+   */
+  public AutoExpandingBufferWriteTransport(int initialCapacity, int 
frontReserve) {
+if (initialCapacity < 1) {
+  throw new IllegalArgumentException("initialCapacity");
+}
+if (frontReserve < 0 || initialCapacity < frontReserve) {
+  throw new IllegalArgumentException("frontReserve");
+}
 this.buf = new AutoExpandingBuffer(initialCapacity);
-this.pos = 0;
+this.pos = frontReserve;
+this.res = frontReserve;
   }
 
   @Override
@@ -56,11 +75,14 @@ public final class AutoExpandingBufferWriteTransport 
extends TTransport {
 return buf;
   }
 
-  public int getPos() {
+  /**
+   * @return length of the buffer, including any front reserve
+   */
+  public int getLength() {
 return pos;
   }
 
   public void reset() {
-pos = 0;
+pos = res;
   }
 }
diff --git a/lib/java/src/org/apache/thrift/transport/TFastFramedTransport.java 
b/lib/java/src/org/apache/thrift/transport/TFastFramedTransport.java
index 891d798..a1fd249 100644
--- a/lib/java/src/org/apache/thrift/transport/TFastFramedTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TFastFramedTransport.java
@@ -106,8 +106,8 @@ public class TFastFramedTransport extends TTransport {
 this.underlying = underlying;
 this.maxLength = maxLength;
 this.initialBufferCapacity = initialBufferCapacity;
-writeBuffer = new AutoExpandingBufferWriteTransport(initialBufferCapacity);
 readBuffer = new AutoExpandingBufferReadTransport(initialBufferCapacity);
+writeBuffer = new AutoExpandingBufferWriteTransport(initialBufferCapacity, 
4);
   }
 
   @Override
@@ -166,16 +166,19 @@ public class TFastFramedTransport extends TTransport {
 readBuffer.consumeBuffer(len);
   }
 
+  /**
+   * Only clears the read buffer!
+   */
   public void clear() {
 readBuffer = new AutoExpandingBufferReadTransport(initialBufferCapacity);
   }
 
   @Override
   public void flush() throws TTransportException {
-int length = writeBuffer.getPos();
-TFramedTransport.encodeFrameSize(length, i32buf);
-underlying.write(i32buf, 0, 4);
-underlying.write(writeBuffer.getBuf().array(), 0, length);
+int payloadLength = writeBuffer.getLength() - 4;
+byte[] data = writeBuffer.getBuf().array();
+TFramedTransport.encodeFrameSize(payloadLength, data);
+underlying.write(data, 0, payloadLength + 4);
 writeBuffer.reset();
 underlying.flush();
   }
diff --git a/lib/java/src/org/apache/thrift/transport/TFramedTransport.java 
b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java
index fa531ef..a006c3a 100644
--- a/lib/java/src/org/apache/thrift/transport/TFramedTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java
@@ -66,16 +66,25 @@ public class TFrame

svn commit: r1849844 - /thrift/cms-site/trunk/content/developers.md

2018-12-28 Thread jking
Author: jking
Date: Fri Dec 28 12:53:56 2018
New Revision: 1849844

URL: http://svn.apache.org/viewvc?rev=1849844=rev
Log:
THRIFT-4546 fix git links on site.

Modified:
thrift/cms-site/trunk/content/developers.md

Modified: thrift/cms-site/trunk/content/developers.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/developers.md?rev=1849844=1849843=1849844=diff
==
--- thrift/cms-site/trunk/content/developers.md (original)
+++ thrift/cms-site/trunk/content/developers.md Fri Dec 28 12:53:56 2018
@@ -15,27 +15,20 @@ Apache Thrift tracks both bugs and enhan
 ---
 
 ## Source Control
-The Apache Thrift source code resides in the Apache git repository. Four types 
of access are available:
+The Apache Thrift source code resides in 
[GitHub](https://github.com/apache/thrift).  Three types of access are 
available:
 
 * **Web-Access (read-only)**
 
-   Source code can be browsed via the Web 
+   Source code can be browsed via the Web:

-   
[https://git-wip-us.apache.org/repos/asf?p=thrift.git](https://git-wip-us.apache.org/repos/asf?p=thrift.git)
+   [https://github.com/apache/thrift](https://github.com/apache/thrift)
 
 * **Anonymous (read-only)**
 
-   git clone 
[https://git-wip-us.apache.org/repos/asf/thrift.git](https://git-wip-us.apache.org/repos/asf/thrift.git)
+   git clone https://github.com/apache/thrift.git

 * **Committer Access (read-write)**
 
-   General instructions for committer access is 
[here](https://git-wip-us.apache.org)
+   General instructions for committer access is 
[here](https://git-wip-us.apache.org/#committers-getting-started).  It is a 
little stale (especially the netrc file information).
 
[{{ conf.git_repo }}.git]({{ conf.git_repo }}.git)
-   
-* **unofficial Git repositories**
-
-   Unofficial git repositories are mirrors of the main repository
-
-   * [Github](http://github.com/apache/thrift)
-   




svn commit: r1849845 - /thrift/cms-site/trunk/content/developers.md

2018-12-28 Thread jking
Author: jking
Date: Fri Dec 28 12:56:28 2018
New Revision: 1849845

URL: http://svn.apache.org/viewvc?rev=1849845=rev
Log:
CMS commit to thrift by jking

Modified:
thrift/cms-site/trunk/content/developers.md

Modified: thrift/cms-site/trunk/content/developers.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/developers.md?rev=1849845=1849844=1849845=diff
==
--- thrift/cms-site/trunk/content/developers.md (original)
+++ thrift/cms-site/trunk/content/developers.md Fri Dec 28 12:56:28 2018
@@ -23,7 +23,7 @@ The Apache Thrift source code resides in

[https://github.com/apache/thrift](https://github.com/apache/thrift)
 
-* **Anonymous (read-only)**
+* **Anonymous (read-only) git**
 
git clone https://github.com/apache/thrift.git

@@ -31,4 +31,4 @@ The Apache Thrift source code resides in
 
General instructions for committer access is 
[here](https://git-wip-us.apache.org/#committers-getting-started).  It is a 
little stale (especially the netrc file information).
 
-   [{{ conf.git_repo }}.git]({{ conf.git_repo }}.git)
+   git clone g...@github.com:apache/thrift.git




[thrift] branch master updated: Update Cargo.toml, release instructions and release script

2018-12-28 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new f9f037b  Update Cargo.toml, release instructions and release script
f9f037b is described below

commit f9f037bd5a9776ff1f7e28b530418299d102d8d3
Author: Allen George 
AuthorDate: Thu Dec 27 13:56:21 2018 -0500

Update Cargo.toml, release instructions and release script

Client: rs
---
 lib/rs/Cargo.toml   |  2 +-
 lib/rs/RELEASING.md | 57 +
 lib/rs/release.sh   | 26 
 3 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/lib/rs/Cargo.toml b/lib/rs/Cargo.toml
index f5844b4..ed32179 100644
--- a/lib/rs/Cargo.toml
+++ b/lib/rs/Cargo.toml
@@ -7,7 +7,7 @@ authors = ["Apache Thrift Developers "]
 homepage = "http://thrift.apache.org;
 documentation = "https://thrift.apache.org;
 readme = "README.md"
-exclude = ["Makefile*", "test/**"]
+exclude = ["Makefile*", "test/**", "*.iml"]
 keywords = ["thrift"]
 
 [dependencies]
diff --git a/lib/rs/RELEASING.md b/lib/rs/RELEASING.md
new file mode 100644
index 000..073d7a0
--- /dev/null
+++ b/lib/rs/RELEASING.md
@@ -0,0 +1,57 @@
+# Publishing the thrift crate
+
+Publishing the Rust thrift crate is straightforward, and involves two major 
steps:
+
+1. Setting up your [crates.io](https://www.crates.io) account _(one-time)_
+
+2. Packaging/publishing the Rust thrift crate itself
+
+## Set up your crates.io account (one-time)
+
+1. Go to [crates.io](https://www.crates.io) and click the `Log In` button at 
the top right.
+
+   Log in **as the Github user with write permissions to the thrift repo!**
+
+2. Click your user icon button at the top right and select `Account Settings`.
+
+3. Click `New Token` next to `API Access`.
+
+   This generates a new API key that cargo uses to publish packages to 
crates.io.
+   Store this API key somewhere safe. If you will only use this Github account 
to
+   publish crates to crates.io you can follow the instructions to save the
+   generated key to `~/.cargo/credentials`.
+
+## Package and Publish
+
+You can use the automated script or run the release steps manually.
+
+**Important**: `cargo` expects that version numbers follow the semantic 
versioning format.
+This means that `THRIFT_RELEASE_VERSION` must have a major, minor and patch 
number, i.e., must
+be in the form `#.##.##`.
+
+ Automated
+
+Run `./release.sh [THRIFT_RELEASE_VERSION]`.
+
+_Requires you to have stored your credentials in `~/.cargo/credentials`._
+
+ Manual
+
+1. Edit `Cargo.toml` and update the `version = 1.0` key to `version = 
[THRIFT_RELEASE_VERSION]`
+
+2. `git add Cargo.toml`
+
+3. `git commit -m "Update thrift crate version to [THRIFT_RELEASE_VERSION]" -m 
"Client: rs"`
+
+4. `cargo login`
+
+_(not required if you have stored your credentials in 
`~/.cargo/credentials`)_
+
+5. `cargo clean`
+
+6. `cargo package`
+
+   This step fails if there are any uncommitted or ignored files. Do **not** 
use the `--allow-dirty`
+   flag! Instead, add the highlighted files as entries in the `Cargo.toml` 
`exclude` key.
+
+7. `cargo publish`
diff --git a/lib/rs/release.sh b/lib/rs/release.sh
new file mode 100755
index 000..c4e5b48
--- /dev/null
+++ b/lib/rs/release.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -o errexit
+set -o pipefail
+set -o nounset
+
+if ! [[ $# -eq 1 && $1 =~ ^[0-9](\.[0-9][0-9]*){2}$ ]]; then
+(>&2 echo "Usage: ./publish-crate.sh [THRIFT_RELEASE_VERSION] ")
+(>&2 echo "   THRIFT_RELEASE_VERSION is in semantic versioning format, 
i.e. #.##.##")
+exit 1
+fi
+
+THRIFT_RELEASE_VERSION=${1:-}
+
+echo "Updating Cargo.toml to ${THRIFT_RELEASE_VERSION}"
+sed -i.old -e "s/^version = .*$/version = \"${THRIFT_RELEASE_VERSION}\"/g" 
Cargo.toml
+rm Cargo.toml.old
+
+echo "Committing updated Cargo.toml"
+git add Cargo.toml
+git commit -m "Update thrift crate version to ${THRIFT_RELEASE_VERSION}" -m 
"Client: rs"
+
+echo "Packaging and releasing rust thrift crate with version 
${THRIFT_RELEASE_VERSION}"
+cargo clean
+cargo package
+cargo publish



svn commit: r1038201 - /websites/production/thrift/content/

2018-12-28 Thread jking
Author: jking
Date: Fri Dec 28 12:57:12 2018
New Revision: 1038201

Log:
Fixed asf git links to github.

Added:
websites/production/thrift/content/
  - copied from r1038200, websites/staging/thrift/trunk/content/



[thrift] branch master updated: THRIFT-4705: add nuget configuration file

2019-01-02 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new 4c71660  THRIFT-4705: add nuget configuration file
4c71660 is described below

commit 4c71660dab62f2ac08ab7d81b41053fdaf2cdeb9
Author: James E. King III 
AuthorDate: Tue Jan 1 19:28:23 2019 -0500

THRIFT-4705: add nuget configuration file
---
 ApacheThrift.nuspec | 50 +
 lib/csharp/Makefile.am  |  4 
 lib/csharp/src/Thrift.45.csproj |  4 ++--
 lib/csharp/src/Thrift.csproj| 11 -
 4 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/ApacheThrift.nuspec b/ApacheThrift.nuspec
new file mode 100644
index 000..54ed2c6
--- /dev/null
+++ b/ApacheThrift.nuspec
@@ -0,0 +1,50 @@
+
+
+
+
+http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd;>
+  
+ApacheThrift
+1.0.0
+Apache Thrift 1.0.0
+Apache Thrift Developers
+Apache Software Foundation
+Apache-2.0
+http://thrift.apache.org/
+true
+Apache Thrift .NET Library
+
+  Contains runtime libraries from lib/csharp for net35 and net45 
frameworks, 
+  and from lib/netcore for netstandard2.0 framework development.
+
+https://github.com/apache/thrift; 
branch="release/1.0.0" />
+Apache Thrift RPC
+  
+  
+
+
+
+  
+
\ No newline at end of file
diff --git a/lib/csharp/Makefile.am b/lib/csharp/Makefile.am
index be49d5e..56a8b0f 100644
--- a/lib/csharp/Makefile.am
+++ b/lib/csharp/Makefile.am
@@ -109,3 +109,7 @@ EXTRA_DIST = \
test \
coding_standards.md \
README.md
+
+MAINTAINERCLEANFILES = \
+   Makefile \
+   Makefile.in
diff --git a/lib/csharp/src/Thrift.45.csproj b/lib/csharp/src/Thrift.45.csproj
index 455916f..4e28b25 100644
--- a/lib/csharp/src/Thrift.45.csproj
+++ b/lib/csharp/src/Thrift.45.csproj
@@ -31,7 +31,7 @@
   
   
 true
-full
+portable
 false
 bin\Debug\
 TRACE;DEBUG;NET45
@@ -39,7 +39,7 @@
 4
   
   
-pdbonly
+portable
 true
 bin\Release\
 TRACE;NET45
diff --git a/lib/csharp/src/Thrift.csproj b/lib/csharp/src/Thrift.csproj
index 2a469ed..bf65569 100644
--- a/lib/csharp/src/Thrift.csproj
+++ b/lib/csharp/src/Thrift.csproj
@@ -52,19 +52,20 @@
   
   
 true
-full
+portable
 false
 bin\Debug\
-DEBUG;TRACE
+TRACE;DEBUG
 prompt
 4
 AllRules.ruleset
   
   
-pdbonly
+portable
 true
 bin\Release\
-TRACE
+
+
 prompt
 4
 AllRules.ruleset
@@ -153,4 +154,4 @@
   
 
   
-
+
\ No newline at end of file



[thrift] branch master updated: THRIFT-4368: Fix guaranteed NPE in TBaseAsyncProcessor.java

2019-01-04 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new d532441  THRIFT-4368: Fix guaranteed NPE in TBaseAsyncProcessor.java
d532441 is described below

commit d5324413664a44da1cbdf671e0fe00b8571c2b4b
Author: Beluga Behr 
AuthorDate: Fri Jan 4 10:30:32 2019 -0500

THRIFT-4368: Fix guaranteed NPE in TBaseAsyncProcessor.java

wq# Please enter the commit message for your changes. Lines starting
---
 lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java 
b/lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java
index 9459c1a..0ab1827 100644
--- a/lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java
+++ b/lib/java/src/org/apache/thrift/TBaseAsyncProcessor.java
@@ -54,8 +54,13 @@ public class TBaseAsyncProcessor implements 
TAsyncProcessor, TProcessor {
 if (fn == null) {
 TProtocolUtil.skip(in, TType.STRUCT);
 in.readMessageEnd();
-if (!fn.isOneway()) {
-  TApplicationException x = new 
TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method 
name: '"+msg.name+"'");
+
+TApplicationException x = new 
TApplicationException(TApplicationException.UNKNOWN_METHOD,
+"Invalid method name: '" + msg.name + "'");
+LOGGER.debug("Invalid method name", x);
+
+// this means it is a two-way request, so we can send a reply
+if (msg.type == TMessageType.CALL) {
   out.writeMessageBegin(new TMessage(msg.name, 
TMessageType.EXCEPTION, msg.seqid));
   x.write(out);
   out.writeMessageEnd();
@@ -72,8 +77,12 @@ public class TBaseAsyncProcessor implements 
TAsyncProcessor, TProcessor {
 args.read(in);
 } catch (TProtocolException e) {
 in.readMessageEnd();
+
+TApplicationException x = new 
TApplicationException(TApplicationException.PROTOCOL_ERROR,
+e.getMessage());
+LOGGER.debug("Could not retrieve function arguments", x);
+
 if (!fn.isOneway()) {
-  TApplicationException x = new 
TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
   out.writeMessageBegin(new TMessage(msg.name, 
TMessageType.EXCEPTION, msg.seqid));
   x.write(out);
   out.writeMessageEnd();
@@ -93,6 +102,7 @@ public class TBaseAsyncProcessor implements 
TAsyncProcessor, TProcessor {
 try {
   fn.start(iface, args, resultHandler);
 } catch (Exception e) {
+  LOGGER.debug("Exception handling function", e);
   resultHandler.onError(e);
 }
 return true;



svn commit: r1038875 - /websites/production/thrift/content/

2019-01-11 Thread jking
Author: jking
Date: Fri Jan 11 18:20:30 2019
New Revision: 1038875

Log:
Replaced release management content.

Added:
websites/production/thrift/content/
  - copied from r1038874, websites/staging/thrift/trunk/content/



svn commit: r1851079 - in /thrift/cms-site/trunk/content/docs/committers: HowToPublish.md HowToRelease.md HowToVersion.md ReleaseManagement.md

2019-01-11 Thread jking
Author: jking
Date: Fri Jan 11 18:02:06 2019
New Revision: 1851079

URL: http://svn.apache.org/viewvc?rev=1851079=rev
Log:
Replaced obsolete release management documentation with a revised copy.

Added:
thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md
Removed:
thrift/cms-site/trunk/content/docs/committers/HowToPublish.md
thrift/cms-site/trunk/content/docs/committers/HowToRelease.md
thrift/cms-site/trunk/content/docs/committers/HowToVersion.md

Added: thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md?rev=1851079=auto
==
--- thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md (added)
+++ thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md Fri Jan 
11 18:02:06 2019
@@ -0,0 +1,19 @@
+Title:
+Notice:Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   .
+ http://www.apache.org/licenses/LICENSE-2.0
+   .
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+[snippet:path=doc/ReleaseManagement.md]
\ No newline at end of file




svn commit: r1851081 - /thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md

2019-01-11 Thread jking
Author: jking
Date: Fri Jan 11 18:08:54 2019
New Revision: 1851081

URL: http://svn.apache.org/viewvc?rev=1851081=rev
Log:
Replaced committer release management information.

Modified:
thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md

Modified: thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md?rev=1851081=1851080=1851081=diff
==
--- thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md 
(original)
+++ thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md Fri Jan 
11 18:08:54 2019
@@ -1,20 +1,3 @@

-title: "Release Procedures and Versioning Rules"
-Notice:Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-   .
- http://www.apache.org/licenses/LICENSE-2.0
-   .
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
+Title: "Release Management"
 
 [snippet:path=doc/ReleaseManagement.md]
\ No newline at end of file




svn commit: r1851083 - /thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md

2019-01-11 Thread jking
Author: jking
Date: Fri Jan 11 18:19:42 2019
New Revision: 1851083

URL: http://svn.apache.org/viewvc?rev=1851083=rev
Log:
CMS commit to thrift by jking

Modified:
thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md

Modified: thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md
URL: 
http://svn.apache.org/viewvc/thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md?rev=1851083=1851082=1851083=diff
==
--- thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md 
(original)
+++ thrift/cms-site/trunk/content/docs/committers/ReleaseManagement.md Fri Jan 
11 18:19:42 2019
@@ -1,3 +1,5 @@
-Title: "Release Management"
+Title: Release Management
+
+[See it on 
GitHub](https://github.com/apache/thrift/blob/master/doc/ReleaseManagement.md)
+
 
-[snippet:path=doc/ReleaseManagement.md]
\ No newline at end of file




[thrift] branch master updated: THRIFT-4697: Add release management docs to GitHub [ci skip]

2019-01-11 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new cc19bf1  THRIFT-4697: Add release management docs to GitHub [ci skip]
cc19bf1 is described below

commit cc19bf1d7b5a32ed345e31c5634ac4d1e2b1d86e
Author: James E. King III 
AuthorDate: Mon Jan 7 17:31:00 2019 -0500

THRIFT-4697: Add release management docs to GitHub [ci skip]
---
 doc/ReleaseManagement.md | 395 +++
 1 file changed, 395 insertions(+)

diff --git a/doc/ReleaseManagement.md b/doc/ReleaseManagement.md
new file mode 100644
index 000..a7b2369
--- /dev/null
+++ b/doc/ReleaseManagement.md
@@ -0,0 +1,395 @@
+# Apache Thrift Release Management
+
+Instructions for preparing and distributing a release of Apache Thrift are 
fairly complex.  These procedures are documented here, and we're working to 
automate as much of this as possible.  There are few projects like ours that 
integrate with 28 programming languages.  Given the extreme number of package 
management systems that Apache Thrift integrates with (compared to perhaps 
any), part of the burden of releasing Apache Thrift is to manually package and 
upload some of these [language-s [...]
+
+It is important to note here that Apache Thrift is designed for version 
interoperability, so one can use a version 0.7.0 client with a 0.12.0 server.  
A particular version number does not make any guarantees as to the features 
available in any given language.  See the [Language Feature 
Matrix](https://github.com/apache/thrift/blob/master/LANGUAGES.md) to learn 
more.
+
+## Concepts
+
+### Versioning
+
+Apache Thrift and the vast majority of package management systems out there 
conform to the [SemVer 2.0](https://semver.org/spec/v2.0.0.html) version 
numbering specification.
+
+In terms of releases, the important version numbers for Apache Thrift are the 
major and minor.  The patch number is used in the following cases:
+
+1. There were language-specific critical defects or packaging issues.
+1. There was something horribly and fundamentally wrong with a x.x.0 release.
+
+ External Package Patches
+
+It is common to have language-specific critical defects or packaging errors 
that need to be resolved between releases of Apache Thrift.  The project 
handles these on a case-by-case basis for languages that have their own 
[package management systems](http://apache.thrift.org/libraries).  When a 
language-specific patch is made, the patch level of the distribution pushed to 
the external package manager is bumped.
+
+ As such, there may be cases between Apache Thrift releases where there are 
(for example) a `0.12.1` and `0.12.2` version of a Haskell Hackage package, and 
perhaps also a `0.12.3` version of a dlang dub package.  You will not find a 
tag or an official project release in these cases, however the code changes 
will be reflected in the release branch and in master.  In these cases we would 
not release a version of Apache Thrift nor would we refresh all the external 
language packages.
+
+ Version in the master branch
+
+The master branch will always contain the next anticipated release version.  
When a release cycle begins, a branch is cut from master.  The release branch 
will already have all of the correct versions, and therefore release branches 
can be easily merged back into master.  (This was not true of releases before 
0.12.0).
+
+### Code Repository
+
+The authoritative repository for Apache Thrift is stored in 
[GitHub](https://github.com/apache/thrift).  It is mirrored by 
[GitBox](https://gitbox.apache.org/repos/asf?p=thrift.git).
+
+### Branches
+
+All code (submitted via pull request or direct push) is committed to the 
`master` branch.  Until version 1.0 of Apache Thrift each release branch was 
named ``, for example in version `0.12.0` there is a branch named the 
same.  For version 1.0 releases any beyond, releases will have a branch named 
`release/`.
+
+### Tags
+
+Up to version `0.12.0` each release of Apache Thrift was tagged with a 
`` tag.  Starting with the `0.12.0` release, each release of Apache 
Thrift will be tagged with a `v` tag to satisfy external package 
management tools (such as ones for dlang and golang).  For example the tag of 
version `0.12.0` is `v0.12.0`.
+
+## Release Procedures
+
+### Release Schedule
+
+Apache Thrift has no official release schedule, however the project aims to 
release at least twice per year.
+
+A complete release cycle will take about 1 week to complete, if things go 
well, with half of that time waiting for a vote.
+
+### Release Manager
+
+Before a release cycle begins, someone must nominate themselves on the 
development mailing list as the release manager for that release.  In order to 
be a release manager you must meet the following criteria:
+
+1. You are a [member

[thrift] branch master updated: THRIFT-4730: remove pthread code and refactor, ending up with just ThreadFactory

2019-01-11 Thread jking
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
 new ca8af9b  THRIFT-4730: remove pthread code and refactor, ending up with 
just ThreadFactory
ca8af9b is described below

commit ca8af9b48f9e62edc57c4a233c6377144214ef5a
Author: cyy 
AuthorDate: Fri Jan 11 22:13:12 2019 +0800

THRIFT-4730: remove pthread code and refactor, ending up with just 
ThreadFactory
---
 .travis.yml|   2 +-
 build/appveyor/CYGW-appveyor-build.bat |   3 +-
 build/cmake/DefineOptions.cmake|   3 -
 build/cmake/DefinePlatformSpecifc.cmake|   5 -
 build/cmake/config.h.in|   3 -
 contrib/transport-sample/ThriftCommon.h|   4 +-
 lib/cpp/CMakeLists.txt |  27 +-
 lib/cpp/Makefile.am|  12 +-
 lib/cpp/src/thrift/concurrency/Monitor.cpp | 164 +-
 lib/cpp/src/thrift/concurrency/Mutex.cpp   | 335 +
 lib/cpp/src/thrift/concurrency/Mutex.h | 101 +--
 .../src/thrift/concurrency/PosixThreadFactory.cpp  | 335 -
 .../src/thrift/concurrency/PosixThreadFactory.h| 129 
 lib/cpp/src/thrift/concurrency/StdMonitor.cpp  | 213 -
 .../src/thrift/concurrency/StdThreadFactory.cpp| 153 --
 .../concurrency/{StdMutex.cpp => Thread.cpp}   |  48 +--
 lib/cpp/src/thrift/concurrency/Thread.h| 132 
 .../{PlatformThreadFactory.h => ThreadFactory.cpp} |  30 +-
 .../{StdThreadFactory.h => ThreadFactory.h}|  46 ++-
 lib/cpp/src/thrift/concurrency/ThreadManager.h |   2 +-
 lib/cpp/src/thrift/concurrency/TimerManager.h  |   2 +-
 lib/cpp/src/thrift/server/TNonblockingServer.cpp   |   9 +-
 lib/cpp/src/thrift/server/TNonblockingServer.h |  10 +-
 lib/cpp/src/thrift/server/TThreadedServer.cpp  |   2 +-
 lib/cpp/src/thrift/server/TThreadedServer.h|  10 +-
 lib/cpp/src/thrift/transport/TFileTransport.h  |   4 +-
 lib/cpp/src/thrift/windows/config.h|   5 -
 lib/cpp/test/CMakeLists.txt|   5 -
 lib/cpp/test/Makefile.am   |   4 -
 lib/cpp/test/TNonblockingSSLServerTest.cpp |   7 +-
 lib/cpp/test/TNonblockingServerTest.cpp|   9 +-
 lib/cpp/test/TServerIntegrationTest.cpp|   8 +-
 lib/cpp/test/TransportTest.cpp |   2 +-
 lib/cpp/test/concurrency/MutexTest.cpp | 123 
 lib/cpp/test/concurrency/RWMutexStarveTest.cpp | 157 --
 lib/cpp/test/concurrency/ThreadFactoryTests.h  |  10 +-
 lib/cpp/test/concurrency/ThreadManagerTests.h  |  59 +---
 lib/cpp/test/concurrency/TimerManagerTests.h   |  12 +-
 lib/cpp/test/processor/ProcessorTest.cpp   |   6 +-
 lib/cpp/test/processor/ServerThread.cpp|   4 +-
 test/cpp/src/StressTest.cpp|   6 +-
 test/cpp/src/StressTestNonBlocking.cpp |   6 +-
 test/cpp/src/TestServer.cpp|   8 +-
 test/threads/ThreadsClient.cpp |   2 +-
 test/threads/ThreadsServer.cpp |   6 +-
 tutorial/cpp/CppServer.cpp |   4 +-
 46 files changed, 284 insertions(+), 1943 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 637b5d5..75685d5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -142,7 +142,7 @@ jobs:
 - JOB="C++ (Std Thread) and Plugin"
 - SCRIPT="cmake.sh"
 - BUILD_LIBS="CPP TESTING TUTORIALS"
-- BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF 
-DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
+- BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF 
-DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
 - BUILD_ENV="-e CC=clang -e CXX=clang++"
 
 # - phase: dist -
diff --git a/build/appveyor/CYGW-appveyor-build.bat 
b/build/appveyor/CYGW-appveyor-build.bat
index c226222..6d57ca3 100644
--- a/build/appveyor/CYGW-appveyor-build.bat
+++ b/build/appveyor/CYGW-appveyor-build.bat
@@ -28,8 +28,7 @@ SET CMAKEARGS=^
   -DCMAKE_CXX_STANDARD=11 ^
   -DWITH_PYTHON=OFF ^
   -DWITH_SHARED_LIB=OFF ^
-  -DWITH_STATIC_LIB=ON ^
-  -DWITH_STDTHREADS=ON
+  -DWITH_STATIC_LIB=ON
 
 @ECHO ON
 %BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% 
%CMAKEARGS% && cmake --build . --config %CONFIGURATION% --target install" || 
EXIT /B
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 207b770..9d95b7c 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOp

<    1   2   3   4   5   6   7   >