Merge branch '0.15.0' into upstream
diff --git a/ApacheThrift.nuspec b/ApacheThrift.nuspec
index 4a6e99b..7c8e300 100644
--- a/ApacheThrift.nuspec
+++ b/ApacheThrift.nuspec
@@ -19,14 +19,14 @@
the "Thrift" project.
2. nuget setApiKey <your-api-key>
3. nuget pack ApacheThrift.nuspec -Symbols -SymbolPackageFormat snupkg
- 4. nuget push ApacheThrift.0.15.0.nupkg -Source https://api.nuget.org/v3/index.json
+ 4. nuget push ApacheThrift.0.16.0.nupkg -Source https://api.nuget.org/v3/index.json
-->
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>ApacheThrift</id>
- <version>0.15.0</version>
- <title>Apache Thrift 0.15.0</title>
+ <version>0.16.0</version>
+ <title>Apache Thrift 0.16.0</title>
<authors>Apache Thrift Developers</authors>
<owners>Apache Software Foundation</owners>
<license type="expression">Apache-2.0</license>
@@ -36,7 +36,7 @@
<description>
Contains runtime libraries from lib/netstd for netstandard2.0 framework development.
</description>
- <repository type="GitHub" url="https://github.com/apache/thrift" branch="release/0.15.0" />
+ <repository type="GitHub" url="https://github.com/apache/thrift" branch="release/0.16.0" />
<tags>Apache Thrift RPC</tags>
</metadata>
<files>
diff --git a/CHANGES.md b/CHANGES.md
index 02e65fd..a935870 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -82,6 +82,8 @@
- [THRIFT-5447](https://issues.apache.org/jira/browse/THRIFT-5447) - Update supported Go versions before 0.15.0 release
- [THRIFT-5453](https://issues.apache.org/jira/browse/THRIFT-5453) - go: NewTSocketConf should not call net.ResolveTCPAddr
- [THRIFT-5459](https://issues.apache.org/jira/browse/THRIFT-5459) - Adding a new exception to an endpoint is kinda breaking in go
+- [THRIFT-5453](https://issues.apache.org/jira/browse/THRIFT-5453) - Defer DNS lookups from NewTSocketConf (without any timeout check) to TSocket.Open (subject to ConnectTimeout set in TConfiguration)
+- [THRIFT-5459](https://issues.apache.org/jira/browse/THRIFT-5459) - Client calls will return TApplicationException with MISSING_RESULT when the result is a struct but is unset, and no other error is known.
### Haskell
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b341d0..8ffb528 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@
# PACKAGE_VERSION is used by cpack scripts currently
# Both thrift_VERSION and PACKAGE_VERSION should be the same for now
-set(thrift_VERSION "0.15.0")
+set(thrift_VERSION "0.16.0")
set(PACKAGE_VERSION ${thrift_VERSION})
project("thrift" VERSION ${PACKAGE_VERSION})
diff --git a/Thrift.podspec b/Thrift.podspec
index 1769105..addea6b 100644
--- a/Thrift.podspec
+++ b/Thrift.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Thrift'
- s.version = '0.15.0'
+ s.version = '0.16.0'
s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC."
s.description = <<-DESC
The Apache Thrift scalable cross-language software framework for networked services development combines a software stack with a code generation engine to build services that work efficiently and seamlessly between many programming languages.
@@ -10,6 +10,6 @@
s.author = { 'Apache Thrift Developers' => 'dev@thrift.apache.org' }
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
- s.source = { :git => 'https://github.com/apache/thrift.git', :tag => 'v0.15.0' }
+ s.source = { :git => 'https://github.com/apache/thrift.git', :tag => 'v0.16.0' }
s.source_files = 'lib/swift/Sources/*.swift'
end
diff --git a/appveyor.yml b/appveyor.yml
index 9a91b18..8b791e4 100755
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -19,7 +19,7 @@
# build Apache Thrift on AppVeyor - https://ci.appveyor.com
-version: '0.15.0.{build}'
+version: '0.16.0.{build}'
shallow_clone: true
@@ -28,15 +28,16 @@
- master
- /^(release/)?\d+\.\d+\.\d+$/
-os:
- - Visual Studio 2017
-
-matrix:
- fast_finish: true
+# Note: We could abort all jobs on the first error, but then it
+# becomes hard to learn from the other jobs results. Therefore disabled:
+#matrix:
+# fast_finish: true
environment:
matrix:
- PROFILE: MSVC2017
+ PROFILE_CLASS: MSVC
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PLATFORM: x64
CONFIGURATION: Release
BUILD_SHARED_LIBS: ON
@@ -47,6 +48,8 @@
ZLIB_VERSION: 1.2.11
- PROFILE: MSVC2015
+ PROFILE_CLASS: MSVC
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PLATFORM: x86
CONFIGURATION: Debug
BUILD_SHARED_LIBS: OFF
@@ -55,30 +58,27 @@
PYTHON_VERSION: 3.5
QT_VERSION: 5.8
ZLIB_VERSION: 1.2.8
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- PROFILE: MINGW
+ PROFILE_CLASS: MINGW
+ # Currently the the latest MSYS2 is in the following image:
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PLATFORM: x64
CONFIGURATION: RelWithDebInfo
DISABLED_TESTS: (StalenessCheckTest)
- - PROFILE: CYGWIN
- PLATFORM: x64
- CONFIGURATION: RelWithDebInfo
- DISABLED_TESTS: (ZlibTest|OpenSSLManualInitTest|TNonblockingServerTest)
+ # As of 2021.08.06, the Cygwin build is broken with a missing dll exception.
+ # See for an example https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/builds/40263513/job/a69xt6m4o0y9x1bw?fullLog=true
+ # - PROFILE: CYGWIN
+ # PROFILE_CLASS: CYGWIN
+ # PLATFORM: x64
+ # CONFIGURATION: RelWithDebInfo
+ # DISABLED_TESTS: (ZlibTest|OpenSSLManualInitTest|TNonblockingServerTest)
-install:
- - cd %APPVEYOR_BUILD_FOLDER%
- - call build\appveyor\%PROFILE:~0,4%-appveyor-install.bat
- - refreshenv
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- - call build\appveyor\%PROFILE:~0,4%-appveyor-build.bat
-
-test_script:
- - cd %APPVEYOR_BUILD_FOLDER%
- - call build\appveyor\%PROFILE:~0,4%-appveyor-test.bat
+ - call build\appveyor\%PROFILE_CLASS%-appveyor-full.bat
# artifact capture disabled as it might increase service cost for little gain:
diff --git a/bower.json b/bower.json
index 6f66361..46873c7 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"homepage": "https://github.com/apache/thrift.git",
"authors": [
"Apache Thrift <dev@thrift.apache.org>"
diff --git a/build/appveyor/CYGW-appveyor-build.bat b/build/appveyor/CYGW-appveyor-build.bat
deleted file mode 100644
index 7f33287..0000000
--- a/build/appveyor/CYGW-appveyor-build.bat
+++ /dev/null
@@ -1,35 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_build.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-
-SET CMAKEARGS=^
- -G'%GENERATOR%' ^
- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
- -DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
- -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE" ^
- -DWITH_JAVA=OFF ^
- -DWITH_PYTHON=OFF
-
-:: -DCMAKE_CXX_EXTENSIONS=ON ^
-:: -DCMAKE_CXX_STANDARD=11 ^
-
-@ECHO ON
-%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% --target install" || EXIT /B
-@ECHO OFF
diff --git a/build/appveyor/CYGW-appveyor-install.bat b/build/appveyor/CYGW-appveyor-install.bat
deleted file mode 100644
index 4cdc8ea..0000000
--- a/build/appveyor/CYGW-appveyor-install.bat
+++ /dev/null
@@ -1,50 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Appveyor install script for CYGWIN
-:: Installs third party packages we need for a cmake build
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_install.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CALL cl_showenv.bat || EXIT /B
-
-::
-:: Upgrades cygwin to the latest, if you want...
-::
-:: appveyor DownloadFile "https://cygwin.com/setup-x86_64.exe"
-:: setup-x86_64.exe --quiet-mode --wait --upgrade-also --packages="gcc-g++"
-
-::
-:: Install apt-cyg for package management
-::
-
-%BASH% -lc "wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg && install apt-cyg /bin && rm -f apt-cyg" || EXIT /B
-%BASH% -lc "apt-cyg update" || EXIT /B
-%BASH% -lc "apt-cyg install bison cmake flex gcc-g++ libboost-devel libevent-devel make openssl-devel xz zlib-devel"
-
-::
-:: We need a newer version of cmake, the one cygwin provides is too old
-:: to recognize the version of boost. Luckily there is a pre-release
-:: one available, however cygwin's own setup program has no command line
-:: option to allow access to test packages!
-::
-
-%BASH% -lc "apt-cyg remove cmake"
-%BASH% -lc "cd / && wget http://mirror.clarkson.edu/cygwin/x86_64/release/cmake/cmake-3.20.0-1.tar.xz && tar xJf cmake-3.20.0-1.tar.xz && hash -r && cmake --version"
diff --git a/build/appveyor/CYGW-appveyor-test.bat b/build/appveyor/CYGW-appveyor-test.bat
deleted file mode 100644
index b667f9b..0000000
--- a/build/appveyor/CYGW-appveyor-test.bat
+++ /dev/null
@@ -1,21 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-CD build\appveyor || EXIT /B
-CALL cl_banner_test.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-
-%BASH% -lc "cd %BUILDDIR% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '%DISABLED_TESTS%'" || EXIT /B
diff --git a/build/appveyor/CYGWIN-appveyor-full.bat b/build/appveyor/CYGWIN-appveyor-full.bat
new file mode 100644
index 0000000..7f874d9
--- /dev/null
+++ b/build/appveyor/CYGWIN-appveyor-full.bat
@@ -0,0 +1,96 @@
+::
+:: 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.
+::
+
+::
+:: Appveyor script for CYGWIN
+::
+
+::
+:: Installs third party packages we need for a cmake build
+::
+
+@ECHO ON
+SETLOCAL EnableDelayedExpansion
+
+CD build\appveyor || EXIT /B
+
+SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
+SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
+SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\install\%PROFILE%\%PLATFORM%
+SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+
+
+:: compiler and generator detection
+SET COMPILER=gcc
+SET GENERATOR=Unix Makefiles
+
+IF "%PLATFORM%" == "x64" (
+ SET CYGWINROOT=C:\cygwin64
+) ELSE (
+ SET CYGWINROOT=C:\cygwin
+)
+
+IF "%PLATFORM%" == "x64" (
+ SET SETUP=!CYGWINROOT!\setup-x86_64.exe
+) ELSE (
+ SET SETUP=!CYGWINROOT!\setup-x86.exe
+)
+
+SET BASH=!CYGWINROOT!\bin\bash.exe
+SET BUILDDIR=%BUILDDIR:\=/%
+SET BUILDDIR=/cygdrive/c!BUILDDIR:~2!
+SET INSTDIR=%INSTDIR:\=/%
+SET INSTDIR=/cygdrive/c!INSTDIR:~2!
+SET SRCDIR=%SRCDIR:\=/%
+SET SRCDIR=/cygdrive/c!SRCDIR:~2!
+
+
+CALL win_showenv.bat || EXIT /B
+
+::
+:: Install apt-cyg for package management because its easier to use
+:: than Cygwins setup.exe. But both are possible to use.
+::
+
+%BASH% -lc "wget https://rawgit.com/transcode-open/apt-cyg/master/apt-cyg && install apt-cyg /bin && rm -f apt-cyg" || EXIT /B
+%BASH% -lc "apt-cyg update" || EXIT /B
+%BASH% -lc "apt-cyg install unzip xz cmake make bison flex gcc-g++ libboost-devel libevent-devel openssl-devel zlib-devel" || EXIT /B
+
+
+::
+:: Configure and build our software with cmake
+::
+
+SET CMAKEARGS=^
+ -G'%GENERATOR%' ^
+ -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+ -DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
+ -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE" ^
+ -DWITH_JAVA=OFF ^
+ -DWITH_PYTHON=OFF
+
+:: -DCMAKE_CXX_EXTENSIONS=ON ^
+:: -DCMAKE_CXX_STANDARD=11 ^
+
+
+%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% && cmake --install . --config %CONFIGURATION%" || EXIT /B
+
+
+::
+:: Execute our tests
+::
+
+SET DISABLED_TESTS_COMMAND=--exclude-regex '%DISABLED_TESTS%'
+
+%BASH% -lc "cd %BUILDDIR% && ctest.exe --build-config %CONFIGURATION% --timeout 300 --extra-verbose %DISABLED_TESTS_COMMAND%" || EXIT /B
diff --git a/build/appveyor/MING-appveyor-build.bat b/build/appveyor/MING-appveyor-build.bat
deleted file mode 100644
index eec65f8..0000000
--- a/build/appveyor/MING-appveyor-build.bat
+++ /dev/null
@@ -1,34 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_build.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-
-SET CMAKEARGS=^
- -G'%GENERATOR%' ^
- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
- -DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
- -DCMAKE_MAKE_PROGRAM=/mingw%NORM_PLATFORM%/bin/mingw32-make ^
- -DCMAKE_C_COMPILER=/mingw%NORM_PLATFORM%/bin/gcc.exe ^
- -DCMAKE_CXX_COMPILER=/mingw%NORM_PLATFORM%/bin/g++.exe ^
- -DOPENSSL_ROOT_DIR=/mingw%NORM_PLATFORM% ^
- -DWITH_PYTHON=OFF
-
-@ECHO ON
-%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% --target install" || EXIT /B
-@ECHO OFF
diff --git a/build/appveyor/MING-appveyor-install.bat b/build/appveyor/MING-appveyor-install.bat
deleted file mode 100644
index 862cb1c..0000000
--- a/build/appveyor/MING-appveyor-install.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Appveyor install script for MINGW on MSYS2
-:: Installs third party packages we need for a cmake build
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_install.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CALL cl_showenv.bat || EXIT /B
-
-SET PACKAGES=^
- --needed -S bison flex make ^
- mingw-w64-%MINGWPLAT%-boost ^
- mingw-w64-%MINGWPLAT%-cmake ^
- mingw-w64-%MINGWPLAT%-libevent ^
- mingw-w64-%MINGWPLAT%-openssl ^
- mingw-w64-%MINGWPLAT%-toolchain ^
- mingw-w64-%MINGWPLAT%-zlib
-
-::mingw-w64-%MINGWPLAT%-qt5 : WAY too large (1GB download!) - tested in cygwin builds anyway
-
-:: the following uninstall and system upgrade was causing issues; appveyor's is relatively new
-:: Remove old packages that no longer exist to avoid an error
-:: %BASH% -lc "pacman --noconfirm --remove libcatgets catgets || true" || EXIT /B
-
-:: Remove incompatible packages 8.2.0-3 and 7.3.0-2 (mingw packaging bugs if you ask me!)
-:: %BASH% -lc "pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc || true" || EXIT /B
-:: %BASH% -lc "pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc || true" || EXIT /B
-
-:: Upgrade things
-:: %BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
-:: %BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
-
-:: Updata the new key
-%BASH% -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" || EXIT /B
-%BASH% -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" || EXIT /B
-%BASH% -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" || EXIT /B
-%BASH% -lc "pacman --noconfirm -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" || EXIT /B
-:: Upgrade things
-%BASH% -lc "pacman --noconfirm -Sy" || EXIT /B
-%BASH% -lc "pacman --noconfirm -Udd https://repo.msys2.org/msys/x86_64/pacman-5.2.2-5-x86_64.pkg.tar.xz" || EXIT /B
-%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B
diff --git a/build/appveyor/MING-appveyor-test.bat b/build/appveyor/MING-appveyor-test.bat
deleted file mode 100644
index 499c1ff..0000000
--- a/build/appveyor/MING-appveyor-test.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_test.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-
-%BASH% -lc "cd %BUILDDIR% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '%DISABLED_TESTS%'" || EXIT /B
diff --git a/build/appveyor/MINGW-appveyor-full.bat b/build/appveyor/MINGW-appveyor-full.bat
new file mode 100644
index 0000000..f808c0d
--- /dev/null
+++ b/build/appveyor/MINGW-appveyor-full.bat
@@ -0,0 +1,126 @@
+::
+:: 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.
+::
+
+::
+:: Appveyor script for MINGW on MSYS2
+::
+
+::
+:: Installs third party packages we need for a cmake build
+::
+
+@ECHO ON
+SETLOCAL EnableDelayedExpansion
+
+CD build\appveyor || EXIT /B
+
+SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
+SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
+SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\install\%PROFILE%\%PLATFORM%
+SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+
+
+:: PLATFORM is x86 or x64
+:: NORM_PLATFORM is 32 or 64
+IF "%PLATFORM%" == "x86" (
+ SET NORM_PLATFORM=32
+) ELSE (
+ SET NORM_PLATFORM=64
+)
+
+:: PLATFORM = x86 means MINGWPLAT i686
+:: PLATFORM = x64 means MINGWPLAT x86_64
+IF "%PLATFORM%" == "x86" (
+ SET MINGWPLAT=i686
+) ELSE (
+ SET MINGWPLAT=x86_64
+)
+
+
+:: compiler and generator detection
+SET COMPILER=gcc
+SET GENERATOR=MinGW Makefiles
+
+
+SET BASH=C:\msys64\usr\bin\bash.exe
+!BASH! -lc "sed -i '/export PATH=\/mingw32\/bin/d' ~/.bash_profile && sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw%NORM_PLATFORM%/bin:$PATH' >> ~/.bash_profile" || EXIT /B
+
+SET BUILDDIR=%BUILDDIR:\=/%
+SET BUILDDIR=/c!BUILDDIR:~2!
+SET INSTDIR=%INSTDIR:\=/%
+SET INSTDIR=/c!INSTDIR:~2!
+SET SRCDIR=%SRCDIR:\=/%
+SET SRCDIR=/c!SRCDIR:~2!
+
+CALL win_showenv.bat || EXIT /B
+
+
+SET PACKAGES=^
+ base-devel ^
+ mingw-w64-x86_64-toolchain ^
+ bison ^
+ flex ^
+ make ^
+ mingw-w64-%MINGWPLAT%-boost ^
+ mingw-w64-%MINGWPLAT%-cmake ^
+ mingw-w64-%MINGWPLAT%-libevent ^
+ mingw-w64-%MINGWPLAT%-openssl ^
+ mingw-w64-%MINGWPLAT%-toolchain ^
+ mingw-w64-%MINGWPLAT%-zlib
+
+::mingw-w64-%MINGWPLAT%-qt5 : WAY too large (1GB download!) - tested in cygwin builds anyway
+
+:: Upgrade things
+%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
+%BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
+%BASH% -lc "pacman --noconfirm --needed -S %PACKAGES%" || EXIT /B
+
+
+:: These instructions are for a manual update of specific package versions.
+:: Fall back to this in case the above does not work anymore (broken upstream).
+:::: Updata the new key
+::%BASH% -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-1~20210213-2-any.pkg.tar.xz" || EXIT /B
+::%BASH% -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-1~20210213-2-any.pkg.tar.xz.sig" || EXIT /B
+::%BASH% -lc "pacman-key --verify msys2-keyring-1~20210213-2-any.pkg.tar.xz.sig" || EXIT /B
+::%BASH% -lc "pacman --noconfirm -U --config <(echo) msys2-keyring-1~20210213-2-any.pkg.tar.xz" || EXIT /B
+:::: Upgrade things
+::%BASH% -lc "pacman --noconfirm -Sy" || EXIT /B
+::%BASH% -lc "pacman --noconfirm -Udd https://repo.msys2.org/msys/x86_64/pacman-5.2.2-5-x86_64.pkg.tar.xz" || EXIT /B
+::%BASH% -lc "pacman --noconfirm --needed -S %PACKAGES%" || EXIT /B
+
+
+::
+:: Configure and build our software with cmake
+::
+
+SET CMAKEARGS=^
+ -G'%GENERATOR%' ^
+ -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+ -DCMAKE_INSTALL_PREFIX=%INSTDIR% ^
+ -DCMAKE_MAKE_PROGRAM=/mingw%NORM_PLATFORM%/bin/mingw32-make ^
+ -DCMAKE_C_COMPILER=/mingw%NORM_PLATFORM%/bin/gcc.exe ^
+ -DCMAKE_CXX_COMPILER=/mingw%NORM_PLATFORM%/bin/g++.exe ^
+ -DOPENSSL_ROOT_DIR=/mingw%NORM_PLATFORM% ^
+ -DWITH_PYTHON=OFF
+
+%BASH% -lc "mkdir -p %BUILDDIR% && cd %BUILDDIR% && cmake.exe %SRCDIR% %CMAKEARGS% && cmake --build . --config %CONFIGURATION% && cmake --install . --config %CONFIGURATION%" || EXIT /B
+
+
+::
+:: Execute our tests
+::
+
+SET DISABLED_TESTS_COMMAND=--exclude-regex '%DISABLED_TESTS%'
+
+%BASH% -lc "cd %BUILDDIR% && ctest.exe --build-config %CONFIGURATION% --timeout 300 --extra-verbose %DISABLED_TESTS_COMMAND%" || EXIT /B
diff --git a/build/appveyor/MSVC-appveyor-build.bat b/build/appveyor/MSVC-appveyor-build.bat
deleted file mode 100644
index 3d2bbee..0000000
--- a/build/appveyor/MSVC-appveyor-build.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_build.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-MKDIR "%BUILDDIR%" || EXIT /B
-CD "%BUILDDIR%" || EXIT /B
-
-:: When libraries cannot be found, things might have been updated
-:: so uncomment this and submit a pull request to see what's there
-:: now...
-:: DIR C:\Libraries
-:: DIR C:\Libraries\boost_1_69_0\lib*
-:: DIR C:\Libraries\boost_1_68_0\lib*
-:: DIR C:\Libraries\boost_1_67_0\lib*
-:: DIR C:\Libraries\boost_1_66_0\lib*
-:: DIR C:\Libraries\boost_1_65_0\lib*
-:: DIR C:\Libraries\boost_1_64_0\lib*
-:: DIR C:\Libraries\boost_1_63_0\lib*
-:: DIR C:\Libraries\boost_1_62_0\lib*
-:: DIR C:\Libraries\boost_1_61_0\lib*
-:: DIR C:\Libraries\boost_1_60_0\lib*
-
-@ECHO ON
- cmake "%SRCDIR%" ^
- -G"%GENERATOR%" ^
- -DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe ^
- -DBOOST_ROOT="%BOOST_ROOT%" ^
- -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ^
- -DBUILD_SHARED_LIBS="%BUILD_SHARED_LIBS%" ^
- -DCMAKE_BUILD_TYPE="%CONFIGURATION%" ^
- -DCMAKE_INSTALL_PREFIX="%INSTDIR%" ^
- -DFLEX_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe ^
- -DLIBEVENT_ROOT="%WIN3P%\libevent-%LIBEVENT_VERSION%-stable" ^
- -DOPENSSL_ROOT_DIR="%OPENSSL_ROOT%" ^
- -DOPENSSL_USE_STATIC_LIBS=OFF ^
- -DZLIB_LIBRARY="%WIN3P%\zlib-inst\lib\zlib%ZLIB_LIB_SUFFIX%.lib" ^
- -DZLIB_ROOT="%WIN3P%\zlib-inst" ^
- -DWITH_PYTHON=%WITH_PYTHON% || EXIT /B
-@ECHO OFF
-
-cmake --build . ^
- --config "%CONFIGURATION%" ^
- --target INSTALL || EXIT /B
diff --git a/build/appveyor/MSVC-appveyor-full.bat b/build/appveyor/MSVC-appveyor-full.bat
new file mode 100644
index 0000000..49a3f94
--- /dev/null
+++ b/build/appveyor/MSVC-appveyor-full.bat
@@ -0,0 +1,196 @@
+::
+:: 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.
+::
+
+::
+:: Appveyor script for MSVC
+::
+
+::
+:: Installs (or builds) third party packages we need
+::
+
+@ECHO ON
+SETLOCAL EnableDelayedExpansion
+
+CD build\appveyor || EXIT /B
+
+SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
+SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
+SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\install\%PROFILE%\%PLATFORM%
+SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+
+
+IF "%PROFILE%" == "MSVC2015" (
+ IF "%PLATFORM%" == "x86" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 || EXIT /B
+ ) ELSE (
+ CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 || EXIT /B
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 || EXIT /B
+ )
+) ELSE IF "%PROFILE%" == "MSVC2017" (
+ IF "%PLATFORM%" == "x86" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" || EXIT /B
+ ) ELSE (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" || EXIT /B
+ )
+) ELSE IF "%PROFILE%" == "MSVC2019" (
+ IF "%PLATFORM%" == "x86" (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" || EXIT /B
+ ) ELSE (
+ CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" || EXIT /B
+ )
+) ELSE (
+ ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
+ EXIT /B 1
+)
+
+
+:: compiler and generator detection
+IF /i "%PLATFORM%" == "x64" SET GENARCH= Win64
+IF "%PROFILE%" == "MSVC2015" (
+ SET GENERATOR=Visual Studio 14 2015!GENARCH!
+ SET COMPILER=vc140
+) ELSE IF "%PROFILE%" == "MSVC2017" (
+ SET GENERATOR=Visual Studio 15 2017!GENARCH!
+ SET COMPILER=vc141
+) ELSE IF "%PROFILE%" == "MSVC2019" (
+ SET GENERATOR=Visual Studio 16 2019!GENARCH!
+ SET COMPILER=vc142
+) ELSE (
+ ECHO [error] unable to determine the CMake generator and compiler to use from MSVC profile %PROFILE%
+ EXIT /B 1
+)
+
+:: PLATFORM is x86 or x64
+:: NORM_PLATFORM is 32 or 64
+IF "%PLATFORM%" == "x86" (
+ SET NORM_PLATFORM=32
+) ELSE (
+ SET NORM_PLATFORM=64
+)
+
+:: FindBoost needs forward slashes so cmake doesn't see something as an escaped character
+SET BOOST_ROOT=C:/Libraries/boost_%BOOST_VERSION:.=_%
+SET BOOST_LIBRARYDIR=!BOOST_ROOT!/lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.%COMPILER:~-1,1%
+SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
+SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
+
+IF "%PYTHON_VERSION%" == "" (
+ SET WITH_PYTHON=OFF
+) ELSE (
+ SET WITH_PYTHON=ON
+ IF /i "%PLATFORM%" == "x64" (SET PTEXT=-x64)
+ SET PATH=C:\Python%PYTHON_VERSION:.=%!PTEXT!\scripts;C:\Python%PYTHON_VERSION:.=%!PTEXT!;!PATH!
+)
+
+IF "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
+
+IF NOT "%QT_VERSION%" == "" (
+ IF /i "%PLATFORM%" == "x64" (SET QTEXT=_64)
+ SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
+)
+
+
+CALL win_showenv.bat || EXIT /B
+MKDIR "%WIN3P%" || EXIT /B
+
+choco feature enable -n allowGlobalConfirmation || EXIT /B
+
+:: Things to install when NOT running in appveyor:
+IF "%APPVEYOR_BUILD_ID%" == "" (
+ cup -y chocolatey || EXIT /B
+ cinst -y curl || EXIT /B
+ cinst -y 7zip || EXIT /B
+ cinst -y python3 || EXIT /B
+ cinst -y openssl.light || EXIT /B
+)
+
+cinst -y jdk8 || EXIT /B
+cinst -y winflexbison3 || EXIT /B
+
+:: zlib - not available through chocolatey
+CD "%APPVEYOR_SCRIPTS%" || EXIT /B
+call build-zlib.bat || EXIT /B
+
+:: libevent - not available through chocolatey
+CD "%APPVEYOR_SCRIPTS%" || EXIT /B
+call build-libevent.bat || EXIT /B
+
+:: python packages (correct path to pip set above)
+pip.exe ^
+ install backports.ssl_match_hostname ^
+ ipaddress ^
+ six ^
+ tornado ^
+ twisted || EXIT /B
+
+:: Adobe Flex SDK 4.6 for ActionScript
+MKDIR "C:\Adobe\Flex\SDK\4.6" || EXIT /B
+appveyor DownloadFile http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip -FileName C:\Adobe\Flex\SDK\4.6\SDK.zip || EXIT /B
+CD "C:\Adobe\Flex\SDK\4.6" || EXIT /B
+7z x SDK.zip || EXIT /B
+SETX FLEX_HOME "C:\Adobe\Flex\SDK\4.6"
+
+
+::
+:: Configure and build our software with cmake
+::
+
+MKDIR "%BUILDDIR%" || EXIT /B
+CD "%BUILDDIR%" || EXIT /B
+
+:: When libraries cannot be found, things might have been updated
+:: so uncomment this and submit a pull request to see what's there
+:: now...
+:: DIR C:\Libraries
+:: DIR C:\Libraries\boost_1_69_0\lib*
+:: DIR C:\Libraries\boost_1_68_0\lib*
+:: DIR C:\Libraries\boost_1_67_0\lib*
+:: DIR C:\Libraries\boost_1_66_0\lib*
+:: DIR C:\Libraries\boost_1_65_0\lib*
+:: DIR C:\Libraries\boost_1_64_0\lib*
+:: DIR C:\Libraries\boost_1_63_0\lib*
+:: DIR C:\Libraries\boost_1_62_0\lib*
+:: DIR C:\Libraries\boost_1_61_0\lib*
+:: DIR C:\Libraries\boost_1_60_0\lib*
+
+cmake.exe "%SRCDIR%" ^
+ -G"%GENERATOR%" ^
+ -DBISON_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe" ^
+ -DBOOST_ROOT="%BOOST_ROOT%" ^
+ -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ^
+ -DBUILD_SHARED_LIBS="%BUILD_SHARED_LIBS%" ^
+ -DCMAKE_BUILD_TYPE="%CONFIGURATION%" ^
+ -DCMAKE_INSTALL_PREFIX="%INSTDIR%" ^
+ -DFLEX_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe" ^
+ -DLIBEVENT_ROOT="%WIN3P%\libevent-%LIBEVENT_VERSION%-stable" ^
+ -DOPENSSL_ROOT_DIR="%OPENSSL_ROOT%" ^
+ -DOPENSSL_USE_STATIC_LIBS=OFF ^
+ -DZLIB_LIBRARY="%WIN3P%\zlib-inst\lib\zlib%ZLIB_LIB_SUFFIX%.lib" ^
+ -DZLIB_ROOT="%WIN3P%\zlib-inst" ^
+ -DWITH_PYTHON=%WITH_PYTHON% || EXIT /B
+
+cmake.exe --build . --config "%CONFIGURATION%" || EXIT /B
+
+cmake.exe --install . --config "%CONFIGURATION%" || EXIT /B
+
+::
+:: Execute our tests
+::
+
+:: Add directories to the path to find DLLs of third party libraries so tests run properly!
+SET PATH=%BOOST_LIBRARYDIR:/=\%;%OPENSSL_ROOT%\bin;%WIN3P%\zlib-inst\bin;%PATH%
+SET DISABLED_TESTS_COMMAND=--exclude-regex '%DISABLED_TESTS%'
+
+ctest.exe --build-config %CONFIGURATION% --timeout 300 --extra-verbose %DISABLED_TESTS_COMMAND% || EXIT /B
diff --git a/build/appveyor/MSVC-appveyor-install.bat b/build/appveyor/MSVC-appveyor-install.bat
deleted file mode 100644
index a4c49fe..0000000
--- a/build/appveyor/MSVC-appveyor-install.bat
+++ /dev/null
@@ -1,64 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Appveyor install script for MSVC
-:: Installs (or builds) third party packages we need
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_install.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CALL cl_showenv.bat || EXIT /B
-MKDIR "%WIN3P%" || EXIT /B
-
-choco feature enable -n allowGlobalConfirmation || EXIT /B
-
-:: Things to install when NOT running in appveyor:
-IF "%APPVEYOR_BUILD_ID%" == "" (
- cup -y chocolatey || EXIT /B
- cinst -y curl || EXIT /B
- cinst -y 7zip || EXIT /B
- cinst -y python3 || EXIT /B
- cinst -y openssl.light || EXIT /B
-)
-
-cinst -y jdk8 || EXIT /B
-cinst -y winflexbison3 || EXIT /B
-
-:: zlib - not available through chocolatey
-CD "%APPVEYOR_SCRIPTS%" || EXIT /B
-call build-zlib.bat || EXIT /B
-
-:: libevent - not available through chocolatey
-CD "%APPVEYOR_SCRIPTS%" || EXIT /B
-call build-libevent.bat || EXIT /B
-
-:: python packages (correct path to pip set in cl_setenv.bat)
-pip.exe ^
- install backports.ssl_match_hostname ^
- ipaddress ^
- six ^
- tornado ^
- twisted || EXIT /B
-
-:: Adobe Flex SDK 4.6 for ActionScript
-MKDIR "C:\Adobe\Flex\SDK\4.6" || EXIT /B
-appveyor DownloadFile http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip -FileName C:\Adobe\Flex\SDK\4.6\SDK.zip || EXIT /B
-CD "C:\Adobe\Flex\SDK\4.6" || EXIT /B
-7z x SDK.zip || EXIT /B
-SETX FLEX_HOME "C:\Adobe\Flex\SDK\4.6"
diff --git a/build/appveyor/MSVC-appveyor-test.bat b/build/appveyor/MSVC-appveyor-test.bat
deleted file mode 100644
index 3594579..0000000
--- a/build/appveyor/MSVC-appveyor-test.bat
+++ /dev/null
@@ -1,32 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO ON
-SETLOCAL EnableDelayedExpansion
-CD build\appveyor || EXIT /B
-CALL cl_banner_test.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CD "%BUILDDIR%" || EXIT /B
-
-DIR C:\libraries
-DIR C:\libraries\boost_1_59_0
-DIR C:\libraries\boost_1_60_0
-DIR C:\libraries\boost_1_62_0
-DIR C:\libraries\boost_1_63_0
-DIR C:\libraries\boost_1_64_0
-
-:: Add directories to the path to find DLLs of third party libraries so tests run properly!
-SET PATH=%BOOST_LIBRARYDIR:/=\%;%OPENSSL_ROOT%\bin;%WIN3P%\zlib-inst\bin;%PATH%
-
-ctest -C %CONFIGURATION% --timeout 300 -VV -E "(%DISABLED_TESTS%)" || EXIT /B
diff --git a/build/appveyor/MSYS-appveyor-build.bat b/build/appveyor/MSYS-appveyor-build.bat
deleted file mode 100644
index 4401729..0000000
--- a/build/appveyor/MSYS-appveyor-build.bat
+++ /dev/null
@@ -1,48 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_build.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-
-SET BASH=C:\msys64\usr\bin\bash
-SET CMAKE=/c/msys64/mingw64/bin/cmake.exe
-
-@ECHO ON
-SET CMAKEARGS=-G\"%GENERATOR%\" ^
- -DBoost_DEBUG=ON ^
- -DBoost_NAMESPACE=libboost ^
- -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% ^
- -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
- -DCMAKE_C_COMPILER=gcc.exe ^
- -DCMAKE_CXX_COMPILER=g++.exe ^
- -DCMAKE_MAKE_PROGRAM=make.exe ^
- -DCMAKE_INSTALL_PREFIX=%INSTDIR_MSYS% ^
- -DLIBEVENT_ROOT=%LIBEVENT_ROOT% ^
- -DOPENSSL_LIBRARIES=%OPENSSL_LIBRARIES% ^
- -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT% ^
- -DOPENSSL_USE_STATIC_LIBS=ON ^
- -DWITH_BOOST_STATIC=ON ^
- -DWITH_JAVA=OFF ^
- -DWITH_LIBEVENT=ON ^
- -DWITH_PYTHON=%WITH_PYTHON% ^
- -DWITH_SHARED_LIB=OFF ^
- -DWITH_STATIC_LIB=ON
-
-%BASH% -lc "mkdir %BUILDDIR_MSYS% && cd %BUILDDIR_MSYS% && %CMAKE% %SRCDIR_MSYS% %CMAKEARGS% && %CMAKE% --build . --config %CONFIGURATION% --target install" || EXIT /B
-@ECHO OFF
diff --git a/build/appveyor/MSYS-appveyor-full.bat b/build/appveyor/MSYS-appveyor-full.bat
new file mode 100644
index 0000000..082ffdb
--- /dev/null
+++ b/build/appveyor/MSYS-appveyor-full.bat
@@ -0,0 +1,98 @@
+::
+:: 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.
+::
+
+::
+:: Appveyor script for MSYS
+::
+
+::
+:: Installs third party packages we need for a cmake build
+::
+
+@ECHO ON
+SETLOCAL EnableDelayedExpansion
+
+CD build\appveyor || EXIT /B
+
+SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
+SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
+SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\install\%PROFILE%\%PLATFORM%
+SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
+
+
+ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
+EXIT /B 1
+
+
+SET BASH=C:\msys64\usr\bin\bash
+SET CMAKE=/c/msys64/mingw64/bin/cmake.exe
+
+
+CALL win_showenv.bat || EXIT /B
+
+SET PACKAGES=^
+ base-devel ^
+ mingw-w64-x86_64-toolchain ^
+ bison ^
+ flex ^
+ make ^
+ mingw-w64-x86_64-cmake ^
+ mingw-w64-x86_64-libevent ^
+ mingw-w64-x86_64-openssl ^
+ mingw-w64-x86_64-zlib
+
+:: Upgrade things
+%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
+%BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
+%BASH% -lc "pacman --noconfirm --needed -S %PACKAGES%" || EXIT /B
+
+
+::
+:: Configure and build our software with cmake
+::
+
+SET CMAKEARGS=^
+ -G'%GENERATOR%' ^
+ -DBoost_DEBUG=ON ^
+ -DBoost_NAMESPACE=libboost ^
+ -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% ^
+ -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
+ -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
+ -DCMAKE_C_COMPILER=gcc.exe ^
+ -DCMAKE_CXX_COMPILER=g++.exe ^
+ -DCMAKE_MAKE_PROGRAM=make.exe ^
+ -DCMAKE_INSTALL_PREFIX=%INSTDIR_MSYS% ^
+ -DLIBEVENT_ROOT=%LIBEVENT_ROOT% ^
+ -DOPENSSL_LIBRARIES=%OPENSSL_LIBRARIES% ^
+ -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT% ^
+ -DOPENSSL_USE_STATIC_LIBS=ON ^
+ -DWITH_BOOST_STATIC=ON ^
+ -DWITH_JAVA=OFF ^
+ -DWITH_LIBEVENT=ON ^
+ -DWITH_PYTHON=%WITH_PYTHON% ^
+ -DWITH_SHARED_LIB=OFF ^
+ -DWITH_STATIC_LIB=ON
+
+%BASH% -lc "mkdir %BUILDDIR% && cd %BUILDDIR% && %CMAKE% %SRCDIR_MSYS% %CMAKEARGS% && %CMAKE% --build . --config %CONFIGURATION% && %CMAKE% --install . --config %CONFIGURATION%" || EXIT /B
+
+
+::
+:: Execute our tests
+::
+
+:: This test randomly fails on mingw; see Jira THRIFT-4106
+SET DISABLED_TESTS=(concurrency_test)
+SET DISABLED_TESTS_COMMAND=--exclude-regex '%DISABLED_TESTS%'
+
+%BASH% -lc "cd %BUILDDIR% && ctest.exe --build-config %CONFIGURATION% --timeout 300 --extra-verbose %DISABLED_TESTS_COMMAND%" || EXIT /B
diff --git a/build/appveyor/MSYS-appveyor-install.bat b/build/appveyor/MSYS-appveyor-install.bat
deleted file mode 100644
index a818df3..0000000
--- a/build/appveyor/MSYS-appveyor-install.bat
+++ /dev/null
@@ -1,48 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Appveyor install script for MSYS
-:: Installs (or builds) third party packages we need
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_install.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CALL cl_showenv.bat || EXIT /B
-
-:: We're going to keep boost at a version cmake understands
-SET BOOSTPKG=mingw-w64-x86_64-boost-1.64.0-3-any.pkg.tar.xz
-SET IGNORE=--ignore mingw-w64-x86_64-boost
-
-SET PACKAGES=^
- --needed -S bison flex make ^
- mingw-w64-x86_64-cmake ^
- mingw-w64-x86_64-libevent ^
- mingw-w64-x86_64-openssl ^
- mingw-w64-x86_64-toolchain ^
- mingw-w64-x86_64-zlib
-
-%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B
-%BASH% -lc "pacman --noconfirm -Su %IGNORE%" || EXIT /B
-%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B
-
-:: Install a slightly older boost (1.64.0) as cmake 3.10
-:: does not have built-in dependencies for boost 1.66.0 yet
-:: -- this cuts down on build warning output --
-%BASH% -lc "wget http://repo.msys2.org/mingw/x86_64/%BOOSTPKG% && pacman --noconfirm --needed -U %BOOSTPKG% && rm %BOOSTPKG%" || EXIT /B
-
diff --git a/build/appveyor/MSYS-appveyor-test.bat b/build/appveyor/MSYS-appveyor-test.bat
deleted file mode 100644
index 0f37ec5..0000000
--- a/build/appveyor/MSYS-appveyor-test.bat
+++ /dev/null
@@ -1,26 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-SETLOCAL EnableDelayedExpansion
-
-CD build\appveyor || EXIT /B
-CALL cl_banner_test.bat || EXIT /B
-CALL cl_setenv.bat || EXIT /B
-CD "%BUILDDIR%" || EXIT /B
-
-:: randomly fails on mingw; see Jira THRIFT-4106
-SET DISABLED_TESTS=concurrency_test
-
-%BASH% -lc "cd %BUILDDIR_MSYS% && ctest.exe -C %CONFIGURATION% --timeout 300 -VV -E '(%DISABLED_TESTS%)'" || EXIT /B
diff --git a/build/appveyor/README.md b/build/appveyor/README.md
index 1a2aa30..a3d3071 100644
--- a/build/appveyor/README.md
+++ b/build/appveyor/README.md
@@ -12,23 +12,9 @@
limitations under the License.
-->
-# Appveyor Build
+# AppVeyor Build
-Appveyor is capable of building MSVC 2010 through 2015 as well as
-having the latest MSYS2/MinGW 64-bit environment. It has many versions
-of boost and python installed as well. See what appveyor has
+AppVeyor is capable of building MSVC as well as MSYS2, MinGW and Cygwin builds targeting the MS Windows platform. It has many versions of boost and python installed as well. See what appveyor has
[installed on build workers](https://www.appveyor.com/docs/installed-software/).
-We run a matrix build on Appveyor and build the following combinations:
-
-* MinGW x64 (gcc 6.3.0)
-* MSVC 2010 x86, an older boost, an older python
-* MSVC 2015 x86/x64, the latest boost, the latest python
-* MSYS2 x64 (gcc 6.3.0) - this is a work in progress
-
-The Appveyor script takes the first four letters from the PROFILE specified in
-the environment stanza and runs these scripts in order:
-
-????-appveyor-install.bat will install third party libraries and set up the environment
-????-appveyor-build.bat will build with cmake
-????-appveyor-test.bat will run ctest
+We run a matrix build on AppVeyor. See appveyor.yml for more details.
diff --git a/build/appveyor/build-libevent.bat b/build/appveyor/build-libevent.bat
index 64b635b..939daf5 100644
--- a/build/appveyor/build-libevent.bat
+++ b/build/appveyor/build-libevent.bat
@@ -18,20 +18,20 @@
SET URL=https://github.com/libevent/libevent/releases/download/release-%LIBEVENT_VERSION%-stable/%URLFILE%
:: Download - support running a local build or a build in appveyor
-CD "%WIN3P%" || EXIT /B
+CD "%WIN3P%" || EXIT /B
IF "%APPVEYOR_BUILD_ID%" == "" (
curl -L -f -o "%URLFILE%" "%URL%"
) ELSE (
appveyor DownloadFile "%URL%"
)
-7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
-CD "libevent-%LIBEVENT_VERSION%-stable" || EXIT /B
-nmake -f Makefile.nmake static_libs || EXIT /B
+7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
+CD "libevent-%LIBEVENT_VERSION%-stable" || EXIT /B
+nmake -f Makefile.nmake static_libs || EXIT /B
:: in libevent 2.0 there is no nmake subdirectory in WIN32-Code, but in 2.1 there is
-mkdir lib || EXIT /B
-move *.lib lib\ || EXIT /B
+mkdir lib || EXIT /B
+move *.lib lib\ || EXIT /B
move WIN32-Code\event2\* include\event2\ || move WIN32-Code\nmake\event2\* include\event2\ || EXIT /B
-move *.h include\ || EXIT /B
+move *.h include\ || EXIT /B
ENDLOCAL
diff --git a/build/appveyor/build-zlib.bat b/build/appveyor/build-zlib.bat
index 9195726..367ef98 100644
--- a/build/appveyor/build-zlib.bat
+++ b/build/appveyor/build-zlib.bat
@@ -25,7 +25,7 @@
SET FURL=http://zlib.net/fossils/%URLFILE%
:: Download - support running a local build or a build in appveyor
-CD "%WIN3P%" || EXIT /B
+CD "%WIN3P%" || EXIT /B
IF "%APPVEYOR_BUILD_ID%" == "" (
curl -L -f -o "%URLFILE%" "%URL%"
IF ERRORLEVEL 1 (
@@ -34,23 +34,23 @@
) ELSE (
appveyor DownloadFile "%URL%"
IF ERRORLEVEL 1 (
- appveyor DownloadFile "%FURL%" || EXIT /B
+ appveyor DownloadFile "%FURL%" || EXIT /B
)
)
-7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
+7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
:: Generate
-MKDIR "%BUILDDIR%" || EXIT /B
-CD "%BUILDDIR%" || EXIT /B
+MKDIR "%BUILDDIR%" || EXIT /B
+CD "%BUILDDIR%" || EXIT /B
cmake "%SRCDIR%" ^
-G"NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX="%INSTDIR%" ^
- -DCMAKE_BUILD_TYPE="%CONFIGURATION%" || EXIT /B
+ -DCMAKE_BUILD_TYPE="%CONFIGURATION%" || EXIT /B
:: Build
-nmake /fMakefile install || EXIT /B
+nmake /fMakefile install || EXIT /B
IF "%CONFIGURATION%" == "Debug" (
- COPY "%BUILDDIR%\zlibd.pdb" "%INSTDIR%\bin\" || EXIT /B
+ COPY "%BUILDDIR%\zlibd.pdb" "%INSTDIR%\bin\" || EXIT /B
)
ENDLOCAL
diff --git a/build/appveyor/cl_banner_apache_thrift.bat b/build/appveyor/cl_banner_apache_thrift.bat
deleted file mode 100644
index 78f2a2a..0000000
--- a/build/appveyor/cl_banner_apache_thrift.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-::
-:: 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.
-::
-
-:: A visual indicator in a large log helps you locate things when scanning
-:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Apache%20Thrift
-
-ECHO/
-ECHO ___ __ ________ _ _____
-ECHO / _ | ___ ___ _____/ / ___ /_ __/ / ____(_) _/ /_
-ECHO / __ |/ _ \/ _ `/ __/ _ \/ -_) / / / _ \/ __/ / _/ __/
-ECHO /_/ |_/ .__/\_,_/\__/_//_/\__/ /_/ /_//_/_/ /_/_/ \__/
-ECHO /_/
-ECHO/
diff --git a/build/appveyor/cl_banner_build.bat b/build/appveyor/cl_banner_build.bat
deleted file mode 100644
index 60272f3..0000000
--- a/build/appveyor/cl_banner_build.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-::
-:: 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.
-::
-
-:: A visual indicator in a large log helps you locate things when scanning
-:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Build
-
-ECHO/
-ECHO ___ _ __ __
-ECHO / _ )__ __(_) /__/ /
-ECHO / _ / // / / / _ / @@@ BUILD
-ECHO /____/\_,_/_/_/\_,_/
-ECHO/
diff --git a/build/appveyor/cl_banner_install.bat b/build/appveyor/cl_banner_install.bat
deleted file mode 100644
index fde3da2..0000000
--- a/build/appveyor/cl_banner_install.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-::
-:: 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.
-::
-
-:: A visual indicator in a large log helps you locate things when scanning
-:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Install
-
-ECHO/
-ECHO ____ __ ____
-ECHO / _/__ ___ / /____ _/ / /
-ECHO _/ // _ \(_-^</ __/ _ \/ / / @@@ INSTALL
-ECHO /___/_//_/___/\__/\_,_/_/_/
-ECHO/
diff --git a/build/appveyor/cl_banner_test.bat b/build/appveyor/cl_banner_test.bat
deleted file mode 100644
index 44e2d10..0000000
--- a/build/appveyor/cl_banner_test.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-::
-:: 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.
-::
-
-:: A visual indicator in a large log helps you locate things when scanning
-:: http://www.patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Test
-
-ECHO/
-ECHO ______ __
-ECHO /_ __/__ ___ / /_
-ECHO / / / -_^|_-^</ __/ @@@ TEST
-ECHO /_/ \__/___/\__/
-ECHO/
diff --git a/build/appveyor/cl_setcompiler.bat b/build/appveyor/cl_setcompiler.bat
deleted file mode 100644
index 733ffc5..0000000
--- a/build/appveyor/cl_setcompiler.bat
+++ /dev/null
@@ -1,63 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Detect the compiler edition we're building in.
-:: Set the COMPILER environment variable to one of:
-:: gcc = MinGW / MSYS2 and gcc toolchain
-:: vc100 = Visual Studio 2010
-:: vc110 = Visual Studio 2012
-:: vc120 = Visual Studio 2013
-:: vc140 = Visual Studio 2015
-:: vc141 = Visual Studio 2017
-::
-:: Honors any existing COMPILER environment variable
-:: setting instead of overwriting it, to allow it
-:: to be forced if needed.
-::
-:: Sets ERRORLEVEL to 0 if COMPILER can be determined,
-:: to 1 if it cannot.
-::
-
-IF DEFINED COMPILER (
- ECHO [warn ] using existing environment variable COMPILER
- EXIT /B 0
-)
-
-IF NOT "%PROFILE:~0,4%" == "MSVC" (
- SET COMPILER=gcc
-) ELSE (
- CALL :CHECK 16
- IF !ERRORLEVEL! == 0 (SET COMPILER=vc100)
- CALL :CHECK 17
- IF !ERRORLEVEL! == 0 (SET COMPILER=vc110)
- CALL :CHECK 18
- IF !ERRORLEVEL! == 0 (SET COMPILER=vc120)
- CALL :CHECK 19.0
- IF !ERRORLEVEL! == 0 (SET COMPILER=vc140)
- CALL :CHECK 19.1
- IF !ERRORLEVEL! == 0 (SET COMPILER=vc141)
-)
-
-IF NOT DEFINED COMPILER (
- ECHO [error] unable to determine the compiler edition
- EXIT /B 1
-)
-
-ECHO [info ] detected compiler edition %COMPILER%
-EXIT /B 0
-
-:CHECK
-cl /? 2>&1 | findstr /C:"Version %1%" > nul
-EXIT /B
diff --git a/build/appveyor/cl_setenv.bat b/build/appveyor/cl_setenv.bat
deleted file mode 100644
index 98931a6..0000000
--- a/build/appveyor/cl_setenv.bat
+++ /dev/null
@@ -1,122 +0,0 @@
-::
-:: 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.
-::
-
-@ECHO OFF
-
-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%
-) ELSE IF "%PROFILE%" == "MSVC2015" (
- CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
-) ELSE IF "%PROFILE%" == "MSVC2017" (
- CALL :SETUPNEWERMSVC || EXIT /B
-) ELSE IF "%PROFILE%" == "MINGW" (
- REM Supported, nothing special to do here.
-) ELSE IF "%PROFILE%" == "CYGWIN" (
- REM Supported, nothing special to do here.
-) ELSE (
- ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
- EXIT /B 1
-)
-
-CALL cl_setcompiler.bat || EXIT /B
-CALL cl_setgenerator.bat || EXIT /B
-
-SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
-SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
-SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\..\build\%PROFILE%\%PLATFORM%
-SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
-
-:: PLATFORM is x64 or x86
-:: NORM_PLATFORM is 64 or 32
-SET NORM_PLATFORM=%PLATFORM:~-2,2%
-IF "%NORM_PLATFORM%" == "86" (SET NORM_PLATFORM=32)
-
-IF "%PROFILE:~0,4%" == "MSVC" (
-
- :: FindBoost needs forward slashes so cmake doesn't see something as an escaped character
- SET BOOST_ROOT=C:/Libraries/boost_%BOOST_VERSION:.=_%
- SET BOOST_LIBRARYDIR=!BOOST_ROOT!/lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.%COMPILER:~-1,1%
- SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
- SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
-
- IF "%PYTHON_VERSION%" == "" (
- SET WITH_PYTHON=OFF
- ) ELSE (
- SET WITH_PYTHON=ON
- IF /i "%PLATFORM%" == "x64" SET PTEXT=-x64
- SET PATH=C:\Python%PYTHON_VERSION:.=%!PTEXT!\scripts;C:\Python%PYTHON_VERSION:.=%!PTEXT!;!PATH!
- )
- IF "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
-
- IF NOT "%QT_VERSION%" == "" (
- IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
- SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
- )
-
-) ELSE IF "%PROFILE:~0,4%" == "MING" (
-
- :: PLATFORM = x86 means MINGWPLAT i686
- :: PLATFORM = x64 means MINGWPLAT x86_64
- SET MINGWPLAT=x86_64
- IF "%PLATFORM%" == "x86" (SET MINGWPLAT=i686)
-
- SET BASH=C:\msys64\usr\bin\bash.exe
- !BASH! -lc "sed -i '/export PATH=\/mingw32\/bin/d' ~/.bash_profile && sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw%NORM_PLATFORM%/bin:$PATH' >> ~/.bash_profile" || EXIT /B
-
- SET BUILDDIR=%BUILDDIR:\=/%
- SET BUILDDIR=/c!BUILDDIR:~2!
- SET INSTDIR=%INSTDIR:\=/%
- SET INSTDIR=/c!INSTDIR:~2!
- SET SRCDIR=%SRCDIR:\=/%
- SET SRCDIR=/c!SRCDIR:~2!
-
-) ELSE IF "%PROFILE:~0,4%" == "CYGW" (
-
- SET CYGWINROOT=C:\cygwin
- IF "%PLATFORM%" == "x64" (SET CYGWINROOT=!CYGWINROOT!64)
-
- SET BASH=!CYGWINROOT!\bin\bash.exe
- SET SETUP=!CYGWINROOT!\setup-x86
- IF "%PLATFORM%" == "x64" (SET SETUP=!SETUP!_64)
- SET SETUP=!SETUP!.exe
-
- SET BUILDDIR=%BUILDDIR:\=/%
- SET BUILDDIR=/cygdrive/c!BUILDDIR:~2!
- SET INSTDIR=%INSTDIR:\=/%
- SET INSTDIR_CYG=/cygdrive/c!INSTDIR:~2!
- SET SRCDIR=%SRCDIR:\=/%
- SET SRCDIR=/cygdrive/c!SRCDIR:~2!
-
-)
-
-GOTO :EOF
-
-:SETUPNEWERMSVC
- :: If VsDevCmd.bat has already executed, as is the case in the
- :: msvc2017 docker container, skip this...
- IF NOT DEFINED VSCMD_VER (
- FOR /F "USEBACKQ TOKENS=*" %%i IN (`call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version "[15.0,16.0)" -property installationPath`) DO (
- IF "%MSVCROOT%" == "" (SET MSVCROOT=%%i)
- )
- SET MSVCPLAT=x86
- IF "%PLATFORM%" == "x64" (SET MSVCPLAT=amd64)
-
- SET CURRENTDIR=%CD%
- CALL "!MSVCROOT!\Common7\Tools\VsDevCmd.bat" -arch=!MSVCPLAT! || EXIT /B
- CD %CURRENTDIR%
- EXIT /B
- )
-:EOF
diff --git a/build/appveyor/cl_setgenerator.bat b/build/appveyor/cl_setgenerator.bat
deleted file mode 100644
index 5eb6ff3..0000000
--- a/build/appveyor/cl_setgenerator.bat
+++ /dev/null
@@ -1,79 +0,0 @@
-::
-:: 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.
-::
-
-::
-:: Detect the compiler edition we're building in and then
-:: set the GENERATOR environment variable to one of:
-::
-:: Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
-:: Optional [arch] can be "Win64" or "ARM".
-:: Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
-:: Optional [arch] can be "Win64" or "ARM".
-:: Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
-:: Optional [arch] can be "Win64" or "ARM".
-:: Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
-:: Optional [arch] can be "Win64" or "ARM".
-:: Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
-:: Optional [arch] can be "Win64" or "IA64".
-:: MinGW Makefiles = Generates makefiles for MinGW
-:: MSYS Makefiles = Generates makefiles for MSYS
-:: Unix Makefiles = Generates makefiles for CYGWIN
-::
-:: Honors any existing GENERATOR environment variable
-:: setting instead of overwriting it, to allow it
-:: to be forced if needed.
-::
-:: Sets ERRORLEVEL to 0 if GENERATOR can be determined,
-:: to 1 if it cannot.
-::
-
-IF DEFINED GENERATOR (
- ECHO [warn ] using existing environment variable GENERATOR
- EXIT /B 0
-)
-
-
-IF "%PROFILE:~0,4%" == "MING" (
- SET GENERATOR=MinGW Makefiles
-
-) ELSE IF "%PROFILE:~0,4%" == "CYGW" (
- SET GENERATOR=Unix Makefiles
-
-) ELSE IF "%PROFILE:~0,4%" == "MSYS" (
- SET GENERATOR=MSYS Makefiles
-) ELSE (
- IF /i "%PLATFORM%" == "x64" SET GENARCH= Win64
- CALL :CHECK 16
- IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 10 2010!GENARCH!
- CALL :CHECK 17
- IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 11 2012!GENARCH!
- CALL :CHECK 18
- IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 12 2013!GENARCH!
- CALL :CHECK 19.0
- IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 14 2015!GENARCH!
- CALL :CHECK 19.1
- IF !ERRORLEVEL! == 0 SET GENERATOR=Visual Studio 15 2017!GENARCH!
-)
-
-IF NOT DEFINED GENERATOR (
- ECHO [error] unable to determine the CMake generator to use
- EXIT /B 1
-)
-
-ECHO [info ] using CMake generator %GENERATOR%
-EXIT /B 0
-
-:CHECK
-cl /? 2>&1 | findstr /C:"Version %1%" > nul
-EXIT /B
diff --git a/build/appveyor/simulate-appveyor.bat b/build/appveyor/simulate-appveyor.bat
index 8674f40..351c3ee 100644
--- a/build/appveyor/simulate-appveyor.bat
+++ b/build/appveyor/simulate-appveyor.bat
@@ -19,7 +19,6 @@
:: simulate-appveyor.bat [Debug|Release] [x86|x64] [CYGWIN|MINGW|MSVC201?]
::
-@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET APPVEYOR_BUILD_FOLDER=%~dp0..\..
@@ -28,8 +27,4 @@
SET PROFILE=%3
CD %APPVEYOR_BUILD_FOLDER%
-CALL build\appveyor\%PROFILE:~0,4%-appveyor-install.bat || EXIT /B
-CD %APPVEYOR_BUILD_FOLDER%
-CALL build\appveyor\%PROFILE:~0,4%-appveyor-build.bat || EXIT /B
-CD %APPVEYOR_BUILD_FOLDER%
-CALL build\appveyor\%PROFILE:~0,4%-appveyor-test.bat
+CALL build\appveyor\%PROFILE_CLASS%-appveyor-full.bat || EXIT /B
diff --git a/build/appveyor/cl_showenv.bat b/build/appveyor/win_showenv.bat
similarity index 97%
rename from build/appveyor/cl_showenv.bat
rename to build/appveyor/win_showenv.bat
index a70a490..51bf2c0 100644
--- a/build/appveyor/cl_showenv.bat
+++ b/build/appveyor/win_showenv.bat
@@ -14,7 +14,7 @@
ECHO/
ECHO ===============================================================================
-IF "%PROFILE:~0,4%" == "MSVC" (
+IF "%PROFILE_CLASS%" == "MSVC" (
ECHO Versions
ECHO -------------------------------------------------------------------------------
ECHO boost = %BOOST_VERSION%
@@ -49,7 +49,7 @@
ECHO WIN3P = %WIN3P%
ECHO WITH_PYTHON = %WITH_PYTHON%
ECHO ZLIB_STATIC_SUFFIX = %ZLIB_STATIC_SUFFIX%
-IF NOT "%PROFILE:~0,4%" == "MSVC" (
+IF NOT "%PROFILE_CLASS%" == "MSVC" (
ECHO/
ECHO UNIXy PATH
ECHO -------------------------------------------------------------------------------
diff --git a/build/cmake/BoostMacros.cmake b/build/cmake/BoostMacros.cmake
index cc50b53..ffb85af 100644
--- a/build/cmake/BoostMacros.cmake
+++ b/build/cmake/BoostMacros.cmake
@@ -19,17 +19,10 @@
set(BOOST_MINREV 1.56)
-# we are not ready for the new style link targets introduced in
-# boost 1.70.0 and cmake 3.14.2 which showed up on appveyor in
-# mingw builds
-set(Boost_NO_BOOST_CMAKE ON)
-
macro(REQUIRE_BOOST_HEADERS)
find_package(Boost ${BOOST_MINREV} QUIET REQUIRED)
if (NOT Boost_FOUND)
- string(CONCAT fatal_message
- "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}")
- message(FATAL_ERROR, ${fatal_message})
+ message(FATAL_ERROR "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if (DEFINED Boost_INCLUDE_DIRS)
# pre-boost 1.70.0 aware cmake, otherwise it is using targets
@@ -41,9 +34,6 @@
message(STATUS "Locating boost libraries required by sources in ${CMAKE_CURRENT_SOURCE_DIR}")
find_package(Boost ${BOOST_MINREV} REQUIRED COMPONENTS ${${libs}})
if (NOT Boost_FOUND)
- string(CONCAT fatal_message
- "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, "
- "or use -DBUILD_TESTING=OFF")
- message(FATAL_ERROR, ${fatal_message})
+ message(FATAL_ERROR "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, or use -DBUILD_TESTING=OFF")
endif()
endmacro()
diff --git a/build/cmake/ConfigureChecks.cmake b/build/cmake/ConfigureChecks.cmake
index 276d8ef..29b8bbe 100644
--- a/build/cmake/ConfigureChecks.cmake
+++ b/build/cmake/ConfigureChecks.cmake
@@ -21,6 +21,9 @@
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckSymbolExists)
+include(CheckStructHasMember)
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
if (Inttypes_FOUND)
# This allows the inttypes.h and stdint.h checks to succeed on platforms that
@@ -52,14 +55,24 @@
check_include_file(string.h HAVE_STRING_H)
check_include_file(strings.h HAVE_STRINGS_H)
+# Check for afunix.h on Windows (since Windows 10 Insider Build 17063):
+check_cxx_source_compiles(
+ "
+ #define WIN32_LEAN_AND_MEAN
+ #include <winsock2.h>
+ #include <windows.h>
+ #include <afunix.h>
+ int main(){(void)sizeof(((struct sockaddr_un *)0)->sun_path); return 0;}
+ "
+ HAVE_AF_UNIX_H)
+
+
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
check_function_exists(gethostbyname_r HAVE_GETHOSTBYNAME_R)
check_function_exists(strerror_r HAVE_STRERROR_R)
check_function_exists(sched_get_priority_max HAVE_SCHED_GET_PRIORITY_MAX)
check_function_exists(sched_get_priority_min HAVE_SCHED_GET_PRIORITY_MIN)
-include(CheckCSourceCompiles)
-include(CheckCXXSourceCompiles)
check_cxx_source_compiles(
"
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 1fa7a56..3cca31e 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -145,7 +145,7 @@
# Visual Studio only options
if(MSVC)
- option(WITH_MT "Build using MT instead of MD (MSVC only)" OFF)
+ option(WITH_MT "Build using the static runtime 'MT' instead of the shared DLL-specific runtime 'MD' (MSVC only)" OFF)
endif(MSVC)
macro(MESSAGE_DEP flag summary)
@@ -207,6 +207,9 @@
message(STATUS " Build Python library: ${BUILD_PYTHON}")
MESSAGE_DEP(WITH_PYTHON "Disabled by WITH_PYTHON=OFF")
MESSAGE_DEP(PYTHONLIBS_FOUND "Python libraries missing")
+if(MSVC)
+ message(STATUS " Using static runtime library: ${WITH_MT}")
+endif(MSVC)
message(STATUS)
message(STATUS)
message(STATUS "----------------------------------------------------------")
diff --git a/build/cmake/ThriftMacros.cmake b/build/cmake/ThriftMacros.cmake
index 392b96b..65ca4ee 100644
--- a/build/cmake/ThriftMacros.cmake
+++ b/build/cmake/ThriftMacros.cmake
@@ -28,7 +28,8 @@
target_include_directories(${name} INTERFACE $<INSTALL_INTERFACE:include>)
set_target_properties(${name} PROPERTIES
OUTPUT_NAME ${name}${THRIFT_RUNTIME_POSTFIX} # windows link variants (/MT, /MD, /MTd, /MDd) get different names
- VERSION ${thrift_VERSION} )
+ VERSION ${thrift_VERSION})
+
# set_target_properties(${name} PROPERTIES PUBLIC_HEADER "${thriftcpp_HEADERS}")
install(TARGETS ${name} EXPORT "${name}Targets"
RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
@@ -44,20 +45,4 @@
FILE "${name}Targets.cmake"
NAMESPACE "${name}::"
DESTINATION "${CMAKE_INSTALL_DIR}/thrift")
-endmacro()
-
-macro(TARGET_INCLUDE_DIRECTORIES_THRIFT name)
- target_include_directories(${name} ${ARGN})
-endmacro()
-
-macro(TARGET_LINK_LIBRARIES_THRIFT name)
- target_link_libraries(${name} ${ARGN})
-endmacro()
-
-macro(LINK_AGAINST_THRIFT_LIBRARY target)
- target_link_libraries(${target} ${ARGN})
-endmacro()
-
-macro(TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY target libname)
- target_link_libraries(${target} ${ARGN} ${libname})
-endmacro()
+endmacro()
\ No newline at end of file
diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in
index a3d6642..afcdc1e 100644
--- a/build/cmake/config.h.in
+++ b/build/cmake/config.h.in
@@ -131,7 +131,10 @@
#cmakedefine HAVE_SCHED_H 1
/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <afunix.h> header file. */
+#cmakedefine HAVE_AF_UNIX_H 1
/*************************** FUNCTIONS ***************************/
diff --git a/build/docker/msvc2017/build-compiler.bat b/build/docker/msvc2017/build-compiler.bat
index 5534428..a7ed479 100644
--- a/build/docker/msvc2017/build-compiler.bat
+++ b/build/docker/msvc2017/build-compiler.bat
@@ -41,4 +41,4 @@
cmake --build . --target check || EXIT /B
:: Install
-cmake --build . --target install
\ No newline at end of file
+cmake --install .
\ No newline at end of file
diff --git a/build/docker/msvc2017/build.bat b/build/docker/msvc2017/build.bat
index 018805b..bdf1512 100644
--- a/build/docker/msvc2017/build.bat
+++ b/build/docker/msvc2017/build.bat
@@ -42,4 +42,4 @@
cmake --build . --target check || EXIT /B
:: Install
-cmake --build . --target install
+cmake --install .
diff --git a/build/docker/old/debian-stretch/Dockerfile b/build/docker/old/debian-stretch/Dockerfile
index ebb5e24..541223c 100644
--- a/build/docker/old/debian-stretch/Dockerfile
+++ b/build/docker/old/debian-stretch/Dockerfile
@@ -102,7 +102,10 @@
# project isn't ready for this quite yet:
# RUN apt-get install -y --no-install-recommends \
# `# dotnet core dependencies` \
-# dotnet-sdk-5.0
+# dotnet-sdk-5.0 \
+# dotnet-runtime-5.0 \
+# aspnetcore-runtime-5.0 \
+# dotnet-apphost-pack-5.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/old/ubuntu-artful/Dockerfile b/build/docker/old/ubuntu-artful/Dockerfile
index cb723a2..282429a 100644
--- a/build/docker/old/ubuntu-artful/Dockerfile
+++ b/build/docker/old/ubuntu-artful/Dockerfile
@@ -114,13 +114,16 @@
rm -rf openssl-master
RUN apt-get install -y --no-install-recommends \
- `# Dart dependencies` \
+`# Dart dependencies` \
dart=$DART_VERSION
ENV PATH /usr/lib/dart/bin:$PATH
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-5.0
+ dotnet-sdk-5.0 \
+ dotnet-runtime-5.0 \
+ aspnetcore-runtime-5.0 \
+ dotnet-apphost-pack-5.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index fc086cf..bd82225 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -120,13 +120,16 @@
ENV DART_VERSION 2.7.2-1
RUN apt-get install -y --no-install-recommends \
- `# Dart dependencies` \
+`# Dart dependencies` \
dart=$DART_VERSION
ENV PATH /usr/lib/dart/bin:$PATH
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-5.0
+ dotnet-sdk-5.0 \
+ dotnet-runtime-5.0 \
+ aspnetcore-runtime-5.0 \
+ dotnet-apphost-pack-5.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/ubuntu-disco/Dockerfile b/build/docker/ubuntu-disco/Dockerfile
index af8f47f..6b35915 100644
--- a/build/docker/ubuntu-disco/Dockerfile
+++ b/build/docker/ubuntu-disco/Dockerfile
@@ -120,13 +120,16 @@
ENV DART_VERSION 2.7.2-1
RUN apt-get install -y --no-install-recommends \
- `# Dart dependencies` \
+`# Dart dependencies` \
dart=$DART_VERSION
ENV PATH /usr/lib/dart/bin:$PATH
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-5.0
+ dotnet-sdk-5.0 \
+ dotnet-runtime-5.0 \
+ aspnetcore-runtime-5.0 \
+ dotnet-apphost-pack-5.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile
index 3443f92..1d78a28 100644
--- a/build/docker/ubuntu-xenial/Dockerfile
+++ b/build/docker/ubuntu-xenial/Dockerfile
@@ -113,7 +113,10 @@
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-5.0
+ dotnet-sdk-5.0 \
+ dotnet-runtime-5.0 \
+ aspnetcore-runtime-5.0 \
+ dotnet-apphost-pack-5.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/veralign.sh b/build/veralign.sh
index 3823e2d..adac0c5 100755
--- a/build/veralign.sh
+++ b/build/veralign.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+x#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -59,7 +59,6 @@
FILES[contrib/zeromq/csharp/AssemblyInfo.cs]=simpleReplace
FILES[contrib/thrift-maven-plugin/pom.xml]=pomReplace
FILES[doc/specs/idl.md]=simpleReplace
-FILES[lib/as3/gradle.properties]=simpleReplace
FILES[lib/d/src/thrift/base.d]=simpleReplace
FILES[lib/dart/pubspec.yaml]=pubspecReplace
FILES[lib/delphi/src/Thrift.pas]=simpleReplace
diff --git a/compiler/cpp/README.md b/compiler/cpp/README.md
index 8d6edac..8e3a90b 100644
--- a/compiler/cpp/README.md
+++ b/compiler/cpp/README.md
@@ -58,8 +58,9 @@
- Install/update flex, bison and cmake with brew
```
-brew install cmake
+brew install flex
brew install bison
+brew install cmake
```
- Go to **thrift\compiler\cpp**
@@ -73,7 +74,7 @@
#### Usage of other IDEs
-Please check list of supported IDE
+Please check list of supported IDE
```
cmake --help
@@ -84,7 +85,7 @@
### Prerequisites
- Install CMake - https://cmake.org/download/
- In case if you want to build without Git Bash - install winflexbison - https://sourceforge.net/projects/winflexbison/
-- In case if you want to build with Visual Studio - install Visual Studio
+- In case if you want to build with Visual Studio - install Visual Studio
- Better to use the latest stable Visual Studio Community Edition - https://www.visualstudio.com/vs/whatsnew/ (ensure that you installed workload "Desktop Development with C++" for VS2017) - Microsoft added some support for CMake and improving it in Visual Studio
### Build using Git Bash
@@ -125,11 +126,11 @@
If you don't want to use CMake you can use the already available Visual Studio 2010 solution.
-The Visual Studio project contains pre-build commands to generate the thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build the compiler.
+The Visual Studio project contains pre-build commands to generate the thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build the compiler.
These depend on bison, flex and their dependencies to work properly.
-Download flex & bison as described above.
+Download flex & bison as described above.
Place these binaries somewhere in the path and rename win_flex.exe and win_bison.exe to flex.exe and bison.exe respectively.
@@ -172,4 +173,4 @@
- pls check **tests** folder
-# Have a Happy free time and holidays
+# Have a Happy free time and holidays
diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index 910eed3..7897b62 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -1309,7 +1309,7 @@
t_type* ktype = ((t_map*)type)->get_key_type();
t_type* vtype = ((t_map*)type)->get_val_type();
const map<t_const_value*, t_const_value*, t_const_value::value_compare>& val = value->get_map();
- out << "map[" << type_to_go_type(ktype) << "]" << type_to_go_type(vtype) << "{" << endl;
+ out << "map[" << type_to_go_key_type(ktype) << "]" << type_to_go_type(vtype) << "{" << endl;
indent_up();
map<t_const_value*, t_const_value*, t_const_value::value_compare>::const_iterator v_iter;
@@ -1336,7 +1336,7 @@
} else if (type->is_set()) {
t_type* etype = ((t_set*)type)->get_elem_type();
const vector<t_const_value*>& val = value->get_list();
- out << "[]" << type_to_go_key_type(etype) << "{" << endl;
+ out << "[]" << type_to_go_type(etype) << "{" << endl;
indent_up();
vector<t_const_value*>::const_iterator v_iter;
diff --git a/compiler/cpp/src/thrift/version.h b/compiler/cpp/src/thrift/version.h
index 8cbec4e..bce719a 100644
--- a/compiler/cpp/src/thrift/version.h
+++ b/compiler/cpp/src/thrift/version.h
@@ -24,6 +24,6 @@
#pragma once
#endif // _MSC_VER
-#define THRIFT_VERSION "0.15.0"
+#define THRIFT_VERSION "0.16.0"
#endif // _THRIFT_VERSION_H_
diff --git a/configure.ac b/configure.ac
index 93d761d..32c2471 100755
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
AC_PREREQ(2.65)
AC_CONFIG_MACRO_DIR([./aclocal])
-AC_INIT([thrift], [0.15.0])
+AC_INIT([thrift], [0.16.0])
AC_CONFIG_AUX_DIR([.])
diff --git a/contrib/Rebus/Properties/AssemblyInfo.cs b/contrib/Rebus/Properties/AssemblyInfo.cs
index ba587b5..97c89d1 100644
--- a/contrib/Rebus/Properties/AssemblyInfo.cs
+++ b/contrib/Rebus/Properties/AssemblyInfo.cs
@@ -34,5 +34,5 @@
[assembly: Guid("0af10984-40d3-453d-b1e5-421529e8c7e2")]
-[assembly: AssemblyVersion("0.15.0.0")]
-[assembly: AssemblyFileVersion("0.15.0.0")]
+[assembly: AssemblyVersion("0.16.0.0")]
+[assembly: AssemblyFileVersion("0.16.0.0")]
diff --git a/contrib/thrift-maven-plugin/pom.xml b/contrib/thrift-maven-plugin/pom.xml
index 8928453..1290895 100644
--- a/contrib/thrift-maven-plugin/pom.xml
+++ b/contrib/thrift-maven-plugin/pom.xml
@@ -32,7 +32,7 @@
<artifactId>thrift-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>thrift-maven-plugin</name>
- <version>0.15.0</version>
+ <version>0.16.0</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
diff --git a/contrib/thrift.spec b/contrib/thrift.spec
index 8578bac..feb95a1 100644
--- a/contrib/thrift.spec
+++ b/contrib/thrift.spec
@@ -28,7 +28,7 @@
License: Apache License v2.0
Group: Development
Summary: RPC and serialization framework
-Version: 0.15.0
+Version: 0.16.0
Release: 0
URL: http://thrift.apache.org
Packager: Thrift Developers <dev@thrift.apache.org>
diff --git a/contrib/zeromq/csharp/AssemblyInfo.cs b/contrib/zeromq/csharp/AssemblyInfo.cs
index 8043c6d..dc59f23 100644
--- a/contrib/zeromq/csharp/AssemblyInfo.cs
+++ b/contrib/zeromq/csharp/AssemblyInfo.cs
@@ -36,7 +36,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("0.15.0.0")]
+[assembly: AssemblyVersion("0.16.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
diff --git a/doc/specs/idl.md b/doc/specs/idl.md
index adcbb71..019c7f6 100644
--- a/doc/specs/idl.md
+++ b/doc/specs/idl.md
@@ -1,6 +1,6 @@
## Thrift interface description language
-For Thrift version 0.15.0.
+For Thrift version 0.16.0.
The Thrift interface definition language (IDL) allows for the definition of [Thrift Types](/docs/types). A Thrift IDL file is processed by the Thrift code generator to produce code for the various target languages to support the defined structs and services in the IDL file.
diff --git a/doc/specs/thrift-binary-protocol.md b/doc/specs/thrift-binary-protocol.md
index fc3338f..4284328 100644
--- a/doc/specs/thrift-binary-protocol.md
+++ b/doc/specs/thrift-binary-protocol.md
@@ -1,4 +1,4 @@
-Thrift Binary protocol encoding
+Thrift Binary protocol encoding
===============================
<!--
@@ -182,12 +182,12 @@
The following field-types are used:
* `BOOL`, encoded as `2`
-* `BYTE`, encoded as `3`
+* `I8`, encoded as `3`
* `DOUBLE`, encoded as `4`
* `I16`, encoded as `6`
* `I32`, encoded as `8`
* `I64`, encoded as `10`
-* `STRING`, used for binary and string fields, encoded as `11`
+* `BINARY`, used for binary and string fields, encoded as `11`
* `STRUCT`, used for structs and union fields, encoded as `12`
* `MAP`, encoded as `13`
* `SET`, encoded as `14`
diff --git a/doc/specs/thrift-compact-protocol.md b/doc/specs/thrift-compact-protocol.md
index 89301eb..07cc562 100644
--- a/doc/specs/thrift-compact-protocol.md
+++ b/doc/specs/thrift-compact-protocol.md
@@ -205,7 +205,7 @@
* `BOOLEAN_TRUE`, encoded as `1`
* `BOOLEAN_FALSE`, encoded as `2`
-* `BYTE`, encoded as `3`
+* `I8`, encoded as `3`
* `I16`, encoded as `4`
* `I32`, encoded as `5`
* `I64`, encoded as `6`
@@ -245,20 +245,22 @@
The short form should be used when the length is in the range 0 - 14 (inclusive).
-The following element-types are used (note that these are _different_ from the field-types):
+The following element-types are used (see note below):
* `BOOL`, encoded as `2`
-* `BYTE`, encoded as `3`
-* `DOUBLE`, encoded as `4`
-* `I16`, encoded as `6`
-* `I32`, encoded as `8`
-* `I64`, encoded as `10`
-* `STRING`, used for binary and string fields, encoded as `11`
+* `I8`, encoded as `3`
+* `I16`, encoded as `4`
+* `I32`, encoded as `5`
+* `I64`, encoded as `6`
+* `DOUBLE`, encoded as `7`
+* `BINARY`, used for binary and string fields, encoded as `8`
+* `LIST`, encoded as `9`
+* `SET`, encoded as `10`
+* `MAP`, encoded as `11`
* `STRUCT`, used for structs and union fields, encoded as `12`
-* `MAP`, encoded as `13`
-* `SET`, encoded as `14`
-* `LIST`, encoded as `15`
+*Note*: Although field-types and element-types lists are currently very similar, there is _no guarantee_ that this will
+remain true after new types are added.
The maximum list/set size is configurable. By default there is no limit (meaning the limit is the maximum int32 value:
2147483647).
diff --git a/lib/c_glib/CMakeLists.txt b/lib/c_glib/CMakeLists.txt
index 2bee9e4..218f7dd 100644
--- a/lib/c_glib/CMakeLists.txt
+++ b/lib/c_glib/CMakeLists.txt
@@ -24,7 +24,7 @@
include_directories(src)
# SYSLIBS contains libraries that need to be linked to all lib targets
-set(SYSLIBS ${GLIB_LIBRARIES} ${GLIB_GOBJECT_LIBRARIES})
+list(APPEND SYSLIBS ${GLIB_LIBRARIES} ${GLIB_GOBJECT_LIBRARIES})
# Create the thrift C glib library
set(thrift_c_glib_SOURCES
@@ -67,31 +67,40 @@
src/thrift/c_glib/transport/thrift_transport.c
src/thrift/c_glib/transport/thrift_transport_factory.c
src/thrift/c_glib/transport/thrift_zlib_transport.c
- src/thrift/c_glib/transport/thrift_zlib_transport_factory.c
+ src/thrift/c_glib/transport/thrift_zlib_transport_factory.c
)
# If OpenSSL is not found just ignore the OpenSSL stuff
-if(WITH_OPENSSL)
+if(OPENSSL_FOUND AND WITH_OPENSSL)
list(APPEND thrift_c_glib_SOURCES
src/thrift/c_glib/transport/thrift_ssl_socket.c
)
- include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
- list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}")
+ if(TARGET OpenSSL::SSL OR TARGET OpenSSL::Crypto)
+ if(TARGET OpenSSL::SSL)
+ list(APPEND SYSLIBS OpenSSL::SSL)
+ endif()
+ if(TARGET OpenSSL::Crypto)
+ list(APPEND SYSLIBS OpenSSL::Crypto)
+ endif()
+ else()
+ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
+ list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}")
+ endif()
endif()
-# Contains the thrift specific ADD_LIBRARY_THRIFT and TARGET_LINK_LIBRARIES_THRIFT
+# Contains the thrift specific ADD_LIBRARY_THRIFT macro
include(ThriftMacros)
ADD_LIBRARY_THRIFT(thrift_c_glib ${thrift_c_glib_SOURCES})
-TARGET_LINK_LIBRARIES_THRIFT(thrift_c_glib PUBLIC ${SYSLIBS})
+target_link_libraries(thrift_c_glib PUBLIC ${SYSLIBS})
# If Zlib is not found just ignore the Zlib stuff
if(WITH_ZLIB)
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})
ADD_LIBRARY_THRIFT(thrift_c_glib_zlib ${thrift_c_glib_zlib_SOURCES})
- TARGET_LINK_LIBRARIES_THRIFT(thrift_c_glib_zlib ${SYSLIBS} ${ZLIB_LIBRARIES})
- TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thrift_c_glib_zlib thrift_c_glib)
+ target_link_libraries(thrift_c_glib_zlib ${SYSLIBS} ${ZLIB_LIBRARIES})
+ target_link_libraries(thrift_c_glib_zlib thrift_c_glib)
endif()
# Install the headers
diff --git a/lib/c_glib/test/CMakeLists.txt b/lib/c_glib/test/CMakeLists.txt
index c46014d..85c6dd0 100644
--- a/lib/c_glib/test/CMakeLists.txt
+++ b/lib/c_glib/test/CMakeLists.txt
@@ -52,48 +52,48 @@
)
add_library(testgenc STATIC ${testgenc_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(testgenc thrift_c_glib)
+target_link_libraries(testgenc thrift_c_glib)
add_executable(testserialization testserialization.c)
target_link_libraries(testserialization testgenc)
-LINK_AGAINST_THRIFT_LIBRARY(testserialization thrift_c_glib)
+target_link_libraries(testserialization thrift_c_glib)
add_test(NAME testserialization COMMAND testserialization)
add_executable(testapplicationexception testapplicationexception.c)
-LINK_AGAINST_THRIFT_LIBRARY(testapplicationexception thrift_c_glib)
+target_link_libraries(testapplicationexception thrift_c_glib)
add_test(NAME testapplicationexception COMMAND testapplicationexception)
add_executable(testtransportsocket testtransportsocket.c)
-LINK_AGAINST_THRIFT_LIBRARY(testtransportsocket thrift_c_glib)
+target_link_libraries(testtransportsocket thrift_c_glib)
add_test(NAME testtransportsocket COMMAND testtransportsocket)
add_executable(testbinaryprotocol testbinaryprotocol.c)
-LINK_AGAINST_THRIFT_LIBRARY(testbinaryprotocol thrift_c_glib)
+target_link_libraries(testbinaryprotocol thrift_c_glib)
add_test(NAME testbinaryprotocol COMMAND testbinaryprotocol)
add_executable(testcompactprotocol testcompactprotocol.c)
-LINK_AGAINST_THRIFT_LIBRARY(testcompactprotocol thrift_c_glib)
+target_link_libraries(testcompactprotocol thrift_c_glib)
add_test(NAME testcompactprotocol COMMAND testcompactprotocol)
add_executable(testbufferedtransport testbufferedtransport.c)
-LINK_AGAINST_THRIFT_LIBRARY(testbufferedtransport thrift_c_glib)
+target_link_libraries(testbufferedtransport thrift_c_glib)
add_test(NAME testbufferedtransport COMMAND testbufferedtransport)
add_executable(testframedtransport testframedtransport.c)
-LINK_AGAINST_THRIFT_LIBRARY(testframedtransport thrift_c_glib)
+target_link_libraries(testframedtransport thrift_c_glib)
add_test(NAME testframedtransport COMMAND testframedtransport)
add_executable(testfdtransport testfdtransport.c)
-LINK_AGAINST_THRIFT_LIBRARY(testfdtransport thrift_c_glib)
+target_link_libraries(testfdtransport thrift_c_glib)
add_test(NAME testfdtransport COMMAND testfdtransport)
add_executable(testmemorybuffer testmemorybuffer.c)
-LINK_AGAINST_THRIFT_LIBRARY(testmemorybuffer thrift_c_glib)
+target_link_libraries(testmemorybuffer thrift_c_glib)
add_test(NAME testmemorybuffer COMMAND testmemorybuffer)
add_executable(testsimpleserver testsimpleserver.c)
-LINK_AGAINST_THRIFT_LIBRARY(testsimpleserver thrift_c_glib)
+target_link_libraries(testsimpleserver thrift_c_glib)
add_test(NAME testsimpleserver COMMAND testsimpleserver)
add_executable(testdebugproto testdebugproto.c)
@@ -132,7 +132,7 @@
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
add_executable(testzlibtransport testzlibtransport.c)
target_link_libraries(testzlibtransport testgenc ${ZLIB_LIBRARIES})
- LINK_AGAINST_THRIFT_LIBRARY(testzlibtransport thrift_c_glib_zlib)
+ target_link_libraries(testzlibtransport thrift_c_glib_zlib)
add_test(NAME testzlibtransport COMMAND testzlibtransport)
endif(WITH_ZLIB)
@@ -162,7 +162,7 @@
)
add_library(testgenc_cpp STATIC ${testgenc_cpp_SOURCES})
- LINK_AGAINST_THRIFT_LIBRARY(testgenc_cpp thrift)
+ target_link_libraries(testgenc_cpp thrift)
#HACK: testthrifttestclient.cpp includes ThriftTest.h without gen-*/ prefixes
# so we include it here
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 7a656c0..c84e6e2 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -27,11 +27,8 @@
add_definitions("-DTHRIFT_STATIC_DEFINE")
endif()
-# SYSLIBS contains libraries that need to be linked to all lib targets
-set(SYSLIBS "")
-
# Create the thrift C++ library
-set( thriftcpp_SOURCES
+set(thriftcpp_SOURCES
src/thrift/TApplicationException.cpp
src/thrift/TOutput.cpp
src/thrift/async/TAsyncChannel.cpp
@@ -102,12 +99,21 @@
# If OpenSSL is not found or disabled just ignore the OpenSSL stuff
if(OPENSSL_FOUND AND WITH_OPENSSL)
- list( APPEND thriftcpp_SOURCES
+ list(APPEND thriftcpp_SOURCES
src/thrift/transport/TSSLSocket.cpp
src/thrift/transport/TSSLServerSocket.cpp
)
- include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
- list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}")
+ if(TARGET OpenSSL::SSL OR TARGET OpenSSL::Crypto)
+ if(TARGET OpenSSL::SSL)
+ list(APPEND SYSLIBS OpenSSL::SSL)
+ endif()
+ if(TARGET OpenSSL::Crypto)
+ list(APPEND SYSLIBS OpenSSL::Crypto)
+ endif()
+ else()
+ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
+ list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}")
+ endif()
endif()
if(UNIX)
@@ -117,7 +123,8 @@
list(APPEND SYSLIBS pthread)
endif()
endif()
-set( thriftcpp_threads_SOURCES
+
+set(thriftcpp_threads_SOURCES
src/thrift/concurrency/ThreadFactory.cpp
src/thrift/concurrency/Thread.cpp
src/thrift/concurrency/Monitor.cpp
@@ -125,7 +132,7 @@
)
# Thrift non blocking server
-set( thriftcppnb_SOURCES
+set(thriftcppnb_SOURCES
src/thrift/server/TNonblockingServer.cpp
src/thrift/transport/TNonblockingServerSocket.cpp
src/thrift/async/TEvhttpServer.cpp
@@ -134,13 +141,13 @@
# If OpenSSL is not found or disabled just ignore the OpenSSL stuff
if(OPENSSL_FOUND AND WITH_OPENSSL)
- list( APPEND thriftcppnb_SOURCES
+ list(APPEND thriftcppnb_SOURCES
src/thrift/transport/TNonblockingSSLServerSocket.cpp
)
endif()
# Thrift zlib transport
-set( thriftcppz_SOURCES
+set(thriftcppz_SOURCES
src/thrift/transport/TZlibTransport.cpp
src/thrift/protocol/THeaderProtocol.cpp
src/thrift/transport/THeaderTransport.cpp
@@ -148,14 +155,13 @@
src/thrift/transport/THeaderTransport.cpp
)
-# Contains the thrift specific ADD_LIBRARY_THRIFT and TARGET_LINK_LIBRARIES_THRIFT
+# Contains the thrift specific ADD_LIBRARY_THRIFT macro
include(ThriftMacros)
ADD_LIBRARY_THRIFT(thrift ${thriftcpp_SOURCES} ${thriftcpp_threads_SOURCES})
+target_link_libraries(thrift PUBLIC ${SYSLIBS})
if(WIN32)
- TARGET_LINK_LIBRARIES_THRIFT(thrift PUBLIC ${SYSLIBS} ws2_32)
-else()
- TARGET_LINK_LIBRARIES_THRIFT(thrift PUBLIC ${SYSLIBS})
+ target_link_libraries(thrift PUBLIC ws2_32)
endif()
ADD_PKGCONFIG_THRIFT(thrift)
@@ -164,12 +170,12 @@
include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES})
- LINK_AGAINST_THRIFT_LIBRARY(thriftnb PUBLIC thrift)
+ target_link_libraries(thriftnb PUBLIC thrift)
if(TARGET libevent::core AND TARGET libevent::extra)
# libevent was found via its cmake config, use modern style targets
- TARGET_LINK_LIBRARIES_THRIFT(thriftnb PUBLIC libevent::core libevent::extra)
+ target_link_libraries(thriftnb PUBLIC libevent::core libevent::extra)
else()
- TARGET_LINK_LIBRARIES_THRIFT(thriftnb PUBLIC ${LIBEVENT_LIBRARIES})
+ target_link_libraries(thriftnb PUBLIC ${LIBEVENT_LIBRARIES})
endif()
ADD_PKGCONFIG_THRIFT(thrift-nb)
endif()
@@ -179,8 +185,8 @@
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})
ADD_LIBRARY_THRIFT(thriftz ${thriftcppz_SOURCES})
- LINK_AGAINST_THRIFT_LIBRARY(thriftz PUBLIC thrift)
- TARGET_LINK_LIBRARIES_THRIFT(thriftz PUBLIC ${ZLIB_LIBRARIES})
+ target_link_libraries(thriftz PUBLIC thrift)
+ target_link_libraries(thriftz PUBLIC ${ZLIB_LIBRARIES})
ADD_PKGCONFIG_THRIFT(thrift-z)
endif()
diff --git a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
index 1678091..9270ab8 100644
--- a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
@@ -20,6 +20,7 @@
#define _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_TCC_ 1
#include <limits>
+#include <cstdlib>
#include "thrift/config.h"
diff --git a/lib/cpp/src/thrift/qt/CMakeLists.txt b/lib/cpp/src/thrift/qt/CMakeLists.txt
index fc1a2c2..6d966cc 100644
--- a/lib/cpp/src/thrift/qt/CMakeLists.txt
+++ b/lib/cpp/src/thrift/qt/CMakeLists.txt
@@ -24,5 +24,5 @@
set(CMAKE_AUTOMOC ON)
find_package(Qt5 REQUIRED COMPONENTS Core Network)
ADD_LIBRARY_THRIFT(thriftqt5 ${thriftcppqt5_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(thriftqt5 PUBLIC thrift)
-TARGET_LINK_LIBRARIES_THRIFT(thriftqt5 PUBLIC Qt5::Core Qt5::Network)
+target_link_libraries(thriftqt5 PUBLIC thrift)
+target_link_libraries(thriftqt5 PUBLIC Qt5::Core Qt5::Network)
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
index ea394c8..f2b3e70 100644
--- a/lib/cpp/src/thrift/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
@@ -1438,7 +1438,7 @@
#ifdef HAVE_SCHED_H
// Start out with a standard, low-priority setup for the sched params.
struct sched_param sp;
- bzero((void*)&sp, sizeof(sp));
+ memset(static_cast<void*>(&sp), 0, sizeof(sp));
int policy = SCHED_OTHER;
// If desired, set up high-priority sched params structure.
diff --git a/lib/cpp/src/thrift/thrift-config.h b/lib/cpp/src/thrift/thrift-config.h
index d648706..71da4cb 100644
--- a/lib/cpp/src/thrift/thrift-config.h
+++ b/lib/cpp/src/thrift/thrift-config.h
@@ -19,6 +19,5 @@
#ifdef _WIN32
#include <thrift/windows/config.h>
-#else
-#include <thrift/config.h>
#endif
+#include <thrift/config.h>
diff --git a/lib/cpp/src/thrift/transport/SocketCommon.cpp b/lib/cpp/src/thrift/transport/SocketCommon.cpp
index 570f39a..0b064c7 100644
--- a/lib/cpp/src/thrift/transport/SocketCommon.cpp
+++ b/lib/cpp/src/thrift/transport/SocketCommon.cpp
@@ -19,32 +19,17 @@
* @author: David Suárez <david.sephirot@gmail.com>
*/
-#ifndef THRIFT_SOCKETCOMMON_H
-#define THRIFT_SOCKETCOMMON_H
-
-#ifndef _WIN32
-
-#include <thrift/thrift-config.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-#include <string>
-
+#include <thrift/transport/SocketCommon.h>
#include <thrift/transport/PlatformSocket.h>
#include <thrift/transport/TTransportException.h>
#include <thrift/TOutput.h>
+#include <cstring>
+
namespace apache {
namespace thrift {
namespace transport {
-
socklen_t fillUnixSocketAddr(struct sockaddr_un& address, std::string& path)
{
// abstract namespace socket ?
@@ -79,7 +64,3 @@
}
}
} // apache::thrift::transport
-
-#endif // _WIN32
-
-#endif //THRIFT_SOCKETCOMMON_H
diff --git a/lib/cpp/src/thrift/transport/SocketCommon.h b/lib/cpp/src/thrift/transport/SocketCommon.h
index 78839c4..bd1032f 100644
--- a/lib/cpp/src/thrift/transport/SocketCommon.h
+++ b/lib/cpp/src/thrift/transport/SocketCommon.h
@@ -22,17 +22,20 @@
#ifndef THRIFT_SOCKETCOMMON_H
#define THRIFT_SOCKETCOMMON_H
-#ifndef _WIN32
-
#include <thrift/thrift-config.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
+#ifdef HAVE_AF_UNIX_H
+#include <afunix.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include <string>
@@ -46,6 +49,4 @@
}
} // apache::thrift::transport
-#endif // _WIN32
-
#endif //THRIFT_SOCKETCOMMON_H
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h b/lib/cpp/src/thrift/transport/TBufferTransports.h
index 8f527bb..3ef8d1f 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.h
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
@@ -150,7 +150,7 @@
* performance-sensitive operation, so it is okay to just leave it to
* the concrete class to set up pointers correctly.
*/
- TBufferBase(std::shared_ptr<TConfiguration> config = nullptr)
+ TBufferBase(std::shared_ptr<TConfiguration> config = nullptr)
: TVirtualTransport(config), rBase_(nullptr), rBound_(nullptr), wBase_(nullptr), wBound_(nullptr) {}
/// Convenience mutator for setting the read buffer.
@@ -211,7 +211,7 @@
}
/// Use specified read and write buffer sizes.
- TBufferedTransport(std::shared_ptr<TTransport> transport, uint32_t rsz, uint32_t wsz,
+ TBufferedTransport(std::shared_ptr<TTransport> transport, uint32_t rsz, uint32_t wsz,
std::shared_ptr<TConfiguration> config = nullptr)
: TVirtualTransport(config),
transport_(transport),
@@ -506,7 +506,7 @@
* TAKE_OWNERSHIP:
* TMemoryBuffer will become the "owner" of the buffer,
* and will be responsible for freeing it.
- * The membory must have been allocated with malloc.
+ * The memory must have been allocated with malloc.
*/
enum MemoryPolicy { OBSERVE = 1, COPY = 2, TAKE_OWNERSHIP = 3 };
@@ -515,8 +515,8 @@
* owned by the TMemoryBuffer object.
*/
TMemoryBuffer(std::shared_ptr<TConfiguration> config = nullptr)
- : TVirtualTransport(config) {
- initCommon(nullptr, defaultSize, true, 0);
+ : TVirtualTransport(config) {
+ initCommon(nullptr, defaultSize, true, 0);
}
/**
@@ -525,9 +525,9 @@
*
* @param sz The initial size of the buffer.
*/
- TMemoryBuffer(uint32_t sz, std::shared_ptr<TConfiguration> config = nullptr)
- : TVirtualTransport(config) {
- initCommon(nullptr, sz, true, 0);
+ TMemoryBuffer(uint32_t sz, std::shared_ptr<TConfiguration> config = nullptr)
+ : TVirtualTransport(config) {
+ initCommon(nullptr, sz, true, 0);
}
/**
@@ -540,7 +540,7 @@
* @param sz The size of @c buf.
* @param policy See @link MemoryPolicy @endlink .
*/
- TMemoryBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE, std::shared_ptr<TConfiguration> config = nullptr)
+ TMemoryBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE, std::shared_ptr<TConfiguration> config = nullptr)
: TVirtualTransport(config) {
if (buf == nullptr && sz != 0) {
throw TTransportException(TTransportException::BAD_ARGS,
diff --git a/lib/cpp/src/thrift/transport/TNonblockingServerSocket.cpp b/lib/cpp/src/thrift/transport/TNonblockingServerSocket.cpp
index 5ef0835..28d94ce 100644
--- a/lib/cpp/src/thrift/transport/TNonblockingServerSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TNonblockingServerSocket.cpp
@@ -43,6 +43,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
#include <thrift/transport/PlatformSocket.h>
#include <thrift/transport/TNonblockingServerSocket.h>
@@ -72,13 +75,13 @@
return reinterpret_cast<SOCKOPT_CAST_T*>(v);
}
+using std::shared_ptr;
+using std::string;
+
namespace apache {
namespace thrift {
namespace transport {
-using std::shared_ptr;
-using std::string;
-
TNonblockingServerSocket::TNonblockingServerSocket(int port)
: port_(port),
listenPort_(port),
@@ -145,6 +148,35 @@
close();
}
+bool TNonblockingServerSocket::isOpen() const {
+ if (serverSocket_ == THRIFT_INVALID_SOCKET)
+ return false;
+
+ if (!listening_)
+ return false;
+
+ if (isUnixDomainSocket() && (path_[0] != '\0')) {
+ // On some platforms the domain socket file may not be instantly
+ // available yet, i.e. the Windows file system can be slow. Therefore
+ // we should check that the domain socket file actually exists.
+#ifdef _MSC_VER
+ // Currently there is a bug in ClangCl on Windows so the stat() call
+ // does not work. Workaround is a Windows-specific call if file exists:
+ DWORD const f_attrib = GetFileAttributesA(path_.c_str());
+ if (f_attrib == INVALID_FILE_ATTRIBUTES) {
+#else
+ struct THRIFT_STAT path_info;
+ if (::THRIFT_STAT(path_.c_str(), &path_info) < 0) {
+#endif
+ const std::string vError = "TNonblockingServerSocket::isOpen(): The domain socket path '" + path_ + "' does not exist (yet).";
+ GlobalOutput.perror(vError.c_str(), THRIFT_GET_SOCKET_ERROR);
+ return false;
+ }
+ }
+
+ return true;
+}
+
void TNonblockingServerSocket::setSendTimeout(int sendTimeout) {
sendTimeout_ = sendTimeout;
}
@@ -174,26 +206,28 @@
}
void TNonblockingServerSocket::_setup_sockopts() {
-
- // Set THRIFT_NO_SOCKET_CACHING to prevent 2MSL delay on accept
int one = 1;
- if (-1 == setsockopt(serverSocket_,
- SOL_SOCKET,
- THRIFT_NO_SOCKET_CACHING,
- cast_sockopt(&one),
- sizeof(one))) {
-// ignore errors coming out of this setsockopt on Windows. This is because
-// SO_EXCLUSIVEADDRUSE requires admin privileges on WinXP, but we don't
-// want to force servers to be an admin.
-#ifndef _WIN32
- int errno_copy = THRIFT_GET_SOCKET_ERROR;
- GlobalOutput.perror("TNonblockingServerSocket::listen() setsockopt() THRIFT_NO_SOCKET_CACHING ",
- errno_copy);
- close();
- throw TTransportException(TTransportException::NOT_OPEN,
- "Could not set THRIFT_NO_SOCKET_CACHING",
- errno_copy);
-#endif
+ if (!isUnixDomainSocket()) {
+ // Set THRIFT_NO_SOCKET_CACHING to prevent 2MSL delay on accept.
+ // This does not work with Domain sockets on most platforms. And
+ // on Windows it completely breaks the socket. Therefore do not
+ // use this on Domain sockets.
+ if (-1 == setsockopt(serverSocket_,
+ SOL_SOCKET,
+ THRIFT_NO_SOCKET_CACHING,
+ cast_sockopt(&one),
+ sizeof(one))) {
+ // NOTE: SO_EXCLUSIVEADDRUSE socket option can only be used by members
+ // of the Administrators security group on Windows XP and earlier. But
+ // we do not target WinXP anymore so no special checks required.
+ int errno_copy = THRIFT_GET_SOCKET_ERROR;
+ GlobalOutput.perror("TNonblockingServerSocket::listen() setsockopt() THRIFT_NO_SOCKET_CACHING ",
+ errno_copy);
+ close();
+ throw TTransportException(TTransportException::NOT_OPEN,
+ "Could not set THRIFT_NO_SOCKET_CACHING",
+ errno_copy);
+ }
}
// Set TCP buffer sizes
@@ -265,8 +299,10 @@
"THRIFT_FCNTL() THRIFT_F_SETFL THRIFT_O_NONBLOCK failed",
errno_copy);
}
+}
-} // _setup_sockopts()
+void TNonblockingServerSocket::_setup_unixdomain_sockopts() {
+}
void TNonblockingServerSocket::_setup_tcp_sockopts() {
int one = 1;
@@ -302,13 +338,10 @@
} // _setup_tcp_sockopts()
void TNonblockingServerSocket::listen() {
- listening_ = true;
#ifdef _WIN32
TWinsockSingleton::create();
#endif // _WIN32
- // tcp == false means Unix Domain socket
- bool tcp = (path_.empty());
// Validate port number
if (port_ < 0 || port_ > 0xFFFF) {
@@ -317,12 +350,16 @@
// Resolve host:port strings into an iterable of struct addrinfo*
AddressResolutionHelper resolved_addresses;
- if (tcp) {
+ if (!isUnixDomainSocket()) {
try {
resolved_addresses.resolve(address_, std::to_string(port_), SOCK_STREAM,
+#ifdef ANDROID
+ AI_PASSIVE | AI_ADDRCONFIG);
+#else
AI_PASSIVE | AI_V4MAPPED);
+#endif
} catch (const std::system_error& e) {
- GlobalOutput.printf("getaddrinfo() -> %d. %s", e.code().value(), e.what());
+ GlobalOutput.printf("getaddrinfo() -> %d; %s", e.code().value(), e.what());
close();
throw TTransportException(TTransportException::NOT_OPEN,
"Could not resolve host for server socket.");
@@ -334,14 +371,14 @@
int retries = 0;
int errno_copy = 0;
- if (!tcp) {
+ if (isUnixDomainSocket()) {
// -- Unix Domain Socket -- //
serverSocket_ = socket(PF_UNIX, SOCK_STREAM, IPPROTO_IP);
if (serverSocket_ == THRIFT_INVALID_SOCKET) {
int errno_copy = THRIFT_GET_SOCKET_ERROR;
- GlobalOutput.perror("TServerSocket::listen() socket() ", errno_copy);
+ GlobalOutput.perror("TNonblockingServerSocket::listen() socket() ", errno_copy);
close();
throw TTransportException(TTransportException::NOT_OPEN,
"Could not create server socket.",
@@ -349,14 +386,11 @@
}
_setup_sockopts();
- //_setup_unixdomain_sockopts();
+ _setup_unixdomain_sockopts();
-/*
- * TODO: seems that windows now support unix sockets,
- * see: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
- */
-#ifndef _WIN32
-
+ // Windows supports Unix domain sockets since it ships the header
+ // HAVE_AF_UNIX_H (see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/)
+#if (!defined(_WIN32) || defined(HAVE_AF_UNIX_H))
struct sockaddr_un address;
socklen_t structlen = fillUnixSocketAddr(address, path_);
@@ -368,12 +402,11 @@
// use short circuit evaluation here to only sleep if we need to
} while ((retries++ < retryLimit_) && (THRIFT_SLEEP_SEC(retryDelay_) == 0));
#else
- GlobalOutput.perror("TSocket::open() Unix Domain socket path not supported on windows", -99);
+ GlobalOutput.perror("TNonblockingServerSocket::open() Unix Domain socket path not supported on this version of Windows", -99);
throw TTransportException(TTransportException::NOT_OPEN,
" Unix Domain socket path not supported");
#endif
} else {
-
// -- TCP socket -- //
auto addr_iter = AddressResolutionHelper::Iter{};
@@ -405,7 +438,7 @@
IPV6_V6ONLY,
cast_sockopt(&zero),
sizeof(zero))) {
- GlobalOutput.perror("TServerSocket::listen() IPV6_V6ONLY ", THRIFT_GET_SOCKET_ERROR);
+ GlobalOutput.perror("TNonblockingServerSocket::listen() IPV6_V6ONLY ", THRIFT_GET_SOCKET_ERROR);
}
}
#endif // #ifdef IPV6_V6ONLY
@@ -440,7 +473,7 @@
// throw error if socket still wasn't created successfully
if (serverSocket_ == THRIFT_INVALID_SOCKET) {
- GlobalOutput.perror("TServerSocket::listen() socket() ", errno_copy);
+ GlobalOutput.perror("TNonblockingServerSocket::listen() socket() ", errno_copy);
close();
throw TTransportException(TTransportException::NOT_OPEN,
"Could not create server socket.",
@@ -450,10 +483,15 @@
// throw an error if we failed to bind properly
if (retries > retryLimit_) {
char errbuf[1024];
- if (!tcp) {
- THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TNonblockingServerSocket::listen() PATH %s", path_.c_str());
+ if (isUnixDomainSocket()) {
+#ifdef _WIN32
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TNonblockingServerSocket::listen() Could not bind to domain socket path %s, error %d", path_.c_str(), WSAGetLastError());
+#else
+ // Fixme: This does not currently handle abstract domain sockets:
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TNonblockingServerSocket::listen() Could not bind to domain socket path %s", path_.c_str());
+#endif
} else {
- THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TNonblockingServerSocket::listen() BIND %d", port_);
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TNonblockingServerSocket::listen() Could not bind to port %d", port_);
}
GlobalOutput(errbuf);
close();
@@ -474,6 +512,7 @@
}
// The socket is now listening!
+ listening_ = true;
}
int TNonblockingServerSocket::getPort() {
@@ -484,6 +523,14 @@
return listenPort_;
}
+std::string TNonblockingServerSocket::getPath() const {
+ return path_;
+}
+
+bool TNonblockingServerSocket::isUnixDomainSocket() const {
+ return !path_.empty();
+}
+
shared_ptr<TSocket> TNonblockingServerSocket::acceptImpl() {
if (serverSocket_ == THRIFT_INVALID_SOCKET) {
throw TTransportException(TTransportException::NOT_OPEN,
@@ -524,6 +571,7 @@
}
shared_ptr<TSocket> client = createSocket(clientSocket);
+ client->setPath(path_);
if (sendTimeout_ > 0) {
client->setSendTimeout(sendTimeout_);
}
diff --git a/lib/cpp/src/thrift/transport/TNonblockingServerSocket.h b/lib/cpp/src/thrift/transport/TNonblockingServerSocket.h
index 1ed2b07..a5cd664 100644
--- a/lib/cpp/src/thrift/transport/TNonblockingServerSocket.h
+++ b/lib/cpp/src/thrift/transport/TNonblockingServerSocket.h
@@ -73,6 +73,8 @@
~TNonblockingServerSocket() override;
+ bool isOpen() const;
+
void setSendTimeout(int sendTimeout);
void setRecvTimeout(int recvTimeout);
@@ -103,6 +105,10 @@
int getListenPort() override;
+ std::string getPath() const;
+
+ bool isUnixDomainSocket() const;
+
void listen() override;
void close() override;
@@ -111,6 +117,10 @@
virtual std::shared_ptr<TSocket> createSocket(THRIFT_SOCKET client);
private:
+ void _setup_sockopts();
+ void _setup_unixdomain_sockopts();
+ void _setup_tcp_sockopts();
+
int port_;
int listenPort_;
std::string address_;
@@ -128,9 +138,6 @@
socket_func_t listenCallback_;
socket_func_t acceptCallback_;
-
- void _setup_sockopts();
- void _setup_tcp_sockopts();
};
}
}
diff --git a/lib/cpp/src/thrift/transport/TPipeServer.cpp b/lib/cpp/src/thrift/transport/TPipeServer.cpp
index 1d7577f..e4234b1 100644
--- a/lib/cpp/src/thrift/transport/TPipeServer.cpp
+++ b/lib/cpp/src/thrift/transport/TPipeServer.cpp
@@ -26,6 +26,7 @@
#ifdef _WIN32
#include <thrift/windows/OverlappedSubmissionThread.h>
+#include <thrift/windows/Sync.h>
#include <AccCtrl.h>
#include <Aclapi.h>
#include <sddl.h>
diff --git a/lib/cpp/src/thrift/transport/TPipeServer.h b/lib/cpp/src/thrift/transport/TPipeServer.h
index 67c5d51..249591e 100644
--- a/lib/cpp/src/thrift/transport/TPipeServer.h
+++ b/lib/cpp/src/thrift/transport/TPipeServer.h
@@ -25,9 +25,6 @@
#ifndef _WIN32
#include <thrift/transport/TServerSocket.h>
#endif
-#ifdef _WIN32
-#include <thrift/windows/Sync.h>
-#endif
#define TPIPE_SERVER_MAX_CONNS_DEFAULT PIPE_UNLIMITED_INSTANCES
diff --git a/lib/cpp/src/thrift/transport/TServerSocket.cpp b/lib/cpp/src/thrift/transport/TServerSocket.cpp
index 5e7e2c0..ede6c9b 100644
--- a/lib/cpp/src/thrift/transport/TServerSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TServerSocket.cpp
@@ -90,13 +90,13 @@
delete ssock;
}
+using std::shared_ptr;
using std::string;
namespace apache {
namespace thrift {
namespace transport {
-using std::shared_ptr;
TServerSocket::TServerSocket(int port)
: interruptableChildren_(true),
@@ -187,7 +187,7 @@
if (!listening_)
return false;
- if (!path_.empty() && (path_[0] != '\0')) {
+ if (isUnixDomainSocket() && (path_[0] != '\0')) {
// On some platforms the domain socket file may not be instantly
// available yet, i.e. the Windows file system can be slow. Therefore
// we should check that the domain socket file actually exists.
@@ -249,26 +249,28 @@
}
void TServerSocket::_setup_sockopts() {
-
- // Set THRIFT_NO_SOCKET_CACHING to prevent 2MSL delay on accept
int one = 1;
- if (-1 == setsockopt(serverSocket_,
- SOL_SOCKET,
- THRIFT_NO_SOCKET_CACHING,
- cast_sockopt(&one),
- sizeof(one))) {
-// ignore errors coming out of this setsockopt on Windows. This is because
-// SO_EXCLUSIVEADDRUSE requires admin privileges on WinXP, but we don't
-// want to force servers to be an admin.
-#ifndef _WIN32
- int errno_copy = THRIFT_GET_SOCKET_ERROR;
- GlobalOutput.perror("TServerSocket::listen() setsockopt() THRIFT_NO_SOCKET_CACHING ",
- errno_copy);
- close();
- throw TTransportException(TTransportException::NOT_OPEN,
- "Could not set THRIFT_NO_SOCKET_CACHING",
- errno_copy);
-#endif
+ if (!isUnixDomainSocket()) {
+ // Set THRIFT_NO_SOCKET_CACHING to prevent 2MSL delay on accept.
+ // This does not work with Domain sockets on most platforms. And
+ // on Windows it completely breaks the socket. Therefore do not
+ // use this on Domain sockets.
+ if (-1 == setsockopt(serverSocket_,
+ SOL_SOCKET,
+ THRIFT_NO_SOCKET_CACHING,
+ cast_sockopt(&one),
+ sizeof(one))) {
+ // NOTE: SO_EXCLUSIVEADDRUSE socket option can only be used by members
+ // of the Administrators security group on Windows XP and earlier. But
+ // we do not target WinXP anymore so no special checks required.
+ int errno_copy = THRIFT_GET_SOCKET_ERROR;
+ GlobalOutput.perror("TServerSocket::listen() setsockopt() THRIFT_NO_SOCKET_CACHING ",
+ errno_copy);
+ close();
+ throw TTransportException(TTransportException::NOT_OPEN,
+ "Could not set THRIFT_NO_SOCKET_CACHING",
+ errno_copy);
+ }
}
// Set TCP buffer sizes
@@ -339,7 +341,7 @@
// Defer accept
#ifdef TCP_DEFER_ACCEPT
- if (path_.empty()) {
+ if (!isUnixDomainSocket()) {
if (-1 == setsockopt(serverSocket_, IPPROTO_TCP, TCP_DEFER_ACCEPT, &one, sizeof(one))) {
int errno_copy = THRIFT_GET_SOCKET_ERROR;
GlobalOutput.perror("TServerSocket::listen() setsockopt() TCP_DEFER_ACCEPT ", errno_copy);
@@ -391,8 +393,6 @@
= std::shared_ptr<THRIFT_SOCKET>(new THRIFT_SOCKET(sv[0]), destroyer_of_fine_sockets);
}
- // tcp == false means Unix Domain socket
- bool tcp = (path_.empty());
// Validate port number
if (port_ < 0 || port_ > 0xFFFF) {
@@ -401,7 +401,7 @@
// Resolve host:port strings into an iterable of struct addrinfo*
AddressResolutionHelper resolved_addresses;
- if (tcp) {
+ if (!isUnixDomainSocket()) {
try {
resolved_addresses.resolve(address_, std::to_string(port_), SOCK_STREAM,
#ifdef ANDROID
@@ -422,7 +422,7 @@
int retries = 0;
int errno_copy = 0;
- if (!tcp) {
+ if (isUnixDomainSocket()) {
// -- Unix Domain Socket -- //
serverSocket_ = socket(PF_UNIX, SOCK_STREAM, IPPROTO_IP);
@@ -439,12 +439,9 @@
_setup_sockopts();
_setup_unixdomain_sockopts();
-/*
- * TODO: seems that windows now support unix sockets,
- * see: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
- */
-#ifndef _WIN32
-
+ // Windows supports Unix domain sockets since it ships the header
+ // HAVE_AF_UNIX_H (see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/)
+#if (!defined(_WIN32) || defined(HAVE_AF_UNIX_H))
struct sockaddr_un address;
socklen_t structlen = fillUnixSocketAddr(address, path_);
@@ -456,12 +453,11 @@
// use short circuit evaluation here to only sleep if we need to
} while ((retries++ < retryLimit_) && (THRIFT_SLEEP_SEC(retryDelay_) == 0));
#else
- GlobalOutput.perror("TSocket::open() Unix Domain socket path not supported on windows", -99);
+ GlobalOutput.perror("TServerSocket::open() Unix Domain socket path not supported on this version of Windows", -99);
throw TTransportException(TTransportException::NOT_OPEN,
" Unix Domain socket path not supported");
#endif
} else {
-
// -- TCP socket -- //
auto addr_iter = AddressResolutionHelper::Iter{};
@@ -538,10 +534,15 @@
// throw an error if we failed to bind properly
if (retries > retryLimit_) {
char errbuf[1024];
- if (!tcp) {
- THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TServerSocket::listen() PATH %s", path_.c_str());
+ if (isUnixDomainSocket()) {
+#ifdef _WIN32
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TServerSocket::listen() Could not bind to domain socket path %s, error %d", path_.c_str(), WSAGetLastError());
+#else
+ // Fixme: This does not currently handle abstract domain sockets:
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TServerSocket::listen() Could not bind to domain socket path %s", path_.c_str());
+#endif
} else {
- THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TServerSocket::listen() BIND %d", port_);
+ THRIFT_SNPRINTF(errbuf, sizeof(errbuf), "TServerSocket::listen() Could not bind to port %d", port_);
}
GlobalOutput(errbuf);
close();
@@ -565,10 +566,18 @@
listening_ = true;
}
-int TServerSocket::getPort() {
+int TServerSocket::getPort() const {
return port_;
}
+std::string TServerSocket::getPath() const {
+ return path_;
+}
+
+bool TServerSocket::isUnixDomainSocket() const {
+ return !path_.empty();
+}
+
shared_ptr<TTransport> TServerSocket::acceptImpl() {
if (serverSocket_ == THRIFT_INVALID_SOCKET) {
throw TTransportException(TTransportException::NOT_OPEN, "TServerSocket not listening");
@@ -658,6 +667,7 @@
}
shared_ptr<TSocket> client = createSocket(clientSocket);
+ client->setPath(path_);
if (sendTimeout_ > 0) {
client->setSendTimeout(sendTimeout_);
}
diff --git a/lib/cpp/src/thrift/transport/TServerSocket.h b/lib/cpp/src/thrift/transport/TServerSocket.h
index e4659a0..c87a7f6 100644
--- a/lib/cpp/src/thrift/transport/TServerSocket.h
+++ b/lib/cpp/src/thrift/transport/TServerSocket.h
@@ -125,7 +125,11 @@
THRIFT_SOCKET getSocketFD() override { return serverSocket_; }
- int getPort();
+ int getPort() const;
+
+ std::string getPath() const;
+
+ bool isUnixDomainSocket() const;
void listen() override;
void interrupt() override;
diff --git a/lib/cpp/src/thrift/transport/TSocket.cpp b/lib/cpp/src/thrift/transport/TSocket.cpp
index 2f0eb9c..9991fd6 100644
--- a/lib/cpp/src/thrift/transport/TSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TSocket.cpp
@@ -265,7 +265,7 @@
return;
}
- if (!path_.empty()) {
+ if (isUnixDomainSocket()) {
socket_ = socket(PF_UNIX, SOCK_STREAM, IPPROTO_IP);
} else {
socket_ = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
@@ -330,24 +330,19 @@
// Connect the socket
int ret;
- if (!path_.empty()) {
-
-/*
- * TODO: seems that windows now support unix sockets,
- * see: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
- */
-#ifndef _WIN32
-
+ if (isUnixDomainSocket()) {
+ // Windows supports Unix domain sockets since it ships the header
+ // HAVE_AF_UNIX_H (see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/)
+#if (!defined(_WIN32) || defined(HAVE_AF_UNIX_H))
struct sockaddr_un address;
socklen_t structlen = fillUnixSocketAddr(address, path_);
ret = connect(socket_, (struct sockaddr*)&address, structlen);
#else
- GlobalOutput.perror("TSocket::open() Unix Domain socket path not supported on windows", -99);
+ GlobalOutput.perror("TSocket::open() Unix Domain socket path not supported on this version of Windows", -99);
throw TTransportException(TTransportException::NOT_OPEN,
" Unix Domain socket path not supported");
#endif
-
} else {
ret = connect(socket_, res->ai_addr, static_cast<int>(res->ai_addrlen));
}
@@ -408,7 +403,7 @@
throw TTransportException(TTransportException::NOT_OPEN, "THRIFT_FCNTL() failed", errno_copy);
}
- if (path_.empty()) {
+ if (!isUnixDomainSocket()) {
setCachedAddress(res->ai_addr, static_cast<socklen_t>(res->ai_addrlen));
}
}
@@ -417,7 +412,7 @@
if (isOpen()) {
return;
}
- if (!path_.empty()) {
+ if (isUnixDomainSocket()) {
unix_open();
} else {
local_open();
@@ -425,7 +420,7 @@
}
void TSocket::unix_open() {
- if (!path_.empty()) {
+ if (isUnixDomainSocket()) {
// Unix Domain Socket does not need addrinfo struct, so we pass NULL
openConnection(nullptr);
}
@@ -571,6 +566,7 @@
throw TTransportException(TTransportException::INTERRUPTED, "Interrupted");
}
} else /* ret == 0 */ {
+ GlobalOutput.perror("TSocket::read() THRIFT_EAGAIN (timed out) after %f ms", recvTimeout_);
throw TTransportException(TTransportException::TIMED_OUT, "THRIFT_EAGAIN (timed out)");
}
@@ -691,18 +687,22 @@
return b;
}
-std::string TSocket::getHost() {
+std::string TSocket::getHost() const {
return host_;
}
-int TSocket::getPort() {
+int TSocket::getPort() const {
return port_;
}
-std::string TSocket::getPath() {
+std::string TSocket::getPath() const {
return path_;
}
+bool TSocket::isUnixDomainSocket() const {
+ return !path_.empty();
+}
+
void TSocket::setHost(string host) {
host_ = host;
}
@@ -738,7 +738,7 @@
void TSocket::setNoDelay(bool noDelay) {
noDelay_ = noDelay;
- if (socket_ == THRIFT_INVALID_SOCKET || !path_.empty()) {
+ if (socket_ == THRIFT_INVALID_SOCKET || isUnixDomainSocket()) {
return;
}
@@ -799,6 +799,13 @@
return;
}
+#ifdef _WIN32
+ if (isUnixDomainSocket()) {
+ // Windows Domain sockets do not support SO_KEEPALIVE.
+ return;
+ }
+#endif
+
int value = keepAlive_;
int ret
= setsockopt(socket_, SOL_SOCKET, SO_KEEPALIVE, const_cast_sockopt(&value), sizeof(value));
@@ -816,7 +823,7 @@
string TSocket::getSocketInfo() const {
std::ostringstream oss;
- if (path_.empty()) {
+ if (!isUnixDomainSocket()) {
if (host_.empty() || port_ == 0) {
oss << "<Host: " << getPeerAddress();
oss << " Port: " << getPeerPort() << ">";
@@ -834,7 +841,7 @@
}
std::string TSocket::getPeerHost() const {
- if (peerHost_.empty() && path_.empty()) {
+ if (peerHost_.empty() && !isUnixDomainSocket()) {
struct sockaddr_storage addr;
struct sockaddr* addrPtr;
socklen_t addrLen;
@@ -872,7 +879,7 @@
}
std::string TSocket::getPeerAddress() const {
- if (peerAddress_.empty() && path_.empty()) {
+ if (peerAddress_.empty() && !isUnixDomainSocket()) {
struct sockaddr_storage addr;
struct sockaddr* addrPtr;
socklen_t addrLen;
@@ -916,7 +923,7 @@
}
void TSocket::setCachedAddress(const sockaddr* addr, socklen_t len) {
- if (!path_.empty()) {
+ if (isUnixDomainSocket()) {
return;
}
diff --git a/lib/cpp/src/thrift/transport/TSocket.h b/lib/cpp/src/thrift/transport/TSocket.h
index 8a224f2..f14546d 100644
--- a/lib/cpp/src/thrift/transport/TSocket.h
+++ b/lib/cpp/src/thrift/transport/TSocket.h
@@ -141,21 +141,29 @@
*
* @return string host identifier
*/
- std::string getHost();
+ std::string getHost() const;
/**
* Get the port that the socket is connected to
*
* @return int port number
*/
- int getPort();
+ int getPort() const;
/**
* Get the Unix domain socket path that the socket is connected to
*
* @return std::string path
*/
- std::string getPath();
+ std::string getPath() const;
+
+ /**
+ * Whether the socket is a Unix domain socket. This is the same as checking
+ * if getPath() is not empty.
+ *
+ * @return Is the socket a Unix domain socket?
+ */
+ bool isUnixDomainSocket() const;
/**
* Set the host that socket will connect to
@@ -285,7 +293,7 @@
* Constructor to create socket from file descriptor that
* can be interrupted safely.
*/
- TSocket(THRIFT_SOCKET socket, std::shared_ptr<THRIFT_SOCKET> interruptListener,
+ TSocket(THRIFT_SOCKET socket, std::shared_ptr<THRIFT_SOCKET> interruptListener,
std::shared_ptr<TConfiguration> config = nullptr);
/**
diff --git a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
index 6cecfc3..057f623 100644
--- a/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
+++ b/lib/cpp/src/thrift/windows/OverlappedSubmissionThread.h
@@ -26,7 +26,6 @@
#include <thrift/windows/Sync.h>
#include <thrift/TNonCopyable.h>
-#include <Windows.h>
/*
*** Why does this class exist?
diff --git a/lib/cpp/src/thrift/windows/Sync.h b/lib/cpp/src/thrift/windows/Sync.h
index b1c83ee..f5b8a05 100644
--- a/lib/cpp/src/thrift/windows/Sync.h
+++ b/lib/cpp/src/thrift/windows/Sync.h
@@ -27,7 +27,13 @@
#include <thrift/concurrency/Exception.h>
#include <thrift/TNonCopyable.h>
+// Including Windows.h can conflict with Winsock2 usage, and also
+// adds problematic macros like min() and max(). Try to work around:
+#define NOMINMAX
+#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
+#undef NOMINMAX
+#undef WIN32_LEAN_AND_MEAN
/*
Lightweight synchronization objects that only make sense on Windows. For cross-platform
diff --git a/lib/cpp/src/thrift/windows/config.h b/lib/cpp/src/thrift/windows/config.h
index a218d90..ce10c55 100644
--- a/lib/cpp/src/thrift/windows/config.h
+++ b/lib/cpp/src/thrift/windows/config.h
@@ -59,6 +59,7 @@
// windows
#include <Winsock2.h>
#include <ws2tcpip.h>
+
#ifndef __MINGW32__
#ifdef _WIN32_WCE
#pragma comment(lib, "Ws2.lib")
@@ -72,4 +73,18 @@
#endif
#endif // __MINGW32__
+// Replicate the logic of afunix.h on Windows (the header is only present on
+// newer Windows SDKs)
+#ifdef HAVE_AF_UNIX_H
+#include <afunix.h>
+#else
+#ifndef UNIX_PATH_MAX
+#define UNIX_PATH_MAX 108
+#endif
+typedef struct sockaddr_un {
+ ADDRESS_FAMILY sun_family; // AF_UNIX
+ char sun_path[UNIX_PATH_MAX]; // pathname
+} SOCKADDR_UN, *PSOCKADDR_UN;
+#endif // HAVE_AF_UNIX_H
+
#endif // _THRIFT_WINDOWS_CONFIG_H_
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 07c178d..19854e1 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -20,7 +20,7 @@
# Unit tests still require boost
include(BoostMacros)
REQUIRE_BOOST_HEADERS()
-set(BOOST_COMPONENTS filesystem thread unit_test_framework)
+set(BOOST_COMPONENTS filesystem thread unit_test_framework chrono)
REQUIRE_BOOST_LIBRARIES(BOOST_COMPONENTS)
include(ThriftMacros)
@@ -67,7 +67,7 @@
add_executable(Benchmark Benchmark.cpp)
target_link_libraries(Benchmark testgencpp)
-LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
+target_link_libraries(Benchmark thrift)
add_test(NAME Benchmark COMMAND Benchmark)
target_link_libraries(Benchmark testgencpp)
@@ -86,7 +86,7 @@
add_executable(UnitTests ${UnitTest_SOURCES})
target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
-LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
+target_link_libraries(UnitTests thrift)
add_test(NAME UnitTests COMMAND UnitTests)
if(MSVC)
# Disable C4503: decorated name length exceeded, name was truncated
@@ -109,7 +109,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
+target_link_libraries(TInterruptTest thrift)
if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
target_link_libraries(TInterruptTest -lrt)
endif ()
@@ -120,7 +120,7 @@
testgencpp_cob
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
+target_link_libraries(TServerIntegrationTest thrift)
if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
target_link_libraries(TServerIntegrationTest -lrt)
endif ()
@@ -134,8 +134,8 @@
${Boost_LIBRARIES}
${ZLIB_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TransportTest thrift)
-LINK_AGAINST_THRIFT_LIBRARY(TransportTest thriftz)
+target_link_libraries(TransportTest thrift)
+target_link_libraries(TransportTest thriftz)
add_test(NAME TransportTest COMMAND TransportTest)
add_executable(ZlibTest ZlibTest.cpp)
@@ -144,8 +144,8 @@
${Boost_LIBRARIES}
${ZLIB_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thrift)
-LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thriftz)
+target_link_libraries(ZlibTest thrift)
+target_link_libraries(ZlibTest thriftz)
add_test(NAME ZlibTest COMMAND ZlibTest)
endif(WITH_ZLIB)
@@ -154,7 +154,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(AnnotationTest thrift)
+target_link_libraries(AnnotationTest thrift)
add_test(NAME AnnotationTest COMMAND AnnotationTest)
add_executable(EnumTest EnumTest.cpp)
@@ -162,7 +162,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
+target_link_libraries(EnumTest thrift)
add_test(NAME EnumTest COMMAND EnumTest)
if(HAVE_GETOPT_H)
@@ -171,7 +171,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
+target_link_libraries(TFileTransportTest thrift)
add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
endif()
@@ -179,14 +179,14 @@
target_link_libraries(TFDTransportTest
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
+target_link_libraries(TFDTransportTest thrift)
add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
add_executable(TPipedTransportTest TPipedTransportTest.cpp)
target_link_libraries(TPipedTransportTest
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
+target_link_libraries(TPipedTransportTest thrift)
add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
set(AllProtocolsTest_SOURCES
@@ -200,7 +200,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
+target_link_libraries(AllProtocolsTest thrift)
add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
# The debug run-time in Windows asserts on isprint() with negative inputs
@@ -210,7 +210,7 @@
testgencpp
${Boost_LIBRARIES}
)
- LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
+ target_link_libraries(DebugProtoTest thrift)
add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
endif()
@@ -219,7 +219,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
+target_link_libraries(JSONProtoTest thrift)
add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
@@ -227,7 +227,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
+target_link_libraries(OptionalRequiredTest thrift)
add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
add_executable(RecursiveTest RecursiveTest.cpp)
@@ -235,7 +235,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
+target_link_libraries(RecursiveTest thrift)
add_test(NAME RecursiveTest COMMAND RecursiveTest)
add_executable(SpecializationTest SpecializationTest.cpp)
@@ -243,7 +243,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
+target_link_libraries(SpecializationTest thrift)
add_test(NAME SpecializationTest COMMAND SpecializationTest)
set(concurrency_test_SOURCES
@@ -253,7 +253,7 @@
concurrency/TimerManagerTests.h
)
add_executable(concurrency_test ${concurrency_test_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
+target_link_libraries(concurrency_test thrift)
add_test(NAME concurrency_test COMMAND concurrency_test)
set(link_test_SOURCES
@@ -265,7 +265,7 @@
add_executable(link_test ${link_test_SOURCES})
target_link_libraries(link_test testgencpp_cob)
-LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
+target_link_libraries(link_test thrift)
target_link_libraries(link_test testgencpp)
add_test(NAME link_test COMMAND link_test)
@@ -283,7 +283,7 @@
testgencpp_cob
${Boost_LIBRARIES}
)
- LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
+ target_link_libraries(processor_test thriftnb)
add_test(NAME processor_test COMMAND processor_test)
set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
@@ -293,7 +293,7 @@
testgencpp_cob
${Boost_LIBRARIES}
)
- LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
+ target_link_libraries(TNonblockingServerTest thriftnb)
add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
if(OPENSSL_FOUND AND WITH_OPENSSL)
@@ -304,7 +304,7 @@
testgencpp_cob
${Boost_LIBRARIES}
)
- LINK_AGAINST_THRIFT_LIBRARY(TNonblockingSSLServerTest thriftnb)
+ target_link_libraries(TNonblockingSSLServerTest thriftnb)
add_test(NAME TNonblockingSSLServerTest COMMAND TNonblockingSSLServerTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
endif(OPENSSL_FOUND AND WITH_OPENSSL)
endif()
@@ -315,7 +315,7 @@
${OPENSSL_LIBRARIES}
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
+target_link_libraries(OpenSSLManualInitTest thrift)
add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
add_executable(SecurityTest SecurityTest.cpp)
@@ -323,7 +323,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
+target_link_libraries(SecurityTest thrift)
if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
target_link_libraries(SecurityTest -lrt)
endif ()
@@ -334,7 +334,7 @@
testgencpp
${Boost_LIBRARIES}
)
-LINK_AGAINST_THRIFT_LIBRARY(SecurityFromBufferTest thrift)
+target_link_libraries(SecurityFromBufferTest thrift)
if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
target_link_libraries(SecurityFromBufferTest -lrt)
endif ()
diff --git a/lib/cpp/test/SecurityFromBufferTest.cpp b/lib/cpp/test/SecurityFromBufferTest.cpp
index 72a4c2a..d275191 100644
--- a/lib/cpp/test/SecurityFromBufferTest.cpp
+++ b/lib/cpp/test/SecurityFromBufferTest.cpp
@@ -30,7 +30,7 @@
#include <thrift/transport/TSSLSocket.h>
#include <thrift/transport/TTransport.h>
#include <vector>
-#ifdef __linux__
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
diff --git a/lib/cpp/test/SecurityTest.cpp b/lib/cpp/test/SecurityTest.cpp
index b70729c..cba8768 100644
--- a/lib/cpp/test/SecurityTest.cpp
+++ b/lib/cpp/test/SecurityTest.cpp
@@ -28,7 +28,7 @@
#include <thrift/transport/TSSLSocket.h>
#include <thrift/transport/TTransport.h>
#include <vector>
-#ifdef __linux__
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
diff --git a/lib/cpp/test/TNonblockingSSLServerTest.cpp b/lib/cpp/test/TNonblockingSSLServerTest.cpp
index dc40c12..94289d5 100644
--- a/lib/cpp/test/TNonblockingSSLServerTest.cpp
+++ b/lib/cpp/test/TNonblockingSSLServerTest.cpp
@@ -29,6 +29,9 @@
#include "gen-cpp/ParentService.h"
#include <event.h>
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
using namespace apache::thrift;
using apache::thrift::concurrency::Guard;
@@ -158,7 +161,7 @@
void run() override {
// When binding to explicit port, allow retrying to workaround bind failures on ports in use
int retryCount = port ? 10 : 0;
- pServerSocketFactory = createServerSocketFactory();
+ pServerSocketFactory = createServerSocketFactory();
startServer(retryCount);
}
diff --git a/lib/cpp/test/TSSLSocketInterruptTest.cpp b/lib/cpp/test/TSSLSocketInterruptTest.cpp
index 83fb993..bdaa466 100644
--- a/lib/cpp/test/TSSLSocketInterruptTest.cpp
+++ b/lib/cpp/test/TSSLSocketInterruptTest.cpp
@@ -27,7 +27,7 @@
#include <memory>
#include <thrift/transport/TSSLSocket.h>
#include <thrift/transport/TSSLServerSocket.h>
-#ifdef __linux__
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
diff --git a/lib/cpp/test/ToStringTest.cpp b/lib/cpp/test/ToStringTest.cpp
index 722e590..736b33c 100644
--- a/lib/cpp/test/ToStringTest.cpp
+++ b/lib/cpp/test/ToStringTest.cpp
@@ -41,8 +41,12 @@
BOOST_CHECK_EQUAL(to_string("abc"), "abc");
}
+// NOTE: Currently (as of 2021.08.12) the locale-based tests do not work on
+// Windows in the AppVeyor Thrift CI build correctly. Therefore disabled on
+// Windows:
+#ifndef _WIN32
BOOST_AUTO_TEST_CASE(locale_en_US_int_to_string) {
-#if _WIN32
+#ifdef _WIN32
std::locale::global(std::locale("en-US.UTF-8"));
#else
std::locale::global(std::locale("en_US.UTF-8"));
@@ -51,7 +55,7 @@
}
BOOST_AUTO_TEST_CASE(locale_de_DE_floating_point_to_string) {
-#if _WIN32
+#ifdef _WIN32
std::locale::global(std::locale("de-DE.UTF-8"));
#else
std::locale::global(std::locale("de_DE.UTF-8"));
@@ -60,6 +64,7 @@
BOOST_CHECK_EQUAL(to_string(1.5f), "1.5");
BOOST_CHECK_EQUAL(to_string(1.5L), "1.5");
}
+#endif
BOOST_AUTO_TEST_CASE(empty_vector_to_string) {
std::vector<int> l;
diff --git a/lib/cpp/test/qt/CMakeLists.txt b/lib/cpp/test/qt/CMakeLists.txt
index 7f341cc..c2a3938 100644
--- a/lib/cpp/test/qt/CMakeLists.txt
+++ b/lib/cpp/test/qt/CMakeLists.txt
@@ -24,9 +24,8 @@
)
add_executable(TQTcpServerTest_Qt5 ${TQTcpServerTest_Qt5_SOURCES})
target_link_libraries(TQTcpServerTest_Qt5 testgencpp_cob)
-LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest_Qt5 thriftqt5)
-LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest_Qt5 thrift)
+target_link_libraries(TQTcpServerTest_Qt5 thriftqt5)
+target_link_libraries(TQTcpServerTest_Qt5 thrift)
target_link_libraries(TQTcpServerTest_Qt5 Qt5::Test Qt5::Network)
add_test(NAME TQTcpServerTest_Qt5 COMMAND TQTcpServerTest_Qt5)
-
diff --git a/lib/d/src/thrift/base.d b/lib/d/src/thrift/base.d
index 6c49afe..471a253 100644
--- a/lib/d/src/thrift/base.d
+++ b/lib/d/src/thrift/base.d
@@ -50,7 +50,7 @@
/// The Thrift version string, used for informative purposes.
// Note: This is currently hardcoded, but will likely be filled in by the build
// system in future versions.
-enum VERSION = "0.15.0";
+enum VERSION = "0.16.0";
/**
* Functions used for logging inside Thrift.
diff --git a/lib/dart/pubspec.yaml b/lib/dart/pubspec.yaml
index 28407e2..8dbb367 100644
--- a/lib/dart/pubspec.yaml
+++ b/lib/dart/pubspec.yaml
@@ -16,7 +16,7 @@
# under the License.
name: thrift
-version: 0.15.0
+version: 0.16.0
description: >
A Dart library for Apache Thrift
author: Apache Thrift Developers <dev@thrift.apache.org>
diff --git a/lib/delphi/src/Thrift.pas b/lib/delphi/src/Thrift.pas
index 66dda72..bf9ac05 100644
--- a/lib/delphi/src/Thrift.pas
+++ b/lib/delphi/src/Thrift.pas
@@ -28,7 +28,7 @@
Thrift.Protocol;
const
- Version = '0.15.0';
+ Version = '0.16.0';
type
TException = Thrift.Exception.TException; // compatibility alias
diff --git a/lib/erl/src/thrift.app.src b/lib/erl/src/thrift.app.src
index a98c586..0ce69b9 100644
--- a/lib/erl/src/thrift.app.src
+++ b/lib/erl/src/thrift.app.src
@@ -22,7 +22,7 @@
{description, "Thrift bindings"},
% The version of the applicaton
- {vsn, "0.15.0"},
+ {vsn, "0.16.0"},
% All modules used by the application.
{modules, [
diff --git a/lib/haxe/haxelib.json b/lib/haxe/haxelib.json
index 61448da..2d73ad8 100644
--- a/lib/haxe/haxelib.json
+++ b/lib/haxe/haxelib.json
@@ -10,7 +10,7 @@
"framework"
],
"description": "Haxe bindings for the Apache Thrift RPC and serialization framework",
- "version": "0.15.0",
+ "version": "0.16.0",
"releasenote": "Licensed under Apache License, Version 2.0. The Apache Thrift compiler needs to be installed separately.",
"contributors": ["ApacheThrift"],
"dependencies": {
diff --git a/lib/java/gradle.properties b/lib/java/gradle.properties
index 7208807..6faaa2a 100644
--- a/lib/java/gradle.properties
+++ b/lib/java/gradle.properties
@@ -1,7 +1,7 @@
# This file is shared currently between this Gradle build and the
# Ant builds for fd303 and JavaScript. Keep the dotted notation for
# the properties to minimize the changes in the dependencies.
-thrift.version=0.15.0
+thrift.version=0.16.0
thrift.groupid=org.apache.thrift
release=false
diff --git a/lib/java/src/org/apache/thrift/EncodingUtils.java b/lib/java/src/org/apache/thrift/EncodingUtils.java
index bf14ef5..d8cb108 100644
--- a/lib/java/src/org/apache/thrift/EncodingUtils.java
+++ b/lib/java/src/org/apache/thrift/EncodingUtils.java
@@ -27,7 +27,7 @@
/**
* Encode <code>integer</code> as a series of 4 bytes into <code>buf</code>
* starting at position 0 within that buffer.
- *
+ *
* @param integer
* The integer to encode.
* @param buf
@@ -40,7 +40,7 @@
/**
* Encode <code>integer</code> as a series of 4 bytes into <code>buf</code>
* starting at position <code>offset</code>.
- *
+ *
* @param integer
* The integer to encode.
* @param buf
@@ -58,7 +58,7 @@
/**
* Decode a series of 4 bytes from <code>buf</code>, starting at position 0,
* and interpret them as an integer.
- *
+ *
* @param buf
* The buffer to read from.
* @return An integer, as read from the buffer.
@@ -70,7 +70,7 @@
/**
* Decode a series of 4 bytes from <code>buf</code>, start at
* <code>offset</code>, and interpret them as an integer.
- *
+ *
* @param buf
* The buffer to read from.
* @param offset
@@ -85,6 +85,12 @@
/**
* Bitfield utilities.
* Returns true if the bit at position is set in v.
+ *
+ * @param v
+ * the value whose bit is to be checked.
+ * @param position
+ * the 0 based bit number indicating the bit to check.
+ * @return true if the bit at position is set in v.
*/
public static final boolean testBit(byte v, int position) {
return testBit((int)v, position);
@@ -104,6 +110,12 @@
/**
* Returns v, with the bit at position set to zero.
+ *
+ * @param v
+ * the value whose bit is to be cleared.
+ * @param position
+ * the 0 based bit number indicating the bit to clear.
+ * @return v, with the bit at position set to zero.
*/
public static final byte clearBit(byte v, int position) {
return (byte)clearBit((int)v, position);
@@ -123,6 +135,14 @@
/**
* Returns v, with the bit at position set to 1 or 0 depending on value.
+ *
+ * @param v
+ * the value whose bit is to be set.
+ * @param position
+ * the 0 based bit number indicating the bit to set.
+ * @param value
+ * if true, the given bit is set to 1; otherwise it is set to 0.
+ * @return v, with the bit at position set to 0 (if value is false) or 1 (if value is true).
*/
public static final byte setBit(byte v, int position, boolean value) {
return (byte)setBit((int)v, position, value);
diff --git a/lib/java/src/org/apache/thrift/Option.java b/lib/java/src/org/apache/thrift/Option.java
index d5cd309..f02eae0 100644
--- a/lib/java/src/org/apache/thrift/Option.java
+++ b/lib/java/src/org/apache/thrift/Option.java
@@ -96,8 +96,8 @@
/**
* Wraps value in an Option type, depending on whether or not value is null
- * @param value
- * @param <T> type of value
+ * @param value the value to wrap in Option
+ * @param <T> the type of value
* @return Some(value) if value is not null, None if value is null
*/
public static <T> Option<T> fromNullable(T value) {
@@ -110,8 +110,8 @@
/**
* Wrap value in a Some type (NB! value must not be null!)
- * @param value
- * @param <T> type of value
+ * @param value the value to wrap.
+ * @param <T> the type of value
* @return a new Some(value)
*/
public static <T> Some<T> some(T value) {
@@ -122,4 +122,4 @@
public static <T> None<T> none() {
return (None<T>) NONE;
}
-}
\ No newline at end of file
+}
diff --git a/lib/java/src/org/apache/thrift/TApplicationException.java b/lib/java/src/org/apache/thrift/TApplicationException.java
index 4d693d9..59cff69 100644
--- a/lib/java/src/org/apache/thrift/TApplicationException.java
+++ b/lib/java/src/org/apache/thrift/TApplicationException.java
@@ -125,6 +125,10 @@
/**
* Convenience factory method for constructing a TApplicationException given a TProtocol input
+ *
+ * @param iprot protocol from which an instance of TApplicationException is read.
+ * @return an instance of TApplicationException read from iprot.
+ * @throws TException if there is an error reading from iprot.
*/
public static TApplicationException readFrom(TProtocol iprot) throws TException
{
diff --git a/lib/java/src/org/apache/thrift/TAsyncProcessor.java b/lib/java/src/org/apache/thrift/TAsyncProcessor.java
index 5e287d5..d435b08 100644
--- a/lib/java/src/org/apache/thrift/TAsyncProcessor.java
+++ b/lib/java/src/org/apache/thrift/TAsyncProcessor.java
@@ -27,6 +27,7 @@
* <b>Note:</b> Implementations must call fb.responseReady() once processing
* is complete
*
+ * @param fb the frame buffer to process.
* @throws TException if the frame cannot be processed
*/
public void process(final AsyncFrameBuffer fb) throws TException;
diff --git a/lib/java/src/org/apache/thrift/TBase.java b/lib/java/src/org/apache/thrift/TBase.java
index e1489d5..be8ef9b 100644
--- a/lib/java/src/org/apache/thrift/TBase.java
+++ b/lib/java/src/org/apache/thrift/TBase.java
@@ -31,13 +31,17 @@
/**
* Get the F instance that corresponds to fieldId.
+ *
+ * @param fieldId the ID of the requested field.
+ * @return F instance that corresponds to fieldId.
*/
public F fieldForId(int fieldId);
/**
* Check if a field is currently set or unset.
*
- * @param field
+ * @param field the field to check.
+ * @return true if the field is set, false otherwise.
*/
public boolean isSet(F field);
@@ -45,7 +49,8 @@
* Get a field's value by field variable. Primitive types will be wrapped in
* the appropriate "boxed" types.
*
- * @param field
+ * @param field the field whose value is requested.
+ * @return the value of the requested field.
*/
public Object getFieldValue(F field);
@@ -53,10 +58,16 @@
* Set a field's value by field variable. Primitive types must be "boxed" in
* the appropriate object wrapper type.
*
- * @param field
+ * @param field the field whose value is to be set.
+ * @param value the value to be assigned to field.
*/
public void setFieldValue(F field, Object value);
+ /**
+ * Performs a deep copy of this instance and returns the copy.
+ *
+ * @return a deep copy of this instance.
+ */
public T deepCopy();
/**
diff --git a/lib/java/src/org/apache/thrift/TDeserializer.java b/lib/java/src/org/apache/thrift/TDeserializer.java
index 29be557..16070bb 100644
--- a/lib/java/src/org/apache/thrift/TDeserializer.java
+++ b/lib/java/src/org/apache/thrift/TDeserializer.java
@@ -42,6 +42,8 @@
/**
* Create a new TDeserializer that uses the TBinaryProtocol by default.
+ *
+ * @throws TTransportException
*/
public TDeserializer() throws TTransportException {
this(new TBinaryProtocol.Factory());
@@ -52,6 +54,7 @@
* factory that is passed in.
*
* @param protocolFactory Factory to create a protocol
+ * @throws TTransportException
*/
public TDeserializer(TProtocolFactory protocolFactory) throws TTransportException {
trans_ = new TMemoryInputTransport(new TConfiguration());
@@ -63,6 +66,7 @@
*
* @param base The object to read into
* @param bytes The array to read from
+ * @throws TException if an error is encountered during deserialization.
*/
public void deserialize(TBase base, byte[] bytes) throws TException {
deserialize(base, bytes, 0, bytes.length);
@@ -75,6 +79,7 @@
* @param bytes The array to read from
* @param offset The offset into {@code bytes}
* @param length The length to read from {@code bytes}
+ * @throws TException if an error is encountered during deserialization.
*/
public void deserialize(TBase base, byte[] bytes, int offset, int length) throws TException {
try {
@@ -93,6 +98,7 @@
* @param base The object to read into
* @param data The string to read from
* @param charset Valid JVM charset
+ * @throws TException if an error is encountered during deserialization.
*/
public void deserialize(TBase base, String data, String charset) throws TException {
try {
@@ -111,7 +117,7 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path tb
* @param fieldIdPathRest The rest FieldId's that define a path tb
- * @throws TException
+ * @throws TException if an error is encountered during deserialization.
*/
public void partialDeserialize(TBase tb, byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
try {
@@ -133,7 +139,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a boolean field
* @param fieldIdPathRest The rest FieldId's that define a path to a boolean field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Boolean partialDeserializeBool(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Boolean) partialDeserializeField(TType.BOOL, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -145,7 +152,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a byte field
* @param fieldIdPathRest The rest FieldId's that define a path to a byte field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Byte partialDeserializeByte(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Byte) partialDeserializeField(TType.BYTE, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -157,7 +165,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a double field
* @param fieldIdPathRest The rest FieldId's that define a path to a double field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Double partialDeserializeDouble(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Double) partialDeserializeField(TType.DOUBLE, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -169,7 +178,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to an i16 field
* @param fieldIdPathRest The rest FieldId's that define a path to an i16 field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Short partialDeserializeI16(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Short) partialDeserializeField(TType.I16, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -181,7 +191,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to an i32 field
* @param fieldIdPathRest The rest FieldId's that define a path to an i32 field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Integer partialDeserializeI32(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Integer) partialDeserializeField(TType.I32, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -193,7 +204,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to an i64 field
* @param fieldIdPathRest The rest FieldId's that define a path to an i64 field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Long partialDeserializeI64(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (Long) partialDeserializeField(TType.I64, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -205,7 +217,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a string field
* @param fieldIdPathRest The rest FieldId's that define a path to a string field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public String partialDeserializeString(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
return (String) partialDeserializeField(TType.STRING, bytes, fieldIdPathFirst, fieldIdPathRest);
@@ -217,7 +230,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a binary field
* @param fieldIdPathRest The rest FieldId's that define a path to a binary field
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public ByteBuffer partialDeserializeByteArray(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
// TType does not have binary, so we use the arbitrary num 100
@@ -230,7 +244,8 @@
* @param bytes The serialized object to read from
* @param fieldIdPathFirst First of the FieldId's that define a path to a TUnion
* @param fieldIdPathRest The rest FieldId's that define a path to a TUnion
- * @throws TException
+ * @return the deserialized value.
+ * @throws TException if an error is encountered during deserialization.
*/
public Short partialDeserializeSetFieldIdInUnion(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException {
try {
@@ -333,6 +348,7 @@
*
* @param base The object to read into
* @param data The string to read from
+ * @throws TException if an error is encountered during deserialization.
*/
public void fromString(TBase base, String data) throws TException {
deserialize(base, data.getBytes());
diff --git a/lib/java/src/org/apache/thrift/TFieldIdEnum.java b/lib/java/src/org/apache/thrift/TFieldIdEnum.java
index 2956fba..20b845e 100644
--- a/lib/java/src/org/apache/thrift/TFieldIdEnum.java
+++ b/lib/java/src/org/apache/thrift/TFieldIdEnum.java
@@ -23,12 +23,16 @@
*/
public interface TFieldIdEnum {
/**
- * Get the Thrift field id for the named field.
+ * Gets the Thrift field id for the named field.
+ *
+ * @return the Thrift field id for the named field.
*/
public short getThriftFieldId();
/**
- * Get the field's name, exactly as in the IDL.
+ * Gets the field's name, exactly as in the IDL.
+ *
+ * @return the field's name, exactly as in the IDL.
*/
public String getFieldName();
}
diff --git a/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java b/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
index c494862..d797a60 100644
--- a/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
+++ b/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
@@ -70,7 +70,7 @@
/**
* Register a service to be called to process queries without service name
- * @param processor
+ * @param processor the service to be called.
*/
public void registerDefault(TProcessor processor) {
defaultProcessor = processor;
diff --git a/lib/java/src/org/apache/thrift/TNonblockingMultiFetchClient.java b/lib/java/src/org/apache/thrift/TNonblockingMultiFetchClient.java
index 78f3a57..13e8031 100644
--- a/lib/java/src/org/apache/thrift/TNonblockingMultiFetchClient.java
+++ b/lib/java/src/org/apache/thrift/TNonblockingMultiFetchClient.java
@@ -118,8 +118,9 @@
}
/**
- * return a duplication of requestBuf, so that requestBuf will not
- * be modified by others.
+ * Returns a copy of requestBuf, so that requestBuf will not be modified by others.
+ *
+ * @return a copy of requestBuf.
*/
public synchronized ByteBuffer getRequestBuf() {
if (requestBuf == null) {
@@ -144,7 +145,9 @@
}
/**
- * main entry function for fetching from servers
+ * Main entry function for fetching from servers.
+ *
+ * @return The fetched data.
*/
public synchronized ByteBuffer[] fetch() {
// clear previous results
diff --git a/lib/java/src/org/apache/thrift/TSerializable.java b/lib/java/src/org/apache/thrift/TSerializable.java
index 80002c7..317814b 100644
--- a/lib/java/src/org/apache/thrift/TSerializable.java
+++ b/lib/java/src/org/apache/thrift/TSerializable.java
@@ -31,6 +31,7 @@
* Reads the TObject from the given input protocol.
*
* @param iprot Input protocol
+ * @throws TException if there is an error reading from iprot
*/
public void read(TProtocol iprot) throws TException;
@@ -38,6 +39,7 @@
* Writes the objects out to the protocol
*
* @param oprot Output protocol
+ * @throws TException if there is an error writing to oprot
*/
public void write(TProtocol oprot) throws TException;
diff --git a/lib/java/src/org/apache/thrift/TSerializer.java b/lib/java/src/org/apache/thrift/TSerializer.java
index 90cc039..8f85022 100644
--- a/lib/java/src/org/apache/thrift/TSerializer.java
+++ b/lib/java/src/org/apache/thrift/TSerializer.java
@@ -51,6 +51,8 @@
/**
* Create a new TSerializer that uses the TBinaryProtocol by default.
+ *
+ * @throws TTransportException
*/
public TSerializer() throws TTransportException {
this(new TBinaryProtocol.Factory());
@@ -61,6 +63,7 @@
* factory that is passed in.
*
* @param protocolFactory Factory to create a protocol
+ * @throws TTransportException
*/
public TSerializer(TProtocolFactory protocolFactory) throws TTransportException {
transport_ = new TIOStreamTransport(new TConfiguration(), baos_);
@@ -74,6 +77,7 @@
*
* @param base The object to serialize
* @return Serialized object in byte[] format
+ * @throws TException if an error is encountered during serialization.
*/
public byte[] serialize(TBase base) throws TException {
baos_.reset();
@@ -87,9 +91,9 @@
*
* @param base The object to serialize
* @return Serialized object as a String
+ * @throws TException if an error is encountered during serialization.
*/
public String toString(TBase base) throws TException {
return new String(serialize(base));
}
}
-
diff --git a/lib/java/src/org/apache/thrift/TServiceClientFactory.java b/lib/java/src/org/apache/thrift/TServiceClientFactory.java
index 988e655..7f08ba6 100644
--- a/lib/java/src/org/apache/thrift/TServiceClientFactory.java
+++ b/lib/java/src/org/apache/thrift/TServiceClientFactory.java
@@ -24,12 +24,12 @@
/**
* A TServiceClientFactory provides a general way to get a TServiceClient
* connected to a remote TService via a protocol.
- * @param <T>
+ * @param <T> the type of TServiceClient to get.
*/
public interface TServiceClientFactory<T extends TServiceClient> {
/**
* Get a brand-new T using <i>prot</i> as both the input and output protocol.
- * @param prot
+ * @param prot The protocol to use for getting T.
* @return A brand-new T using <i>prot</i> as both the input and output protocol.
*/
public T getClient(TProtocol prot);
@@ -37,8 +37,8 @@
/**
* Get a brand new T using the specified input and output protocols. The
* input and output protocols may be the same instance.
- * @param iprot
- * @param oprot
+ * @param iprot The input protocol to use for getting T.
+ * @param oprot The output protocol to use for getting T.
* @return a brand new T using the specified input and output protocols
*/
public T getClient(TProtocol iprot, TProtocol oprot);
diff --git a/lib/java/src/org/apache/thrift/TUnion.java b/lib/java/src/org/apache/thrift/TUnion.java
index 1ef11df..cf22749 100644
--- a/lib/java/src/org/apache/thrift/TUnion.java
+++ b/lib/java/src/org/apache/thrift/TUnion.java
@@ -43,7 +43,7 @@
setField_ = null;
value_ = null;
}
-
+
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TUnionStandardSchemeFactory());
@@ -153,22 +153,26 @@
}
/**
- * Implementation should be generated so that we can efficiently type check
+ * Implementation should be generated so that we can efficiently type check
* various values.
- * @param setField
- * @param value
+ * @param setField the field to assign value to.
+ * @param value the value to be assigned to setField.
+ * @throws ClassCastException if the type of value is incompatible with the type of setField.
*/
protected abstract void checkType(F setField, Object value) throws ClassCastException;
/**
- * Implementation should be generated to read the right stuff from the wire
- * based on the field header.
- * @param field
+ * Implementation should be generated to read the right stuff from the wire
+ * based on the field header.
+ *
+ * @param iprot input protocol from which to read a value.
+ * @param field the field whose value is to be read from iprot.
* @return read Object based on the field header, as specified by the argument.
+ * @throws TException
*/
protected abstract Object standardSchemeReadValue(TProtocol iprot, TField field) throws TException;
protected abstract void standardSchemeWriteValue(TProtocol oprot) throws TException;
-
+
protected abstract Object tupleSchemeReadValue(TProtocol iprot, short fieldID) throws TException;
protected abstract void tupleSchemeWriteValue(TProtocol oprot) throws TException;
@@ -203,13 +207,13 @@
this.setField_ = null;
this.value_ = null;
}
-
+
private static class TUnionStandardSchemeFactory implements SchemeFactory {
public TUnionStandardScheme getScheme() {
return new TUnionStandardScheme();
}
}
-
+
private static class TUnionStandardScheme extends StandardScheme<TUnion> {
@Override
@@ -247,13 +251,13 @@
oprot.writeStructEnd();
}
}
-
+
private static class TUnionTupleSchemeFactory implements SchemeFactory {
public TUnionTupleScheme getScheme() {
return new TUnionTupleScheme();
}
}
-
+
private static class TUnionTupleScheme extends TupleScheme<TUnion> {
@Override
diff --git a/lib/java/src/org/apache/thrift/async/TAsyncClient.java b/lib/java/src/org/apache/thrift/async/TAsyncClient.java
index 005018a..8ba1356 100644
--- a/lib/java/src/org/apache/thrift/async/TAsyncClient.java
+++ b/lib/java/src/org/apache/thrift/async/TAsyncClient.java
@@ -92,7 +92,9 @@
}
/**
- * Called by delegate method on error
+ * Called by delegate method on error.
+ *
+ * @param exception the exception indicating the current error condition.
*/
protected void onError(Exception exception) {
___transport.close();
diff --git a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
index 38e10e1..6a3ee55 100644
--- a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
@@ -308,7 +308,7 @@
public void writeString(String str) throws TException {
writeContext_.write();
int length = str.length();
- StringBuffer escape = new StringBuffer(length + 16);
+ StringBuilder escape = new StringBuilder(length + 16);
escape.append(QUOTE);
for (int i = 0; i < length; ++i) {
char c = str.charAt(i);
diff --git a/lib/java/src/org/apache/thrift/transport/TByteBuffer.java b/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
index c792f3b..72d10c5 100644
--- a/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
+++ b/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
@@ -14,6 +14,9 @@
/**
* Creates a new TByteBuffer wrapping a given NIO ByteBuffer.
+ *
+ * @param byteBuffer the NIO ByteBuffer to wrap.
+ * @throws TTransportException on error.
*/
public TByteBuffer(ByteBuffer byteBuffer) throws TTransportException {
super(new TConfiguration());
@@ -60,7 +63,9 @@
}
/**
- * Get the underlying NIO ByteBuffer.
+ * Gets the underlying NIO ByteBuffer.
+ *
+ * @return the underlying NIO ByteBuffer.
*/
public ByteBuffer getByteBuffer() {
return byteBuffer;
@@ -68,6 +73,8 @@
/**
* Convenience method to call clear() on the underlying NIO ByteBuffer.
+ *
+ * @return this instance.
*/
public TByteBuffer clear() {
byteBuffer.clear();
@@ -76,15 +83,18 @@
/**
* Convenience method to call flip() on the underlying NIO ByteBuffer.
- */
+ *
+ * @return this instance.
+ */
public TByteBuffer flip() {
byteBuffer.flip();
return this;
}
/**
- * Convenience method to convert the underlying NIO ByteBuffer to a
- * plain old byte array.
+ * Convenience method to convert the underlying NIO ByteBuffer to a plain old byte array.
+ *
+ * @return the byte array backing the underlying NIO ByteBuffer.
*/
public byte[] toByteArray() {
final byte[] data = new byte[byteBuffer.remaining()];
diff --git a/lib/java/src/org/apache/thrift/utils/StringUtils.java b/lib/java/src/org/apache/thrift/utils/StringUtils.java
index 9b9671b..b54388a 100644
--- a/lib/java/src/org/apache/thrift/utils/StringUtils.java
+++ b/lib/java/src/org/apache/thrift/utils/StringUtils.java
@@ -30,7 +30,7 @@
/**
* Stringify a byte array to the hex representation for each byte.
*
- * @param bytes
+ * @param bytes the byte array to convert to hex string.
* @return hex string.
*/
public static String bytesToHexString(byte[] bytes) {
diff --git a/lib/js/package-lock.json b/lib/js/package-lock.json
index 6cd3f75..84e5284 100644
--- a/lib/js/package-lock.json
+++ b/lib/js/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/lib/js/package.json b/lib/js/package.json
index 3e93804..a275e67 100644
--- a/lib/js/package.json
+++ b/lib/js/package.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"description": "Thrift is a software framework for scalable cross-language services development.",
"main": "./src/thrift",
"author": {
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 808739f..9933d60 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -46,7 +46,7 @@
* @const {string} Version
* @memberof Thrift
*/
- Version: '0.15.0',
+ Version: '0.16.0',
/**
* Thrift IDL type string to Id mapping.
diff --git a/lib/lua/Thrift.lua b/lib/lua/Thrift.lua
index bf8d39f..32c442b 100644
--- a/lib/lua/Thrift.lua
+++ b/lib/lua/Thrift.lua
@@ -48,7 +48,7 @@
return count
end
-version = '0.15.0'
+version = '0.16.0'
TType = {
STOP = 0,
diff --git a/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj b/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
index 807f767..b47017e 100644
--- a/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
+++ b/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
@@ -22,7 +22,7 @@
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Thrift.IntegrationTests</AssemblyName>
<PackageId>Thrift.IntegrationTests</PackageId>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<OutputType>Exe</OutputType>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
diff --git a/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj b/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
index bb93894..126635d 100644
--- a/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
+++ b/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <ThriftVersion>0.15.0</ThriftVersion>
+ <ThriftVersion>0.16.0</ThriftVersion>
<ThriftVersionOutput>Thrift version $(ThriftVersion)</ThriftVersionOutput>
<TargetFramework>net5.0</TargetFramework>
<Version>$(ThriftVersion).0</Version>
diff --git a/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj b/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
index 4e21a26..f1dc731 100644
--- a/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
+++ b/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
@@ -17,10 +17,12 @@
specific language governing permissions and limitations
under the License.
-->
+
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
</PropertyGroup>
+
<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.72.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
@@ -28,10 +30,12 @@
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
</ItemGroup>
+
<ItemGroup>
<ProjectReference Include="..\..\Thrift\Thrift.csproj" />
<ProjectReference Include="..\Thrift.PublicInterfaces.Compile.Tests\Thrift.PublicInterfaces.Compile.Tests.csproj" />
</ItemGroup>
+
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
diff --git a/lib/netstd/Thrift/Properties/AssemblyInfo.cs b/lib/netstd/Thrift/Properties/AssemblyInfo.cs
index c05acab..50fa031 100644
--- a/lib/netstd/Thrift/Properties/AssemblyInfo.cs
+++ b/lib/netstd/Thrift/Properties/AssemblyInfo.cs
@@ -52,5 +52,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.15.0.0")]
-[assembly: AssemblyFileVersion("0.15.0.0")]
+[assembly: AssemblyVersion("0.16.0.0")]
+[assembly: AssemblyFileVersion("0.16.0.0")]
diff --git a/lib/netstd/Thrift/Thrift.csproj b/lib/netstd/Thrift/Thrift.csproj
index 4372334..2454ffd 100644
--- a/lib/netstd/Thrift/Thrift.csproj
+++ b/lib/netstd/Thrift/Thrift.csproj
@@ -18,40 +18,41 @@
under the License.
-->
-<PropertyGroup>
- <TargetFrameworks>netstandard2.1;netstandard2.0;net5.0</TargetFrameworks>
- <AssemblyName>Thrift</AssemblyName>
- <PackageId>ApacheThrift</PackageId>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
- <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
- <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
- <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
- <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
- <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
- <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
- <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
- <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
-</PropertyGroup>
+ <PropertyGroup>
+ <TargetFrameworks>netstandard2.1;netstandard2.0;net5.0</TargetFrameworks>
+ <AssemblyName>Thrift</AssemblyName>
+ <PackageId>ApacheThrift</PackageId>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
+ <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
+ <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
+ <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
+ <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
+ <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
+ <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
+ <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
+ <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
+ </PropertyGroup>
-<PropertyGroup>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>thrift.snk</AssemblyOriginatorKeyFile>
- <DelaySign>false</DelaySign>
- <Title>Apache Thrift 0.15.0</Title>
- <Version>0.15.0.0</Version>
- <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
- <PackageProjectUrl>http://thrift.apache.org/</PackageProjectUrl>
- <Authors>Apache Thrift Developers</Authors>
- <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
- <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
- <PackageDescription>C# .NET Core bindings for the Apache Thrift RPC system</PackageDescription>
- <PackageReleaseNotes></PackageReleaseNotes>
- <PackageTags>Apache Thrift RPC</PackageTags>
- <PackageReleaseNotes>https://github.com/apache/thrift/blob/0.15.0/CHANGES.md</PackageReleaseNotes>
- <Copyright>Copyright 2021 The Apache Software Foundation</Copyright>
-</PropertyGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>thrift.snk</AssemblyOriginatorKeyFile>
+ <DelaySign>false</DelaySign>
+ <Title>Apache Thrift 0.16.0</Title>
+ <Version>0.16.0.0</Version>
+ <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
+ <PackageProjectUrl>http://thrift.apache.org/</PackageProjectUrl>
+ <Authors>Apache Thrift Developers</Authors>
+ <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
+ <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
+ <PackageDescription>C# .NET Core bindings for the Apache Thrift RPC system</PackageDescription>
+ <PackageReleaseNotes></PackageReleaseNotes>
+ <PackageTags>Apache Thrift RPC</PackageTags>
+ <PackageReleaseNotes>https://github.com/apache/thrift/blob/0.16.0/CHANGES.md</PackageReleaseNotes>
+ <Copyright>Copyright 2021 The Apache Software Foundation</Copyright>
+ </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
diff --git a/lib/ocaml/_oasis b/lib/ocaml/_oasis
index a3c1cab..e901466 100644
--- a/lib/ocaml/_oasis
+++ b/lib/ocaml/_oasis
@@ -1,5 +1,5 @@
Name: libthrift-ocaml
-Version: 0.15.0
+Version: 0.16.0
OASISFormat: 0.3
Synopsis: OCaml bindings for the Apache Thrift RPC system
Authors: Apache Thrift Developers <dev@thrift.apache.org>
diff --git a/lib/perl/lib/Thrift.pm b/lib/perl/lib/Thrift.pm
index 4e399bc..b04cd21 100644
--- a/lib/perl/lib/Thrift.pm
+++ b/lib/perl/lib/Thrift.pm
@@ -31,6 +31,6 @@
#
package Thrift;
-use version 0.77; our $VERSION = version->declare("v0.15.0");
+use version 0.77; our $VERSION = version->declare("v0.16.0");
1;
diff --git a/lib/py/setup.py b/lib/py/setup.py
index caa7147..0db9731 100644
--- a/lib/py/setup.py
+++ b/lib/py/setup.py
@@ -91,7 +91,7 @@
twisted_deps = ['twisted']
setup(name='thrift',
- version='0.15.0',
+ version='0.16.0',
description='Python bindings for the Apache Thrift RPC system',
author='Apache Thrift Developers',
author_email='dev@thrift.apache.org',
diff --git a/lib/rb/thrift.gemspec b/lib/rb/thrift.gemspec
index d0366a7..26fa86b 100644
--- a/lib/rb/thrift.gemspec
+++ b/lib/rb/thrift.gemspec
@@ -3,7 +3,7 @@
Gem::Specification.new do |s|
s.name = 'thrift'
- s.version = '0.15.0'
+ s.version = '0.16.0'
s.authors = ['Apache Thrift Developers']
s.email = ['dev@thrift.apache.org']
s.homepage = 'http://thrift.apache.org'
diff --git a/lib/rs/Cargo.toml b/lib/rs/Cargo.toml
index 7326902..a32d671 100644
--- a/lib/rs/Cargo.toml
+++ b/lib/rs/Cargo.toml
@@ -2,7 +2,7 @@
name = "thrift"
description = "Rust bindings for the Apache Thrift RPC system"
edition = "2018"
-version = "0.15.0"
+version = "0.16.0"
license = "Apache-2.0"
authors = ["Apache Thrift Developers <dev@thrift.apache.org>"]
homepage = "http://thrift.apache.org"
@@ -15,6 +15,10 @@
[dependencies]
byteorder = "1.3"
integer-encoding = "3.0"
-log = "0.4"
+log = {version = "0.4", optional = true}
ordered-float = "1.0"
-threadpool = "1.7"
+threadpool = {version = "1.7", optional = true}
+
+[features]
+default = ["server"]
+server = ["threadpool", "log"]
diff --git a/lib/rs/src/lib.rs b/lib/rs/src/lib.rs
index ddc7b0d..84c1f9b 100644
--- a/lib/rs/src/lib.rs
+++ b/lib/rs/src/lib.rs
@@ -71,6 +71,8 @@
}
pub mod protocol;
+
+#[cfg(feature = "server")]
pub mod server;
pub mod transport;
diff --git a/lib/rs/src/protocol/compact.rs b/lib/rs/src/protocol/compact.rs
index e08a30b..0fefca0 100644
--- a/lib/rs/src/protocol/compact.rs
+++ b/lib/rs/src/protocol/compact.rs
@@ -638,10 +638,10 @@
TType::Set => 0x0A,
TType::Map => 0x0B,
TType::Struct => 0x0C,
- _ => panic!(format!(
+ _ => panic!(
"should not have attempted to convert {} to u8",
field_type
- )),
+ ),
}
}
diff --git a/lib/rs/test/Cargo.toml b/lib/rs/test/Cargo.toml
index 9341bd5..c9ca298 100644
--- a/lib/rs/test/Cargo.toml
+++ b/lib/rs/test/Cargo.toml
@@ -8,6 +8,7 @@
[dependencies]
clap = "2.33"
+bitflags = "=1.2"
[dependencies.thrift]
path = "../"
diff --git a/lib/st/package.xml b/lib/st/package.xml
index 5d1c627..134dff2 100644
--- a/lib/st/package.xml
+++ b/lib/st/package.xml
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<!-- Apache Thrift Smalltalk library version 0.15.0 -->
+<!-- Apache Thrift Smalltalk library version 0.16.0 -->
<package>
<name>libthrift-st</name>
<file>thrift.st</file>
diff --git a/lib/swift/Sources/Thrift.swift b/lib/swift/Sources/Thrift.swift
index 49cdab0..e9be5ee 100644
--- a/lib/swift/Sources/Thrift.swift
+++ b/lib/swift/Sources/Thrift.swift
@@ -1,3 +1,3 @@
class Thrift {
- let version = "0.15.0"
+ let version = "0.16.0"
}
diff --git a/lib/swift/Tests/ThriftTests/ThriftTests.swift b/lib/swift/Tests/ThriftTests/ThriftTests.swift
index 1a0bb1d..91a43ee 100644
--- a/lib/swift/Tests/ThriftTests/ThriftTests.swift
+++ b/lib/swift/Tests/ThriftTests/ThriftTests.swift
@@ -3,7 +3,7 @@
class ThriftTests: XCTestCase {
func testVersion() {
- XCTAssertEqual(Thrift().version, "0.15.0")
+ XCTAssertEqual(Thrift().version, "0.16.0")
}
static var allTests : [(String, (ThriftTests) -> () throws -> Void)] {
diff --git a/lib/ts/package-lock.json b/lib/ts/package-lock.json
index f617553..a829509 100644
--- a/lib/ts/package-lock.json
+++ b/lib/ts/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/lib/ts/package.json b/lib/ts/package.json
index e79a075..ae1ad42 100644
--- a/lib/ts/package.json
+++ b/lib/ts/package.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"description": "Thrift is a software framework for scalable cross-language services development.",
"author": {
"name": "Apache Thrift Developers",
diff --git a/package-lock.json b/package-lock.json
index e0bcf04..f969bc4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "thrift",
- "version": "0.15.0",
+ "version": "0.16.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 4c085fe..75b6f5c 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/apache/thrift.git"
},
- "version": "0.15.0",
+ "version": "0.16.0",
"author": {
"name": "Apache Thrift Developers",
"email": "dev@thrift.apache.org",
diff --git a/sonar-project.properties b/sonar-project.properties
index f9c9e05..6c6c8f2 100755
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -16,7 +16,7 @@
services that work efficiently and seamlessly between all major languages.
# Apache Thrift Version
-sonar.projectVersion=0.15.0
+sonar.projectVersion=0.16.0
# use this to set another version string
# $ sonar-runner -D sonar.projectVersion=`git rev-parse HEAD`
# set projectDate in combination with projectVersion for imports of old releases
@@ -54,7 +54,7 @@
module1.sonar.projectBaseDir=lib/java
module1.sonar.sources=src
module1.sonar.tests=test
-module1.sonar.binaries=build/libs/libthrift-0.15.0.jar
+module1.sonar.binaries=build/libs/libthrift-0.16.0.jar
module1.sonar.libraries=build/deps/*.jar
module1.sonar.language=java
@@ -62,7 +62,7 @@
module2.sonar.projectBaseDir=.
module2.sonar.sources=tutorial/java/src, tutorial/java/gen-java
module2.sonar.binaries=tutorial/java/tutorial.jar
-module2.sonar.libraries=lib/java/build/deps/*.jar,lib/java/build/libs/libthrift-0.15.0.jar
+module2.sonar.libraries=lib/java/build/deps/*.jar,lib/java/build/libs/libthrift-0.16.0.jar
module2.sonar.language=java
module3.sonar.projectName=Apache Thrift - JavaScript Library
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index ac49aee..4a1045f 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -411,3 +411,8 @@
struct OptionalSetDefaultTest {
1: optional set<string> with_default = [ "test" ]
}
+
+struct OptionalBinary {
+ 1: optional set<binary> bin_set = {}
+ 2: optional map<binary,i32> bin_map = {}
+}
diff --git a/test/c_glib/CMakeLists.txt b/test/c_glib/CMakeLists.txt
index 2e2d687..410774d 100644
--- a/test/c_glib/CMakeLists.txt
+++ b/test/c_glib/CMakeLists.txt
@@ -17,7 +17,7 @@
# under the License.
#
-# Contains the thrift specific LINK_AGAINST_THRIFT_LIBRARY
+# Contains the thrift specific target_link_libraries
include(ThriftMacros)
find_package(GLIB REQUIRED COMPONENTS gobject)
@@ -39,10 +39,10 @@
gen-c_glib/t_test_thrift_test_types.h
)
add_library(crosstestgencglib STATIC ${crosstestgencglib_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(crosstestgencglib thrift_c_glib)
+target_link_libraries(crosstestgencglib thrift_c_glib)
if (WITH_ZLIB)
- LINK_AGAINST_THRIFT_LIBRARY(crosstestgencglib thrift_c_glib_zlib)
+ target_link_libraries(crosstestgencglib thrift_c_glib_zlib)
endif ()
add_executable(test_server src/test_server.c src/thrift_test_handler.c src/thrift_second_service_handler.c)
diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt
index 969019d..a6c1fd5 100755
--- a/test/cpp/CMakeLists.txt
+++ b/test/cpp/CMakeLists.txt
@@ -23,7 +23,7 @@
set(BOOST_COMPONENTS filesystem program_options random)
REQUIRE_BOOST_LIBRARIES(BOOST_COMPONENTS)
-# Contains the thrift specific LINK_AGAINST_THRIFT_LIBRARY
+# Contains the thrift specific target_link_libraries
include(ThriftMacros)
find_package(OpenSSL REQUIRED)
@@ -48,34 +48,34 @@
src/ThriftTest_extras.cpp
)
add_library(crosstestgencpp STATIC ${crosstestgencpp_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(crosstestgencpp thrift)
+target_link_libraries(crosstestgencpp thrift)
set(crossstressgencpp_SOURCES
gen-cpp/Service.cpp
)
add_library(crossstressgencpp STATIC ${crossstressgencpp_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(crossstressgencpp thrift)
+target_link_libraries(crossstressgencpp thrift)
set(crossspecificnamegencpp_SOURCES
- gen-cpp/EchoService.cpp
+ gen-cpp/EchoService.cpp
gen-cpp/SpecificNameTest_types.cpp
)
add_library(crossspecificnamegencpp STATIC ${crossspecificnamegencpp_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(crossspecificnamegencpp thrift)
+target_link_libraries(crossspecificnamegencpp thrift)
add_executable(TestServer src/TestServer.cpp)
target_link_libraries(TestServer crosstestgencpp ${Boost_LIBRARIES})
-LINK_AGAINST_THRIFT_LIBRARY(TestServer thriftnb)
-LINK_AGAINST_THRIFT_LIBRARY(TestServer thriftz)
+target_link_libraries(TestServer thriftnb)
+target_link_libraries(TestServer thriftz)
add_executable(TestClient src/TestClient.cpp)
target_link_libraries(TestClient crosstestgencpp ${Boost_LIBRARIES})
-LINK_AGAINST_THRIFT_LIBRARY(TestClient thriftnb)
-LINK_AGAINST_THRIFT_LIBRARY(TestClient thriftz)
+target_link_libraries(TestClient thriftnb)
+target_link_libraries(TestClient thriftz)
add_executable(StressTest src/StressTest.cpp)
target_link_libraries(StressTest crossstressgencpp ${Boost_LIBRARIES})
-LINK_AGAINST_THRIFT_LIBRARY(StressTest thriftnb)
+target_link_libraries(StressTest thriftnb)
add_test(NAME StressTest COMMAND StressTest)
add_test(NAME StressTestConcurrent COMMAND StressTest --client-type=concurrent)
@@ -84,15 +84,15 @@
if (NOT WIN32 AND NOT CYGWIN)
add_executable(StressTestNonBlocking src/StressTestNonBlocking.cpp)
target_link_libraries(StressTestNonBlocking crossstressgencpp ${Boost_LIBRARIES})
- LINK_AGAINST_THRIFT_LIBRARY(StressTestNonBlocking thriftnb)
- LINK_AGAINST_THRIFT_LIBRARY(StressTestNonBlocking thriftz)
+ target_link_libraries(StressTestNonBlocking thriftnb)
+ target_link_libraries(StressTestNonBlocking thriftz)
add_test(NAME StressTestNonBlocking COMMAND StressTestNonBlocking)
endif()
add_executable(SpecificNameTest src/SpecificNameTest.cpp)
target_link_libraries(SpecificNameTest crossspecificnamegencpp ${Boost_LIBRARIES} ${LIBEVENT_LIB})
-LINK_AGAINST_THRIFT_LIBRARY(SpecificNameTest thrift)
-LINK_AGAINST_THRIFT_LIBRARY(SpecificNameTest thriftnb)
+target_link_libraries(SpecificNameTest thrift)
+target_link_libraries(SpecificNameTest thriftnb)
add_test(NAME SpecificNameTest COMMAND SpecificNameTest)
#
diff --git a/test/dart/test_client/pubspec.yaml b/test/dart/test_client/pubspec.yaml
index 7d7e3b6..d5848b4 100644
--- a/test/dart/test_client/pubspec.yaml
+++ b/test/dart/test_client/pubspec.yaml
@@ -16,7 +16,7 @@
# under the License.
name: thrift_test_client
-version: 0.15.0
+version: 0.16.0
description: A client integration test for the Dart Thrift library
author: Apache Thrift Developers <dev@thrift.apache.org>
homepage: http://thrift.apache.org
diff --git a/test/erl/src/thrift_test.app.src b/test/erl/src/thrift_test.app.src
index 920211e..6faa1b5 100644
--- a/test/erl/src/thrift_test.app.src
+++ b/test/erl/src/thrift_test.app.src
@@ -22,7 +22,7 @@
{description, "Thrift cross language test"},
% The version of the applicaton
- {vsn, "0.15.0"},
+ {vsn, "0.16.0"},
% All modules used by the application.
{modules, [
diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index d3504d4..a331436 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -24,7 +24,7 @@
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
@@ -32,15 +32,18 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
</PropertyGroup>
+
<ItemGroup>
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="5.0.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="[4.3,)" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.8.1" />
<PackageReference Include="System.Threading" Version="[4.3,)" />
</ItemGroup>
+
<ItemGroup>
<ProjectReference Include="..\..\..\lib\netstd\Thrift\Thrift.csproj" />
</ItemGroup>
+
<Target Name="PreBuild" BeforeTargets="_GenerateRestoreProjectSpec;Restore;Compile">
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
diff --git a/test/netstd/Server/Server.csproj b/test/netstd/Server/Server.csproj
index e2ec93c..f5ddc0f 100644
--- a/test/netstd/Server/Server.csproj
+++ b/test/netstd/Server/Server.csproj
@@ -24,7 +24,7 @@
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
@@ -32,6 +32,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
</PropertyGroup>
+
<ItemGroup>
<PackageReference Include="System.IO.Pipes" Version="4.3.0" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="5.0.0" />
@@ -40,9 +41,11 @@
<PackageReference Include="System.ServiceModel.Primitives" Version="4.8.1" />
<PackageReference Include="System.Threading" Version="[4.3,)" />
</ItemGroup>
+
<ItemGroup>
<ProjectReference Include="..\..\..\lib\netstd\Thrift\Thrift.csproj" />
</ItemGroup>
+
<Target Name="PreBuild" BeforeTargets="_GenerateRestoreProjectSpec;Restore;Compile">
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
diff --git a/test/rs/Cargo.toml b/test/rs/Cargo.toml
index 8a85d7c..e17ff24 100644
--- a/test/rs/Cargo.toml
+++ b/test/rs/Cargo.toml
@@ -8,6 +8,7 @@
[dependencies]
clap = "2.33"
+bitflags = "=1.2"
env_logger = "0.8"
log = "0.4"
diff --git a/tutorial/cpp/CMakeLists.txt b/tutorial/cpp/CMakeLists.txt
index b250a2c..fc52bb1 100644
--- a/tutorial/cpp/CMakeLists.txt
+++ b/tutorial/cpp/CMakeLists.txt
@@ -35,7 +35,7 @@
gen-cpp/tutorial_types.cpp
)
add_library(tutorialgencpp STATIC ${tutorialgencpp_SOURCES})
-LINK_AGAINST_THRIFT_LIBRARY(tutorialgencpp thrift)
+target_link_libraries(tutorialgencpp thrift)
add_custom_command(OUTPUT gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp
COMMAND ${THRIFT_COMPILER} --gen cpp -r ${PROJECT_SOURCE_DIR}/tutorial/tutorial.thrift
@@ -43,14 +43,14 @@
add_executable(TutorialServer CppServer.cpp)
target_link_libraries(TutorialServer tutorialgencpp)
-LINK_AGAINST_THRIFT_LIBRARY(TutorialServer thrift)
+target_link_libraries(TutorialServer thrift)
if (ZLIB_FOUND)
target_link_libraries(TutorialServer ${ZLIB_LIBRARIES})
endif ()
add_executable(TutorialClient CppClient.cpp)
target_link_libraries(TutorialClient tutorialgencpp)
-LINK_AGAINST_THRIFT_LIBRARY(TutorialClient thrift)
+target_link_libraries(TutorialClient thrift)
if (ZLIB_FOUND)
target_link_libraries(TutorialClient ${ZLIB_LIBRARIES})
endif ()
diff --git a/tutorial/dart/client/pubspec.yaml b/tutorial/dart/client/pubspec.yaml
index bf36aed..465bd93 100644
--- a/tutorial/dart/client/pubspec.yaml
+++ b/tutorial/dart/client/pubspec.yaml
@@ -16,7 +16,7 @@
# under the License.
name: tutorial_client
-version: 0.15.0
+version: 0.16.0
description: A Dart client implementation of the Apache Thrift tutorial
author: Apache Thrift Developers <dev@thrift.apache.org>
homepage: http://thrift.apache.org
diff --git a/tutorial/dart/console_client/pubspec.yaml b/tutorial/dart/console_client/pubspec.yaml
index c662e89..9a8d202 100644
--- a/tutorial/dart/console_client/pubspec.yaml
+++ b/tutorial/dart/console_client/pubspec.yaml
@@ -16,7 +16,7 @@
# under the License.
name: tutorial_console_client
-version: 0.15.0
+version: 0.16.0
description: >
A Dart console client to implementation of the Apache Thrift tutorial
author: Apache Thrift Developers <dev@thrift.apache.org>
diff --git a/tutorial/dart/server/pubspec.yaml b/tutorial/dart/server/pubspec.yaml
index 81c482c..17c4220 100644
--- a/tutorial/dart/server/pubspec.yaml
+++ b/tutorial/dart/server/pubspec.yaml
@@ -16,7 +16,7 @@
# under the License.
name: tutorial_server
-version: 0.15.0
+version: 0.16.0
description: A Dart server to support the Apache Thrift tutorial
author: Apache Thrift Developers <dev@thrift.apache.org>
homepage: http://thrift.apache.org
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dproj b/tutorial/delphi/DelphiClient/DelphiClient.dproj
index 1e2ab3d..cc5170d 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dproj
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dproj
@@ -124,13 +124,13 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription">Thrift Tutorial</VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">0.15.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">0.16.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">DelphiClient</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright © 2012 The Apache Software Foundation</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename">DelphiClient.exe</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">Thrift</VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">0.15.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">0.16.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Source>
diff --git a/tutorial/delphi/DelphiServer/DelphiServer.dproj b/tutorial/delphi/DelphiServer/DelphiServer.dproj
index b1b7f48..82a2cee 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dproj
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dproj
@@ -121,13 +121,13 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription">Thrift Tutorial</VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">0.15.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">0.16.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">DelphiServer</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright © 2012 The Apache Software Foundation</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename">DelphiServer.exe</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">Thrift</VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">0.15.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">0.16.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Source>
diff --git a/tutorial/netstd/Client/Client.csproj b/tutorial/netstd/Client/Client.csproj
index e91b7a9..1f87751 100644
--- a/tutorial/netstd/Client/Client.csproj
+++ b/tutorial/netstd/Client/Client.csproj
@@ -24,7 +24,7 @@
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
@@ -39,5 +39,4 @@
<ProjectReference Include="..\Interfaces\Interfaces.csproj" />
<ProjectReference Include="..\..\..\lib\netstd\Thrift\Thrift.csproj" />
</ItemGroup>
-
</Project>
diff --git a/tutorial/netstd/Interfaces/Interfaces.csproj b/tutorial/netstd/Interfaces/Interfaces.csproj
index c2adc9e..989f6db 100644
--- a/tutorial/netstd/Interfaces/Interfaces.csproj
+++ b/tutorial/netstd/Interfaces/Interfaces.csproj
@@ -22,7 +22,7 @@
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Interfaces</AssemblyName>
<PackageId>Interfaces</PackageId>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
@@ -45,5 +45,4 @@
<Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netstd:wcf,union,serial -r ./../../tutorial.thrift" />
<Exec Condition="Exists('./../../../compiler/cpp/thrift')" Command="./../../../compiler/cpp/thrift -out $(ProjectDir) -gen netstd:wcf,union,serial -r ./../../tutorial.thrift" />
</Target>
-
</Project>
diff --git a/tutorial/netstd/Server/Server.csproj b/tutorial/netstd/Server/Server.csproj
index b63967b..e5e54a5 100644
--- a/tutorial/netstd/Server/Server.csproj
+++ b/tutorial/netstd/Server/Server.csproj
@@ -24,7 +24,7 @@
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>
- <Version>0.15.0.0</Version>
+ <Version>0.16.0.0</Version>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
@@ -42,5 +42,4 @@
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
</ItemGroup>
-
</Project>
diff --git a/tutorial/ocaml/_oasis b/tutorial/ocaml/_oasis
index 2e1773e..5a98ccd 100644
--- a/tutorial/ocaml/_oasis
+++ b/tutorial/ocaml/_oasis
@@ -1,5 +1,5 @@
Name: tutorial
-Version: 0.15.0
+Version: 0.16.0
OASISFormat: 0.3
Synopsis: OCaml Tutorial example
Authors: Apache Thrift Developers <dev@thrift.apache.org>
diff --git a/tutorial/rs/Cargo.toml b/tutorial/rs/Cargo.toml
index 5e21d51..78b44e4 100644
--- a/tutorial/rs/Cargo.toml
+++ b/tutorial/rs/Cargo.toml
@@ -9,6 +9,7 @@
[dependencies]
clap = "2.33"
+bitflags = "=1.2"
[dependencies.thrift]
path = "../../lib/rs"