From 0ad20bdbfe9abcbb0cc5332ff95651b5c975da91 Mon Sep 17 00:00:00 2001 From: "James E. King, III" Date: Sat, 30 Sep 2017 15:44:16 -0700 Subject: [PATCH] THRIFT-4351: use travis build stages to optimize build, avoiding duplicate rebuilds of the same image, and also allow personal docker hub repositories for private fork builds to be optimized. Move ubsan build to artful image because it catches more stuff and fix what was found. THRIFT-4345: solidify docker build strategy for maximum coverage: trusty, xenial, artful as stock as they can be THRIFT-4344: add top level language summary markdown and update readme with a new image on the layered architecture THRIFT-3847: remove VERSION macro from config.h which was causing a conflict on artful builds. THRIFT-4359: fix haxe map/set decode when key is binary, as a missing break statement caused it to use an int during decode This closes #1389 --- .gitignore | 1 + .travis.yml | 283 +++++++++------- Dockerfile | 61 ---- LANGUAGES.md | 305 ++++++++++++++++++ Makefile.am | 4 +- NOTICE | 4 +- README.md | 14 +- aclocal/ax_check_openssl.m4 | 6 +- ...mpare_version.m4 => ax_compare_version.m4} | 4 +- aclocal/ax_lua.m4 | 6 +- aclocal/ax_prog_dotnetcore_version.m4 | 8 +- aclocal/ax_prog_haxe_version.m4 | 4 +- aclocal/ax_prog_perl_modules.m4 | 4 +- bootstrap.sh | 3 + build/docker/README.md | 138 ++++---- build/docker/refresh.sh | 77 +++++ build/docker/{check_unmodified.sh => run.sh} | 24 +- build/docker/scripts/sca.sh | 48 +++ build/docker/scripts/ubsan.sh | 27 +- build/docker/ubuntu-artful/Dockerfile | 255 +++++++++++++++ build/docker/ubuntu-trusty/Dockerfile | 302 +++++++++-------- build/docker/ubuntu-trusty/Dockerfile.orig | 231 +++++++++++++ build/docker/ubuntu-xenial/Dockerfile | 43 ++- build/docker/vars.sh | 23 ++ compiler/cpp/Makefile.am | 2 +- .../src/thrift/generate/t_csharp_generator.cc | 1 + .../src/thrift/generate/t_haxe_generator.cc | 2 + .../cpp/src/thrift/generate/t_hs_generator.cc | 10 +- .../thrift/generate/t_netcore_generator.cc | 1 + compiler/cpp/src/thrift/parse/t_typedef.h | 7 +- configure.ac | 1 - doc/images/cgrn.png | Bin 0 -> 1125 bytes doc/images/cred.png | Bin 0 -> 1169 bytes doc/images/credfull.png | Bin 0 -> 1057 bytes doc/images/cyel.png | Bin 0 -> 946 bytes doc/images/thrift-layers.png | Bin 0 -> 27211 bytes lib/cpp/test/TMemoryBufferTest.cpp | 3 +- lib/cpp/test/concurrency/ThreadFactoryTests.h | 20 +- lib/d/src/thrift/base.d | 2 +- lib/go/test/Makefile.am | 4 +- lib/js/Makefile.am | 10 +- lib/nodejs/Makefile.am | 3 +- lib/py/setup.py | 1 + lib/py/src/ext/binary.h | 9 +- lib/py/src/ext/compact.h | 3 +- lib/py/src/ext/protocol.tcc | 2 +- lib/py/src/protocol/TCompactProtocol.py | 3 + lib/py/src/server/TNonblockingServer.py | 1 + lib/py/src/transport/sslcompat.py | 1 + lib/py/test/test_sslsocket.py | 1 + lib/py/test/thrift_json.py | 1 + test/features/string_limit.py | 1 + test/go/Makefile.am | 6 +- test/py/FastbinaryTest.py | 1 + test/py/SerializationTest.py | 1 + test/py/TestClient.py | 1 + test/py/TestEof.py | 1 + test/py/TestFrozen.py | 1 + test/py/TestServer.py | 1 + test/py/TestSocket.py | 1 + test/test.py | 1 + tutorial/hs/LICENSE | 239 ++++++++++++++ tutorial/hs/Makefile.am | 3 + tutorial/hs/ThriftTutorial.cabal | 2 +- tutorial/py/PythonClient.py | 1 + tutorial/py/PythonServer.py | 1 + 66 files changed, 1726 insertions(+), 498 deletions(-) delete mode 100644 Dockerfile create mode 100644 LANGUAGES.md rename aclocal/{m4_ax_compare_version.m4 => ax_compare_version.m4} (98%) create mode 100755 build/docker/refresh.sh rename build/docker/{check_unmodified.sh => run.sh} (60%) create mode 100755 build/docker/scripts/sca.sh create mode 100644 build/docker/ubuntu-artful/Dockerfile create mode 100644 build/docker/ubuntu-trusty/Dockerfile.orig create mode 100755 build/docker/vars.sh create mode 100644 doc/images/cgrn.png create mode 100644 doc/images/cred.png create mode 100644 doc/images/credfull.png create mode 100644 doc/images/cyel.png create mode 100644 doc/images/thrift-layers.png create mode 100644 tutorial/hs/LICENSE diff --git a/.gitignore b/.gitignore index faa1a5bf5e1..8f1879e6325 100644 --- a/.gitignore +++ b/.gitignore @@ -320,6 +320,7 @@ project.lock.json /test/haxe/bin /test/hs/TestClient /test/hs/TestServer +/test/php/php_ext_dir/ /test/py.twisted/_trial_temp/ /test/rb/Gemfile.lock /test/netcore/**/.vs diff --git a/.travis.yml b/.travis.yml index fcd334a9b49..0f9500c6ea5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,134 +19,193 @@ # build Apache Thrift on Travis CI - https://travis-ci.org/ +# +# Docker Integration +# +# DOCKER_REPO +# [required] The repository name (within your account). +# DOCKER_PASS +# [optional, secure] Your docker account password. +# If you do not set this, each build job in the "test" +# stage might rebuild the docker image and extend build +# time by about 10 minutes per job. If you do set this +# then each build job in the "docker" stage" will build +# the docker image if Dockerfile has changed, and then +# push the new tag up to your docker hub account. +# DOCKER_USER +# [required] Your docker hub account name. +# +# The resulting tag is: +# $DOCKER_USER/$DOCKER_REPO:$DISTRO +# example (and the default): +# apache/thrift:ubuntu-xenial +# + sudo: required dist: trusty +language: cpp services: - docker install: - - (travis_wait ./build/docker/check_unmodified.sh $DISTRO && touch .unmodified) || true - - if [ ! -f .unmodified ]; then travis_retry travis_wait docker build -q -t thrift-build:$DISTRO build/docker/$DISTRO; fi + - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi -script: - - docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src -it thrift-build:$DISTRO build/docker/scripts/$SCRIPT $BUILD_ARG +stages: +# - osx # up front for now (for testing) + - docker # docker images + - thrift # thrift build jobs env: global: - - TEST_NAME="" - SCRIPT="cmake.sh" - BUILD_ARG="" - BUILD_ENV="-e CC=clang -e CXX=clang++" - DISTRO=ubuntu-xenial - BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds + - TRAVIS_BUILD_STAGE=test + - DEFAULT_DOCKER_USER="apache" + - DEFAULT_DOCKER_REPO="thrift" - matrix: - - TEST_NAME="Cross Language Tests (Binary Protocol)" - SCRIPT="cross-test.sh" - BUILD_ARG="-'(binary)'" - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" - - - TEST_NAME="Cross Language Tests (Header, JSON Protocols)" - SCRIPT="cross-test.sh" - BUILD_ARG="-'(header|json)'" - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" - - - TEST_NAME="Cross Language Tests (Compact and Multiplexed Protocols)" - SCRIPT="cross-test.sh" - BUILD_ARG="-'(compact|multiplexed)'" - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" - - # Autotools builds - # TODO: Remove them once migrated to CMake - - - TEST_NAME="Autotools (Ubuntu Trusty)" - DISTRO=ubuntu-trusty - SCRIPT="autotools.sh" - BUILD_ENV="-e CC=gcc -e CXX=g++" - - - TEST_NAME="Autotools (Ubuntu Xenial)" - SCRIPT="autotools.sh" - BUILD_ENV="-e CC=gcc -e CXX=g++" - BUILD_ARG="--enable-plugin" - - # CMake builds - - - TEST_NAME="CMake (Ubuntu Trusty)" - DISTRO=ubuntu-trusty - - - TEST_NAME="CMake (Ubuntu Xenial)" - - # C++ specific options: compiler plug-in, threading model - - - TEST_NAME="C++98 (Boost Thread)" - BUILD_LIBS="CPP TESTING TUTORIALS" - BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF --DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" - - - TEST_NAME="C++ (Std Thread) and Plugin" - BUILD_LIBS="CPP TESTING TUTORIALS" - BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" - - # Distribution - - - TEST_NAME="make dist" - SCRIPT="make-dist.sh" - - - TEST_NAME="Debian Packages" - SCRIPT="dpkg.sh" - - # C and C++ undefined behavior. This wraps autotools.sh, but each binary crashes if - # undefined behavior occurs. Skips the known flaky tests. - - - TEST_NAME="UBSan" - SCRIPT="ubsan.sh" - BUILD_ARG="--without-haskell --without-nodejs --without-perl --without-python" - UNSTABLE=true - -matrix: - allow_failures: - - env: UNSTABLE=true +jobs: include: + # ------------------------- phase: osx -------------------------- + # - stage: osx + # os: osx + # osx_image: xcode9 + # script: build/docker/scripts/autotools.sh + + # ========================= stage: docker ========================= + - stage: docker + script: true + env: + - JOB="Docker Build ubuntu-trusty 14.04" + - DISTRO=ubuntu-trusty + - TRAVIS_BUILD_STAGE=docker + - script: true + env: + - JOB="Docker Build ubuntu-xenial 16.04" + - DISTRO=ubuntu-xenial + - TRAVIS_BUILD_STAGE=docker + - script: true + env: + - JOB="Docker Build ubuntu-artful 17.10" + - DISTRO=ubuntu-artful + - TRAVIS_BUILD_STAGE=docker + + # ========================= stage: thrift ======================= + # ------------------------- phase: cross ------------------------ + # apache/thrift official PR builds can exceed 50 minutes per job so combine all cross tests + - stage: thrift + script: build/docker/run.sh + if: repo = apache/thrift + env: + - JOB="Cross Language Tests" + - SCRIPT="cross-test.sh" + - BUILD_ARG="" + - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + # fork based PR builds cannot exceed 50 minutes per job + - stage: thrift + script: build/docker/run.sh + if: repo != apache/thrift + env: + - JOB="Cross Language Tests (Binary Protocol)" + - SCRIPT="cross-test.sh" + - BUILD_ARG="-'(binary)'" + - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + - stage: thrift + script: build/docker/run.sh + if: repo != apache/thrift + env: + - JOB="Cross Language Tests (Header, JSON Protocols)" + - SCRIPT="cross-test.sh" + - BUILD_ARG="-'(header|json)'" + - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + - stage: thrift + script: build/docker/run.sh + if: repo != apache/thrift + env: + - JOB="Cross Language Tests (Compact and Multiplexed Protocols)" + - SCRIPT="cross-test.sh" + - BUILD_ARG="-'(compact|multiplexed)'" + - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + # ------------------------- phase: sca -------------------------- # QA jobs for code analytics and metrics - # - # C/C++ static code analysis with cppcheck - # add --error-exitcode=1 to --enable=all as soon as everything is fixed - # - # Python code style check with flake8 - # - # search for TODO etc within source tree - # some statistics about the code base - # some info about the build machine - - env: TEST_NAME="cppcheck, flake8, TODO FIXME HACK, LoC and system info" - install: - - travis_retry sudo apt-get update - - travis_retry sudo apt-get install -ym cppcheck sloccount python-flake8 - script: - # Compiler cppcheck (All) - - cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src - # C++ cppcheck (All) - - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp - # C Glib cppcheck (All) - - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib - # Silent error checks - - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src - - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp - - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib - # Python code style - - flake8 --ignore=E501 lib/py - - flake8 tutorial/py - - flake8 --ignore=E501 test/py - - flake8 test/py.twisted - - flake8 test/py.tornado - - flake8 --ignore=E501 test/test.py - - flake8 --ignore=E501 test/crossrunner - - flake8 test/features - # TODO etc - - grep -r TODO * - - grep -r FIXME * - - grep -r HACK * - # LoC - - sloccount . - # System Info - - dpkg -l - - uname -a + - stage: thrift + script: build/docker/run.sh + env: + - JOB="Static Code Analysis" + - SCRIPT="sca.sh" + - DISTRO=ubuntu-artful + + # C and C++ undefined behavior. + # A binary crashes if undefined behavior occurs and produces a stack trace. + # python is disabled, see: THRIFT-4360 + - script: build/docker/run.sh + env: + - JOB="UBSan" + - SCRIPT="ubsan.sh" + - DISTRO=ubuntu-artful + - BUILD_ARG="--without-python --without-py3" + + # ------------------------- phase: cmake ------------------------ + - script: build/docker/run.sh + env: + - JOB="CMake (Ubuntu Xenial)" + + # C++ specific options: compiler plug-in, threading model + - script: build/docker/run.sh + env: + - JOB="C++98 (Boost Thread)" + - SCRIPT="cmake.sh" + - BUILD_LIBS="CPP TESTING TUTORIALS" + - BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF --DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + - BUILD_ENV="" + + - script: build/docker/run.sh + env: + - JOB="C++ (Std Thread) and Plugin" + - SCRIPT="cmake.sh" + - BUILD_LIBS="CPP TESTING TUTORIALS" + - BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + - BUILD_ENV="-e CC=clang -e CXX=clang++" + + # ------------------------- phase: autotools -------------------- + # TODO: Remove them once migrated to CMake + - script: build/docker/run.sh + env: + - JOB="Autotools (Ubuntu Artful)" + - DISTRO=ubuntu-artful + - SCRIPT="autotools.sh" + - BUILD_ENV="-e CC=gcc -e CXX=g++" + + - script: build/docker/run.sh + env: + - JOB="Autotools (Ubuntu Xenial)" + - DISTRO=ubuntu-xenial + - SCRIPT="autotools.sh" + - BUILD_ENV="-e CC=gcc -e CXX=g++" + + - script: build/docker/run.sh + env: + - JOB="Autotools (Ubuntu Trusty)" + - DISTRO=ubuntu-trusty + - SCRIPT="autotools.sh" + - BUILD_ENV="-e CC=gcc -e CXX=g++" + + # ------------------------- phase: dist ------------------------- + - script: build/docker/run.sh + env: + - JOB="make dist" + - SCRIPT="make-dist.sh" + - BUILD_ENV="-e CC=gcc -e CXX=g++" + + - script: build/docker/run.sh + env: + - JOB="Debian Packages" + - SCRIPT="dpkg.sh" + - BUILD_ENV="-e CC=gcc -e CXX=g++" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 0d7ad2175e3..00000000000 --- a/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Goal: provide a thrift-compiler Docker image -# -# Usage: -# docker run -v "${PWD}:/data" thrift/thrift-compiler -gen cpp -o /data/ /data/test/ThriftTest.thrift -# -# further details on docker for thrift is here build/docker/ -# -# TODO: push to apache/thrift-compiler instead of thrift/thrift-compiler - -FROM debian:jessie -MAINTAINER Apache Thrift - -ENV DEBIAN_FRONTEND noninteractive - -ADD . /thrift - -RUN buildDeps=" \ - flex \ - bison \ - g++ \ - make \ - cmake \ - curl \ - "; \ - apt-get update && apt-get install -y --no-install-recommends $buildDeps \ - && mkdir /tmp/cmake-build && cd /tmp/cmake-build \ - && cmake \ - -DBUILD_COMPILER=ON \ - -DBUILD_LIBRARIES=OFF \ - -DBUILD_TESTING=OFF \ - -DBUILD_EXAMPLES=OFF \ - /thrift \ - && cmake --build . --config Release \ - && make install \ - && curl -k -sSL "https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz" -o /tmp/go.tar.gz \ - && tar xzf /tmp/go.tar.gz -C /tmp \ - && cp /tmp/go/bin/gofmt /usr/bin/gofmt \ - && apt-get purge -y --auto-remove $buildDeps \ - && apt-get clean \ - && rm -rf /tmp/* \ - && rm -rf /var/lib/apt/lists/* - -ENTRYPOINT ["thrift"] diff --git a/LANGUAGES.md b/LANGUAGES.md new file mode 100644 index 00000000000..e34cce31fed --- /dev/null +++ b/LANGUAGES.md @@ -0,0 +1,305 @@ +# Apache Thrift Language Support # + +Last Modified: 2017-10-05
+Version: 0.10.0+ + +Thrift supports many programming languages and has an impressive test suite that exercises most of the languages, protocols, and transports that represents a matrix of thousands of possible combinations. Each language typically has a minimum required version as well as support libraries - some mandatory and some optional. All of this information is provided below to help you assess whether you can use Apache Thrift with your project. Obviously this is a complex matrix to maintain and may not be correct in all cases - if you spot an error please inform the developers using the mailing list. + +Apache Thrift has a choice of two build systems. The `autoconf` build system is the most complete build and is used to build all supported languages. The `cmake` build system has been designated by the project to replace `autoconf` however this transition will take quite some time to complete. + +The Language/Library Levels indicate the minimum and maximum versions that are used in the [continuous integration environments](build/docker/README.md) (Appveyor, Travis) for Apache Thrift. Note that while a language may contain support for protocols, transports, and servers, the extent to which each is tested as part of the overall build process varies. The definitive integration test for the project is called the "cross" test which executes a test matrix with clients and servers communicating across languages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LanguageBuild SystemsLang/Lib LevelsLow-Level TransportsTransport WrappersProtocolsServersOpen Issues
autoconfcmakeMinMaxDomain File Memory Pipe Socket TLS Framed http  zlib BinaryCompact JSON MultiplexForkingNonblockingSimpleThreadedThreadPool
ActionScriptNoNoActionScript 3NoNoNoNoYesNoNoYesNoYesNoNoNoNoNoNoNoNoActionScript
C (glib)YesYes2.40.22.54.0NoYesYesNoYesYesYesNoNoYesYesNoYesNoNoYesNoNoC (glib)
C++YesYesC++98, gcc YesYesYesYesYesYesYesYesYesYesYesYesYesNoYesYesYesYesC++
C#YesNo.NET 3.5 / mono 3.2.8.0.NET 4.6.1 / mono 4.6.2.7NoNoYesYesYesYesYesYesNoYesYesYesYesNoNoYesYesYesC# (.NET)
CocoaNoNounknownNoYesYesNoYesYesYesYesNoYesYesNoYesNoNoNoNoYesCocoa
DYesNo2.070.22.076.0NoYesYesYesYesYesYesYesYesYesYesYesNoNoYesYesYesYesD
DartYesNo1.20.11.24.2NoNoNoNoYesNoYesYesNoYesYesYesYesNoNoNoNoNoDart
DelphiNoNo2010unknownNoNoNoNoYesNoYesYesNoYesYesYesYesNoNoYesNoNoDelphi
.NET CoreNoNo2.0.0NoNoYesYesYesYesYesYesNoYesYesYesYesNoYesNoNoNo.NET Core
ErlangYesNoR16B0320.0.4NoYesYesNoYesYesYesYesNoYesYesYesYesNoNoYesNoNoErlang
GoYesNo1.2.11.8.3NoNoYesNoYesYesYesYesYesYesYesYesYesNoNoYesNoNoGo
HaskellYesYes7.6.38.0.2NoYesYesNoYesYesYesYesNoYesYesYesNoNoNoYesYesNoHaskell
HaxeYesNo3.2.1NoYesNoNoYesNoYesYesNoYesYesYesYesNoNoYesNoNoHaxe
Java (SE)YesYes1.7.0_1511.8.0_144NoYesYesNoYesYesYesYesYesYesYesYesYesNoYesYesYesYesJava SE
Java (ME)NoNounknownNoNoYesNoYesYesNoYesNoYesNoYesNoNoNoNoNoNoJava ME
JavascriptYesNounknownNoNoNoNoYesYesNoYesNoNoNoYesYesNoNoNoNoNoJavascript
LuaYesNo5.1.55.3.3NoNoYesNoYesNoYesYesNoYesYesYesNoNoNoYesNoNoLua
node.jsYesNo4.2.66.11.2NoNoNoNoYesYesYesYesNoYesYesYesYesNoNoYesNoNonode.js
OCamlNoNo4.02.34.04.0NoNoNoNoYesNoYesNoNoYesNoNoNoNoNoYesYesNoOCaml
PerlYesNo5.18.25.26.0YesNoYesNoYesYesYesYesNoYesNoYesYesYesNoYesNoNoPerl
PHPYesNo5.5.97.1.8NoNoYesNoYesYesYesYesNoYesYesYesYesYesNoYesNoNoPHP
PythonYesYes2.7.6, 3.4.32.7.14, 3.6.3NoNoNoNoYesYesNoYesYesYesYesYesYesYesYesYesNoNoPython
RubyYesNo1.9.3p4842.3.3p222YesNoYesNoYesYesYesYesNoYesYesYesYesNoYesYesYesYesRuby
RustYesNo1.15.11.18.0NoNoYesNoYesNoYesNoNoYesYesNoYesNoNoNoYesNoRust
SmalltalkNoNounknownNoNoNoNoYesNoNoNoNoYesNoNoNoNoNoNoNoNoSmalltalk
LanguageautoconfcmakeMinMaxDomain File Memory Pipe Socket TLS Framed http  zlib BinaryCompact JSON MultiplexForkingNonblockingSimpleThreadedThreadPoolOpen Issues
Build SystemsLang/Lib LevelsLow-Level TransportsTransport WrappersProtocolsServers
diff --git a/Makefile.am b/Makefile.am index 6d4764210d0..4b3157c9082 100755 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,7 @@ dist-hook: find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf print-version: - @echo $(VERSION) + @echo $(PACKAGE_VERSION) .PHONY: precross cross precross-%: all @@ -123,7 +123,7 @@ EXTRA_DIST = \ doap.rdf \ package.json \ sonar-project.properties \ - Dockerfile \ + LANGUAGES.md \ LICENSE \ CHANGES \ NOTICE \ diff --git a/NOTICE b/NOTICE index c23995a2315..902dc8d3140 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache Thrift -Copyright 2006-2010 The Apache Software Foundation. +Copyright 2006-2017 The Apache Software Foundation. This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file +The Apache Software Foundation (http://www.apache.org/). diff --git a/README.md b/README.md index a55389a02b5..80d77efaf0a 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,22 @@ level processing. The code generation system takes a simple definition language as its input and generates code across programming languages that uses the abstracted stack to build interoperable RPC clients and servers. +![Apache Thrift Layered Architecture](doc/images/thrift-layers.png) + +Thrift makes it easy for programs written in different programming +languages to share data and call remote procedures. With support +for [over 20 programming languages](LANGUAGES.md), chances are Thrift +supports the ones that you currently use. + Thrift is specifically designed to support non-atomic version changes across client and server code. For more details on Thrift's design and implementation, take a gander at -the Thrift whitepaper included in this distribution or at the README.md files +the Thrift whitepaper included in this distribution or at the README.md file in your particular subdirectory of interest. -Hierarchy -========= +Project Hierarchy +================= thrift/ @@ -60,6 +67,7 @@ thrift/ php/ py/ rb/ + ... test/ diff --git a/aclocal/ax_check_openssl.m4 b/aclocal/ax_check_openssl.m4 index a87c5a6b6f9..28e48cbefb6 100644 --- a/aclocal/ax_check_openssl.m4 +++ b/aclocal/ax_check_openssl.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html +# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html # =========================================================================== # # SYNOPSIS @@ -32,7 +32,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 10 AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL]) AC_DEFUN([AX_CHECK_OPENSSL], [ @@ -51,7 +51,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ ], [ # if pkg-config is installed and openssl has installed a .pc file, # then use that information and don't search ssldirs - AC_PATH_PROG([PKG_CONFIG], [pkg-config]) + AC_CHECK_TOOL([PKG_CONFIG], [pkg-config]) if test x"$PKG_CONFIG" != x""; then OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` if test $? = 0; then diff --git a/aclocal/m4_ax_compare_version.m4 b/aclocal/ax_compare_version.m4 similarity index 98% rename from aclocal/m4_ax_compare_version.m4 rename to aclocal/ax_compare_version.m4 index 74dc0fdd9a4..9c8e208ab70 100644 --- a/aclocal/m4_ax_compare_version.m4 +++ b/aclocal/ax_compare_version.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html +# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html # =========================================================================== # # SYNOPSIS @@ -79,7 +79,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 11 +#serial 12 dnl ######################################################################### AC_DEFUN([AX_COMPARE_VERSION], [ diff --git a/aclocal/ax_lua.m4 b/aclocal/ax_lua.m4 index 9feb352255b..59201671436 100644 --- a/aclocal/ax_lua.m4 +++ b/aclocal/ax_lua.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_lua.html +# https://www.gnu.org/software/autoconf-archive/ax_lua.html # =========================================================================== # # SYNOPSIS @@ -166,7 +166,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -181,7 +181,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 39 +#serial 40 dnl ========================================================================= dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION], diff --git a/aclocal/ax_prog_dotnetcore_version.m4 b/aclocal/ax_prog_dotnetcore_version.m4 index 45c7a4e1ab5..92c749520b6 100644 --- a/aclocal/ax_prog_dotnetcore_version.m4 +++ b/aclocal/ax_prog_dotnetcore_version.m4 @@ -1,6 +1,6 @@ -# ============================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_prog_dotnetcore_version.html -# ============================================================================== +# =============================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_prog_dotnetcore_version.html +# =============================================================================== # # SYNOPSIS # @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 1 +#serial 2 AC_DEFUN([AX_PROG_DOTNETCORE_VERSION],[ AC_REQUIRE([AC_PROG_SED]) diff --git a/aclocal/ax_prog_haxe_version.m4 b/aclocal/ax_prog_haxe_version.m4 index 3dee43027c5..fcacc670734 100644 --- a/aclocal/ax_prog_haxe_version.m4 +++ b/aclocal/ax_prog_haxe_version.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_prog_haxe_version.html +# https://www.gnu.org/software/autoconf-archive/ax_prog_haxe_version.html # =========================================================================== # # SYNOPSIS @@ -32,7 +32,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 1 +#serial 2 AC_DEFUN([AX_PROG_HAXE_VERSION],[ AC_REQUIRE([AC_PROG_SED]) diff --git a/aclocal/ax_prog_perl_modules.m4 b/aclocal/ax_prog_perl_modules.m4 index 11a326c930c..70b3230ebdd 100644 --- a/aclocal/ax_prog_perl_modules.m4 +++ b/aclocal/ax_prog_perl_modules.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html +# https://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html # =========================================================================== # # SYNOPSIS @@ -32,7 +32,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 8 AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES]) AC_DEFUN([AX_PROG_PERL_MODULES],[dnl diff --git a/bootstrap.sh b/bootstrap.sh index 52ecda47b3a..c7e000c49f7 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -46,9 +46,12 @@ if [ "$AUTOMAKE_VERSION" \< "1.13" ]; then exit 1 fi +set -e autoscan $LIBTOOLIZE --copy --automake aclocal -I ./aclocal autoheader +sed '/undef VERSION/d' config.hin > config.hin2 +mv config.hin2 config.hin autoconf automake --copy --add-missing --foreign diff --git a/build/docker/README.md b/build/docker/README.md index 2de7d68304d..81a4935d374 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -1,15 +1,40 @@ -# Apache Thrift Docker containers +# Docker Integration # -Docker containers used to build and test Apache Thrift for a variety of platforms. +Due to the large number of language requirements to build Apache Thrift, docker containers are used to build and test the project on a variety of platforms to provide maximum test coverage. -## Available Containers +## Travis CI Integration ## -The Travis CI (continuous integration) builds use the Ubuntu Trusty and Xenial images to maximize -language level coverage. The other images may or may not work for all languages. +The Travis CI scripts use the following environment variables and logic to determine their behavior. + +### Environment Variables ### + +| Variable | Default | Usage | +| -------- | ----- | ------- | +| `DISTRO` | `ubuntu-xenial` | Set by various build jobs in `.travis.yml` to run builds in different containers. Not intended to be set externally.| +| `DOCKER_REPO` | `thrift` | The name of the Docker Hub repository to obtain and store docker images. | +| `DOCKER_USER` | `apache` | The Docker Hub account name containing the repository. | +| `DOCKER_PASS` | `` | The Docker Hub account password to use when pushing new tags. | + +For example, the default docker image that is used in builds if no overrides are specified would be: `apache/thrift:ubuntu-xenial` + +If you have forked the Apache Thrift repository and you would like to use your own Docker Hub account to store thrift build images, you can use the Travis CI web interface to set the `DOCKER_USER`, `DOCKER_PASS`, and `DOCKER_REPO` variables in a secure manner. + +### Logic ### + +The Travis CI build runs in two phases - first the docker images are rebuilt for each of the three supported containers if they do not match the Dockerfile that was used to build the most recent tag. If a `DOCKER_PASS` environment variable is specified, the docker stage builds will attempt to log into Docker Hub and push the resulting tags. + +## Supported Containers ## + +The Travis CI (continuous integration) builds use the Ubuntu Trusty, Xenial, and Artful images to maximize language level coverage. ### Ubuntu -* trusty -* xenial (current) +* trusty (legacy) +* xenial (stable) +* artful (latest) + +## Unsupported Containers + +These containers may be in various states, and may not build everything. ### CentOS * 7.3 @@ -20,9 +45,6 @@ language level coverage. The other images may or may not work for all languages * stretch * make check in lib/cpp fails due to https://svn.boost.org/trac10/ticket/12507 -## Dependencies -* A working Docker environment. A Vagrantfile is provided which will setup an Ubuntu host and working Docker environment as well as build the Apache Thrift Docker container for testing and development. - ## Usage From the Apache Thrift code base root: @@ -30,58 +52,56 @@ From the Apache Thrift code base root: docker build -t thrift build/docker/ubuntu-xenial - or - - docker build -t thrift build/docker/centos-7.3 - * Run docker run -v $(pwd):/thrift/src -it thrift /bin/bash ## Core Tool Versions per Dockerfile -| Tool | centos-7.3 | debian-stretch | ubuntu-trusty | ubuntu-xenial | Notes | -| :-------- | :--------- | :------------- | :------------ | :------------ | :---- | -| ant | 1.9.2 | 1.9.9 | 1.9.3 | 1.9.6 | | -| autoconf | 2.69 | 2.69 | 2.69 | 2.69 | | -| automake | 1.13.4 | 1.15 | 1.14.1 | 1.15 | | -| bison | 2.7 | 3.0.4 | 3.0.2 | 3.0.4 | | -| boost | 1.53.0 | 1.62.0 | 1.54.0 | 1.58.0 | | -| cmake | 3.6.3 | 3.7.2 | 3.2.2 | 3.5.1 | | -| flex | 2.5.37 | 2.6.1 | 2.5.35 | 2.6.0 | | -| glibc | 2.17 | 2.24 | 2.19 | 2.23 | | -| libevent | 2.0.21 | 2.0.21 | 2.0.21 | 2.0.21 | | -| libstdc++ | 4.8.5 | 6.3.0 | 4.8.4 | 5.4.0 | | -| make | 3.82 | 4.1 | 3.81 | 4.1 | | -| openssl | 1.0.1e | 1.1.0f | 1.0.1f | 1.0.2g | | - -## Language Versions per Dockerfile -| Language | centos-7.3 | debian-stretch | ubuntu-trusty | ubuntu-xenial | Notes | -| :-------- | :--------- | :------------- | :------------ | :------------ | :---- | -| as3 | | | | | Not in CI | -| C++-gcc | 4.8.5 | 6.3.0 | 4.8.4 | 5.4.0 | | -| C++-clang | 3.4.2 | 3.8.1 | 3.4 | 3.8 | | -| C# (mono) | 4.6.2 | 4.6.2.7 | 5.2.0.224 | 5.2.0.215 | | -| c_glib | 2.46.2 | 2.50.3 | 2.40.2 | 2.48.2 | | -| cocoa | | | | | Not in CI | -| d | 2.076.0 | 2.076.0 | 2.070.0 | 2.075.1 | | -| dart | 1.24.2 | 1.24.2 | 1.24.2 | 1.24.2 | | -| delphi | | | | | Not in CI | -| dotnet | | | | | Not in CI | -| erlang | 20 | 19.2 | 20 | 18.3 | | -| go | 1.9 | 1.7.4 | 1.4.3 | 1.6.2 | | -| haskell | 7.6.3 | 8.0.1 | 7.6.3 | 7.10.3 | | -| haxe | | 3.2.1 | 3.2.1 | 3.2.1 | | -| java | 1.8.0_141 | 1.8.0_141 | 1.7.0_151 | 1.8.0_131 | | -| js | | | | | Unsure how to look for version info | -| lua | 5.3.4 | 5.2.4 | 5.2.3 | 5.2.4 | | -| nodejs | 6.11.1 | 8.4.0 | 4.8.4 | 7.10.1 | Node 8.5 broke copyFile and jsdoc | -| ocaml | 4.01.0 | 4.02.3 | 4.02.3 | 4.02.3 | | -| perl | 5.16.3 | 5.24.1 | 5.18.2 | 5.22.1 | | -| php | 5.4.16 | 7.0.19 | 5.5.9 | 7.0.22 | | -| python | 2.7.5 | 2.7.13 | 2.7.6 | 2.7.12 | | -| python3 | 3.4.5 | 3.5.3 | 3.4.3 | 3.5.2 | | -| ruby | 2.0.0p648 | 2.3.3p222 | 1.9.3p484 | 2.3.1p112 | | -| rust | 1.17.0 | 1.14.0 | 1.17.0 | 1.15.1 | Rust is too old on stretch | -| smalltalk | | | | | Not in CI | -| swift | | | | | Not in CI | +| Tool | ubuntu-trusty | ubuntu-xenial | ubuntu-artful | Notes | +| :-------- | :------------ | :------------ | :------------ | :---- | +| ant | 1.9.3 | 1.9.6 | 1.9.9 | | +| autoconf | 2.69 | 2.69 | 2.69 | | +| automake | 1.14.1 | 1.15 | 1.15 | | +| bison | 3.0.2 | 3.0.4 | 3.0.4 | | +| boost | 1.54.0 | 1.58.0 | 1.63.0 | artful: stock boost 1.62.0 has problems running unit tests | +| cmake | 3.2.2 | 3.5.1 | 3.9.1 | | +| cppcheck | 1.61 | 1.72 | 1.80 | | +| flex | 2.5.35 | 2.6.0 | 2.6.1 | | +| glibc | 2.19 | 2.23 | 2.26 | | +| libevent | 2.0.21 | 2.0.21 | 2.1 | | +| libstdc++ | 4.8.4 | 5.4.0 | 7.2.0 | | +| make | 3.81 | 4.1 | 4.1 | | +| openssl | 1.0.1f | 1.0.2g | 1.0.2g | | +| qt5 | 5.2.1 | 5.5.1 | 5.9.1 | | + +## Compiler/Language Versions per Dockerfile +| Language | ubuntu-trusty | ubuntu-xenial | ubuntu-artful | Notes | +| :-------- | :------------ | :------------ | :------------ | :---- | +| as3 | | | | Not in CI | +| C++ gcc | 4.8.4 | 5.4.0 | 7.2.0 | | +| C++ clang | 3.4 | 3.8 | 4.0 | | +| C# (mono) | 3.2.8.0 | 4.2.1 | 4.6.2.7 | | +| c_glib | 2.40.2 | 2.48.2 | 2.54.0 | | +| cocoa | | | | Not in CI | +| d | 2.070.2 | 2.073.2 | 2.076.0 | | +| dart | 1.20.1 | 1.24.2 | | artful: apt repo not compatible with apt 1.4? | +| delphi | | | | Not in CI | +| dotnet | | 2.0.0 | | Needs to be added to artful | +| erlang | R16B03 | 18.3 | 20.0.4 | | +| go | 1.2.1 | 1.6.2 | 1.8.3 | | +| haskell | 7.6.3 | 7.10.3 | 8.0.2 | | +| haxe | | 3.2.1 | 3.4.2 | disabled in trusty builds - cores on install v3.0.0, disabled in artful builds - see THRIFT-4352 | +| java | 1.7.0_151 | 1.8.0_131 | 1.8.0_144 | | +| js | | | | Unsure how to look for version info? | +| lua | 5.1.5 | 5.2.4 | 5.3.3 | | +| nodejs | | 4.2.6 | 6.11.2 | trusty has node.js 0.10.0 which is too old | +| ocaml | | 4.02.3 | 4.04.0 | | +| perl | 5.18.2 | 5.22.1 | 5.26.0 | | +| php | 5.5.9 | 7.0.22 | 7.1.8 | | +| python | 2.7.6 | 2.7.12 | 2.7.14 | | +| python3 | 3.4.3 | 3.5.2 | 3.6.3 | | +| ruby | 1.9.3p484 | 2.3.1p112 | 2.3.3p222 | | +| rust | 1.15.1 | 1.15.1 | 1.18.0 | | +| smalltalk | | | | Not in CI | +| swift | | | | Not in CI | diff --git a/build/docker/refresh.sh b/build/docker/refresh.sh new file mode 100755 index 00000000000..20a443b351b --- /dev/null +++ b/build/docker/refresh.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# +# The build has two stages: "docker" and "test" +# The "docker" stage is meant to rebuild the docker images +# if needed. If we cannot push that result however then +# there is no reason to do anything. +# The "test" stage is an actual test job. Even if the docker +# image doesn't match what's in the repo, we still build +# the image so the build job can run properly. +# + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. $SCRIPT_DIR/vars.sh + +function dockerfile_changed { + # image may not exist yet, so we have to let it fail silently: + docker pull $DOCKER_TAG || true + docker run $DOCKER_TAG bash -c 'cd .. && sha512sum Dockerfile' > .Dockerfile.sha512 + sha512sum -c .Dockerfile.sha512 +} + +# +# If this build has no DOCKER_PASS and it is in the docker stage +# then there's no reason to do any processing because we cannot +# push the result if the Dockerfile changed. +# + +if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ -z "$DOCKER_PASS" ]]; then + echo Detected docker stage build and no defined DOCKER_PASS, this build job will be skipped. + echo Subsequent jobs in the test stage may each rebuild the docker image. + exit 0 +fi + + +pushd ${SCRIPT_DIR}/$DISTRO +if dockerfile_changed; then + echo Dockerfile has not changed. No need to rebuild. + exit 0 +else + echo Dockerfile has changed. +fi +popd + +# +# Dockerfile has changed +# + +echo Rebuilding docker image $DISTRO +docker build --tag $DOCKER_TAG build/docker/$DISTRO + +if [[ ! -z "$DOCKER_PASS" ]]; then + echo Pushing docker image $DOCKER_TAG + docker login -u $DOCKER_USER -p $DOCKER_PASS + docker push $DOCKER_TAG +fi + diff --git a/build/docker/check_unmodified.sh b/build/docker/run.sh similarity index 60% rename from build/docker/check_unmodified.sh rename to build/docker/run.sh index 9d5fa267266..b54924bc924 100755 --- a/build/docker/check_unmodified.sh +++ b/build/docker/run.sh @@ -18,25 +18,13 @@ # under the License. # -# Download prebuilt docker image and compare Dockerfile hash values - -set -ex +set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -DISTRO=$1 -SRC_IMG=thrift/thrift-build:$DISTRO +. $SCRIPT_DIR/vars.sh + +printenv | sort -function try_pull { - docker pull $SRC_IMG - cd ${SCRIPT_DIR}/$DISTRO - docker run $SRC_IMG bash -c 'cd .. && sha512sum Dockerfile' > .Dockerfile.sha512 - sha512sum -c .Dockerfile.sha512 -} +docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src \ + -it $DOCKER_TAG build/docker/scripts/$SCRIPT $BUILD_ARG -if try_pull; then - echo Dockerfile seems identical. No need to rebuild from scratch. - docker tag thrift/thrift-build:$DISTRO thrift-build:$DISTRO -else - echo Either Dockerfile has changed or pull failure. Need to build brand new one. - exit 1 -fi diff --git a/build/docker/scripts/sca.sh b/build/docker/scripts/sca.sh new file mode 100755 index 00000000000..2f2fb684e60 --- /dev/null +++ b/build/docker/scripts/sca.sh @@ -0,0 +1,48 @@ +#!/bin/sh +set -ev + +# +# C/C++ static code analysis with cppcheck +# add --error-exitcode=1 to --enable=all as soon as everything is fixed +# +# Python code style check with flake8 +# +# search for TODO etc within source tree +# some statistics about the code base +# some info about the build machine + +# Compiler cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src + +# C++ cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp + +# C Glib cppcheck (All) +cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + +# Silent error checks +cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src +cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp +cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + +# Python code style +flake8 --ignore=E501 lib/py +flake8 tutorial/py +flake8 --ignore=E501 test/py +flake8 test/py.twisted +flake8 test/py.tornado +flake8 --ignore=E501 test/test.py +flake8 --ignore=E501 test/crossrunner +flake8 test/features + +# TODO etc +echo FIXMEs: `grep -r FIXME * | wc -l` +echo HACKs: `grep -r HACK * | wc -l` +echo TODOs: `grep -r TODO * | wc -l` + +# LoC +sloccount . + +# System Info +dpkg -l +uname -a diff --git a/build/docker/scripts/ubsan.sh b/build/docker/scripts/ubsan.sh index e1e82c9c5aa..650dba0a667 100755 --- a/build/docker/scripts/ubsan.sh +++ b/build/docker/scripts/ubsan.sh @@ -1,27 +1,28 @@ #!/bin/sh -set -ex - -# Wraps autotools.sh, but each binary crashes if it exhibits undefined behavior. See -# http://releases.llvm.org/3.8.0/tools/clang/docs/UndefinedBehaviorSanitizer.html +set -e +# Wraps autotools.sh, but each binary crashes if it exhibits undefined behavior. # Set the undefined behavior flags. This crashes on all undefined behavior except for # undefined casting, aka "vptr". -# # TODO: fix undefined vptr behavior and turn this option back on. -export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined" -# Builds without optimization and with debugging symbols for making crash reports more -# readable. -export CFLAGS="${CFLAGS} -O0 -ggdb3" + +export CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -O0 -ggdb3 -fno-omit-frame-pointer" export CXXFLAGS="${CFLAGS}" +export LDFLAGS="-lubsan" export UBSAN_OPTIONS=print_stacktrace=1 -# llvm-symbolizer must be on PATH, but the above installation instals a binary called -# "llvm-symbolizer-3.8", not "llvm-symbolizer". This fixes that with a softlink in a new -# directory. +# +# work around https://svn.boost.org/trac10/ticket/11632 if present +# + +sed -i 's/, stream_t(rdbuf()) /, stream_t(pbase_type::member.get())/g' /usr/include/boost/format/alt_sstream.hpp + +# llvm-symbolizer must be on PATH to get a stack trace on error + CLANG_PATH="$(mktemp -d)" trap "rm -rf ${CLANG_PATH}" EXIT -ln -s "$(whereis llvm-symbolizer-3.8 | rev | cut -d ' ' -f 1 | rev)" \ +ln -s "$(whereis llvm-symbolizer-4.0 | rev | cut -d ' ' -f 1 | rev)" \ "${CLANG_PATH}/llvm-symbolizer" export PATH="${CLANG_PATH}:${PATH}" llvm-symbolizer -version diff --git a/build/docker/ubuntu-artful/Dockerfile b/build/docker/ubuntu-artful/Dockerfile new file mode 100644 index 00000000000..1c8f9633e17 --- /dev/null +++ b/build/docker/ubuntu-artful/Dockerfile @@ -0,0 +1,255 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# Apache Thrift Docker build environment for Ubuntu Artful +# Using all stock Ubuntu Artful packaging except for: +# - cpp: stock boost 1.62 in artful has a nasty bug so we use stock boost 1.63 +# - d: does not come with Ubuntu so we're installing the latest +# - d: deimos for libevent and openssl omitted - not compatible / build errors +# - dart: dart repository doesn't work with apt 1.4 in artful +# - dotnetcore, because netcore is for 1.0.0-preview and 2.0.0 is out +# - haxe: see THRIFT-4352, but test/haxe cores during testing +# and hxcpp 3.4.64 is not compatible with artful +# + +FROM buildpack-deps:artful-scm +MAINTAINER Apache Thrift +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && \ + apt-get dist-upgrade -y && \ + apt-get install -y --no-install-recommends \ + apt \ + apt-transport-https \ + apt-utils \ + curl \ + dirmngr \ + software-properties-common \ + wget + +# csharp (mono) - if we ever want a later version +# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \ +# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF + +# dotnet (core) 2.0.0 - project isn't ready for this yet: +# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ +# echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list + +# node.js (this step runs apt-get update internally) - if we ever want a later version +# note: node 8.5 introduced some issues with directory handling / jsdoc / something... using 7.x for now +# RUN curl -sL https://deb.nodesource.com/setup_7.x | bash + +### install general dependencies +RUN apt-get install -y --no-install-recommends \ +`# General dependencies` \ + bash-completion \ + bison \ + build-essential \ + clang \ + cmake \ + debhelper \ + flex \ + gdb \ + llvm \ + ninja-build \ + pkg-config \ + valgrind \ + vim +ENV PATH /usr/lib/llvm-3.8/bin:$PATH + +# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507 +RUN apt-get install -y --no-install-recommends \ +`# C++ dependencies` \ + libboost1.63-all-dev \ + libevent-dev \ + libssl-dev \ + qt5-default \ + qtbase5-dev \ + qtbase5-dev-tools + +RUN apt-get install -y --no-install-recommends \ +`# csharp (mono) dependencies` \ + mono-devel + +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \ + wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \ + wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + `# D dependencies` \ + dmd-bin \ + libphobos2-dev \ + dub \ + dfmt \ + dscanner \ + libevent-dev \ + libssl-dev \ + xdg-utils +# libevent deimos doesn't seem to work so not enabling it: +# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ +# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ +# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ +# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ +# rm -rf libevent-master +# openssl deimos doesn't work with openssl-1.0.2 so not enabling it: +# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ +# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ +# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ +# rm -rf openssl-master + +# dart is disabled because the repository won't sync properly with apt 1.4 +# RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ +# curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ +# apt-get update && \ +# apt-get install -y --no-install-recommends \ +# `# Dart dependencies` \ +# dart +# ENV PATH /usr/lib/dart/bin:$PATH + +# project isn't ready for this quite yet: +# RUN apt-get install -y --no-install-recommends \ +# `# dotnet core dependencies` \ +# dotnet-sdk-2.0.0 + +RUN apt-get install -y --no-install-recommends \ +`# Erlang dependencies` \ + erlang-base \ + erlang-eunit \ + erlang-dev \ + erlang-tools \ + rebar + +RUN apt-get install -y --no-install-recommends \ +`# GlibC dependencies` \ + libglib2.0-dev + +RUN apt-get install -y --no-install-recommends \ +`# golang (go) dependencies` \ + golang-go \ + golang-race-detector-runtime + +RUN apt-get install -y --no-install-recommends \ +`# Haskell dependencies` \ + ghc \ + cabal-install + +# see THRIFT-4352, test/haxe cores on artful +# RUN apt-get install -y --no-install-recommends \ +# `# Haxe dependencies` \ +# haxe \ +# neko \ +# neko-dev +# RUN haxelib setup --always /usr/share/haxe/lib && \ +# haxelib install --always hxcpp + +RUN apt-get install -y --no-install-recommends \ +`# Java dependencies` \ + ant \ + ant-optional \ + openjdk-8-jdk \ + maven + +RUN apt-get install -y --no-install-recommends \ +`# Lua dependencies` \ + lua5.3 \ + lua5.3-dev && \ + ln -s /usr/bin/lua5.3 /usr/bin/lua && \ + ln -s /usr/bin/luac5.3 /usr/bin/luac +# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 +# lua5.3 does not install alternatives! + +RUN apt-get install -y --no-install-recommends \ +`# Node.js dependencies` \ + nodejs \ + npm + +RUN apt-get install -y --no-install-recommends \ +`# OCaml dependencies` \ + ocaml \ + opam && \ + opam init --yes && \ + opam install --yes oasis + +RUN apt-get install -y --no-install-recommends \ +`# Perl dependencies` \ + libbit-vector-perl \ + libclass-accessor-class-perl \ + libcrypt-ssleay-perl \ + libio-socket-ssl-perl \ + libnet-ssleay-perl + +RUN apt-get install -y --no-install-recommends \ +`# Php dependencies` \ + php \ + php-cli \ + php-dev \ + php-pear \ + re2c \ + phpunit + +RUN apt-get install -y --no-install-recommends \ +`# Python dependencies` \ + python-all \ + python-all-dbg \ + python-all-dev \ + python-ipaddress \ + python-pip \ + python-setuptools \ + python-six \ + python-tornado \ + python-twisted \ + python-wheel \ + python-zope.interface && \ + pip install --upgrade backports.ssl_match_hostname + +RUN apt-get install -y --no-install-recommends \ +`# Python3 dependencies` \ + python3-all \ + python3-all-dbg \ + python3-all-dev \ + python3-pip \ + python3-setuptools \ + python3-six \ + python3-tornado \ + python3-twisted \ + python3-wheel \ + python3-zope.interface + +RUN apt-get install -y --no-install-recommends \ +`# Ruby dependencies` \ + ruby \ + ruby-dev \ + ruby-bundler +RUN gem install bundler --no-ri --no-rdoc + +RUN apt-get install -y --no-install-recommends \ +`# Rust dependencies` \ + cargo \ + rustc + +RUN apt-get install -y --no-install-recommends \ +`# Static Code Analysis dependencies` \ + cppcheck \ + sloccount && \ + pip install flake8 + +# Clean up +RUN rm -rf /var/cache/apt/* && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* && \ + rm -rf /var/tmp/* + +ENV THRIFT_ROOT /thrift +RUN mkdir -p $THRIFT_ROOT/src +COPY Dockerfile $THRIFT_ROOT/ +WORKDIR $THRIFT_ROOT/src diff --git a/build/docker/ubuntu-trusty/Dockerfile b/build/docker/ubuntu-trusty/Dockerfile index 857384b4134..db2041a1fe4 100644 --- a/build/docker/ubuntu-trusty/Dockerfile +++ b/build/docker/ubuntu-trusty/Dockerfile @@ -10,68 +10,122 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Apache Thrift Docker build environment for Ubuntu # -# Known missing client libraries: -# - dotnetcore +# Apache Thrift Docker build environment for Ubuntu Trusty +# Using all stock Ubuntu Trusty packaging except for: +# - d: does not come with Ubuntu so we're installing 2.070.0 +# - dart: does not come with Ubuntu so we're installing 1.20.1 +# - dotnetcore, disabled because netcore is for 1.0.0-preview and 2.0.0 is out +# - haxe, disabled because the distro comes with 3.0.0 and it cores while installing +# - node.js, disabled because it is at 0.10.0 in the distro which is too old (need 4+) +# - ocaml, disabled because it fails to install properly +# FROM buildpack-deps:trusty-scm MAINTAINER Apache Thrift - ENV DEBIAN_FRONTEND noninteractive -# Add apt sources -# CMAKE -RUN apt-get update && \ - apt-get install -y --no-install-recommends software-properties-common && \ - add-apt-repository -y ppa:george-edison55/cmake-3.x - -# Erlang -RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \ - curl -sSL https://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - - -# Dart -RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ - curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ - sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g' - -# Consider using mirror nearby when building locally -# TODO: Provide option via --build-arg=... -# RUN sed -i /etc/apt/sources.list -e 's!http://archive.ubuntu.com/ubuntu/!http://your/mirror/!g' +RUN apt-get update && \ + apt-get dist-upgrade -y && \ + apt-get install -y --no-install-recommends \ + apt \ + apt-transport-https \ + apt-utils \ + curl \ + dirmngr \ + software-properties-common \ + wget RUN apt-get update && apt-get install -y --no-install-recommends \ `# General dependencies` \ + bash-completion \ bison \ build-essential \ clang \ cmake \ debhelper \ flex \ + gdb \ + llvm \ ninja-build \ pkg-config \ -`# Included in buildpack-deps` \ -`# autoconf` \ -`# automake` \ -`# g++` \ -`# git` \ -`# libtool` \ -`# make` + valgrind \ + vim +ENV PATH /usr/lib/llvm-3.8/bin:$PATH RUN apt-get install -y --no-install-recommends \ `# C++ dependencies` \ -`# libevent and OpenSSL are needed by D too` \ - libboost-dev \ - libboost-filesystem-dev \ - libboost-program-options-dev \ - libboost-system-dev \ - libboost-test-dev \ - libboost-thread-dev \ + libboost-all-dev \ libevent-dev \ libssl-dev \ qt5-default \ qtbase5-dev \ qtbase5-dev-tools +RUN apt-get install -y --no-install-recommends \ +`# csharp (mono) dependencies` \ + mono-devel + +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \ + wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \ + wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ +`# D dependencies` \ + dmd-bin=2.070.2-0 \ + libphobos2-dev=2.070.2-0 \ + dub \ + dfmt \ + dscanner \ + xdg-utils +# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ +# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ +# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ +# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ +# rm -rf libevent-master +# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ +# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ +# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ +# rm -rf openssl-master + +RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ +`# Dart dependencies` \ + dart=1.20.1-1 +ENV PATH /usr/lib/dart/bin:$PATH + +RUN apt-get install -y --no-install-recommends \ +`# Erlang dependencies` \ + erlang-base \ + erlang-eunit \ + erlang-dev \ + erlang-tools \ + rebar + +RUN apt-get install -y --no-install-recommends \ +`# GlibC dependencies` \ + libglib2.0-dev + +RUN apt-get install -y --no-install-recommends \ +`# golang (go) dependencies` \ + golang-go + +RUN apt-get install -y --no-install-recommends \ +`# Haskell dependencies` \ + ghc \ + cabal-install + +# disabled because it cores while installing +# RUN apt-get install -y --no-install-recommends \ +# `# Haxe dependencies` \ +# haxe \ +# neko \ +# neko-dev && \ +# haxelib setup /usr/share/haxe/lib && \ +# haxelib install hxcpp 3.2.102 + RUN apt-get install -y --no-install-recommends \ `# Java dependencies` \ ant \ @@ -79,152 +133,90 @@ RUN apt-get install -y --no-install-recommends \ openjdk-7-jdk \ maven +RUN apt-get install -y --no-install-recommends \ +`# Lua dependencies` \ + lua5.1 \ + lua5.1-dev + +# disabled because it is too old +# RUN apt-get install -y --no-install-recommends \ +# `# Node.js dependencies` \ +# nodejs \ +# npm + +# disabled because it fails to install properly +# RUN apt-get install -y --no-install-recommends \ +# `# OCaml dependencies` \ +# ocaml \ +# opam && \ +# opam init --yes && \ +# opam install --yes oasis + +RUN apt-get install -y --no-install-recommends \ +`# Perl dependencies` \ + libbit-vector-perl \ + libclass-accessor-class-perl \ + libcrypt-ssleay-perl \ + libio-socket-ssl-perl \ + libnet-ssleay-perl + +RUN apt-get install -y --no-install-recommends \ +`# Php dependencies` \ + php5 \ + php5-cli \ + php5-dev \ + php-pear \ + re2c \ + phpunit + RUN apt-get install -y --no-install-recommends \ `# Python dependencies` \ -`# TODO:` \ -`# Install twisted and zope.interface via pip. we need twisted at ./configure time, otherwise` \ -`# py.twisted tests are skipped.` \ python-all \ python-all-dbg \ python-all-dev \ python-pip \ python-setuptools \ + python-six \ python-twisted \ + python-wheel \ python-zope.interface \ python3-all \ python3-all-dbg \ python3-all-dev \ + python3-pip \ python3-setuptools \ - python3-pip + python3-six \ + python3-wheel \ + python3-zope.interface && \ + pip install -U ipaddress backports.ssl_match_hostname tornado && \ + pip3 install -U backports.ssl_match_hostname tornado +# installing tornado by pip/pip3 instead of debian package +# if we install the debian package, the build fails in py2 RUN apt-get install -y --no-install-recommends \ `# Ruby dependencies` \ ruby \ ruby-dev \ - ruby-bundler \ -`# Perl dependencies` \ - libbit-vector-perl \ - libclass-accessor-class-perl \ - libcrypt-ssleay-perl \ - libio-socket-ssl-perl \ - libnet-ssleay-perl + ruby-bundler +RUN gem install bundler --no-ri --no-rdoc RUN apt-get install -y --no-install-recommends \ -`# Php dependencies` \ - php5 \ - php5-dev \ - php5-cli \ - php-pear \ - re2c \ - phpunit \ -`# GlibC dependencies` \ - libglib2.0-dev - -RUN apt-get update && apt-get install -y --no-install-recommends \ -`# Erlang dependencies` \ - erlang-base \ - erlang-eunit \ - erlang-dev \ - erlang-tools \ - rebar +`# Rust dependencies` \ + cargo \ + rustc RUN apt-get install -y --no-install-recommends \ -`# Haskell dependencies` \ - ghc \ - cabal-install \ -`# Haxe dependencies` \ - neko \ - neko-dev \ - libneko0 - -# Newer release of nodejs -RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -RUN apt-get install -y --no-install-recommends \ -`# Node.js dependencies` \ - nodejs - -# Add mono package repository url to get latest version of mono -RUN echo "deb http://download.mono-project.com/repo/debian trusty main" | tee /etc/apt/sources.list.d/mono.list -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF -RUN apt-get update && apt-get install -y --no-install-recommends \ -`# CSharp dependencies` \ - mono-devel +`# Static Code Analysis dependencies` \ + cppcheck \ + sloccount && \ + pip install flake8 -RUN apt-get install -y --no-install-recommends \ -`# D dependencies` \ - xdg-utils \ -`# Dart dependencies` \ - dart \ -`# Lua dependencies` \ - lua5.2 \ - lua5.2-dev \ -`# MinGW dependencies` \ - mingw32 \ - mingw32-binutils \ - mingw32-runtime \ - nsis \ -`# Clean up` \ - && rm -rf /var/cache/apt/* && \ +# Clean up +RUN rm -rf /var/cache/apt/* && \ rm -rf /var/lib/apt/lists/* && \ rm -rf /tmp/* && \ rm -rf /var/tmp/* -# Ruby -RUN gem install bundler --no-ri --no-rdoc - -# Python optional dependencies -RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado -RUN pip3 install -U backports.ssl_match_hostname tornado - -# Go -RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz -ENV PATH /usr/local/go/bin:$PATH - -# Haxe -RUN mkdir -p /usr/lib/haxe && \ - wget -O - https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-linux64.tar.gz | \ - tar -C /usr/lib/haxe --strip-components=1 -xz && \ - ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \ - ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \ - mkdir -p /usr/lib/haxe/lib && \ - chmod -R 777 /usr/lib/haxe/lib && \ - haxelib setup --always /usr/lib/haxe/lib && \ - haxelib install --always hxcpp 3.4.64 - -# Node.js -# temporarily removed since this breaks the build (and is not needed to test C# code) -# RUN curl -sSL https://www.npmjs.com/install.sh | sh - -# D -RUN curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd64.deb -o /tmp/dmd_2.070.0-0_amd64.deb && \ - dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \ - rm /tmp/dmd_2.070.0-0_amd64.deb && \ - curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ - curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ - mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ - mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ - mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ - rm -rf libevent-master openssl-master && \ - echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \ - chmod 755 /usr/local/bin/gcc-dmd && \ - echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf - -# Dart -ENV PATH /usr/lib/dart/bin:$PATH - -# OCaml -RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \ - gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \ - gpg --export --armor 61707B09 | apt-key add - && \ - apt-get update && \ - apt-get install -y ocaml opam && \ - opam init && \ - opam install oasis - -# Rust -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0 -ENV PATH /root/.cargo/bin:$PATH - ENV THRIFT_ROOT /thrift RUN mkdir -p $THRIFT_ROOT/src COPY Dockerfile $THRIFT_ROOT/ diff --git a/build/docker/ubuntu-trusty/Dockerfile.orig b/build/docker/ubuntu-trusty/Dockerfile.orig new file mode 100644 index 00000000000..857384b4134 --- /dev/null +++ b/build/docker/ubuntu-trusty/Dockerfile.orig @@ -0,0 +1,231 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Apache Thrift Docker build environment for Ubuntu +# +# Known missing client libraries: +# - dotnetcore + +FROM buildpack-deps:trusty-scm +MAINTAINER Apache Thrift + +ENV DEBIAN_FRONTEND noninteractive + +# Add apt sources +# CMAKE +RUN apt-get update && \ + apt-get install -y --no-install-recommends software-properties-common && \ + add-apt-repository -y ppa:george-edison55/cmake-3.x + +# Erlang +RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \ + curl -sSL https://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - + +# Dart +RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ + sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g' + +# Consider using mirror nearby when building locally +# TODO: Provide option via --build-arg=... +# RUN sed -i /etc/apt/sources.list -e 's!http://archive.ubuntu.com/ubuntu/!http://your/mirror/!g' + +RUN apt-get update && apt-get install -y --no-install-recommends \ +`# General dependencies` \ + bison \ + build-essential \ + clang \ + cmake \ + debhelper \ + flex \ + ninja-build \ + pkg-config \ +`# Included in buildpack-deps` \ +`# autoconf` \ +`# automake` \ +`# g++` \ +`# git` \ +`# libtool` \ +`# make` + +RUN apt-get install -y --no-install-recommends \ +`# C++ dependencies` \ +`# libevent and OpenSSL are needed by D too` \ + libboost-dev \ + libboost-filesystem-dev \ + libboost-program-options-dev \ + libboost-system-dev \ + libboost-test-dev \ + libboost-thread-dev \ + libevent-dev \ + libssl-dev \ + qt5-default \ + qtbase5-dev \ + qtbase5-dev-tools + +RUN apt-get install -y --no-install-recommends \ +`# Java dependencies` \ + ant \ + ant-optional \ + openjdk-7-jdk \ + maven + +RUN apt-get install -y --no-install-recommends \ +`# Python dependencies` \ +`# TODO:` \ +`# Install twisted and zope.interface via pip. we need twisted at ./configure time, otherwise` \ +`# py.twisted tests are skipped.` \ + python-all \ + python-all-dbg \ + python-all-dev \ + python-pip \ + python-setuptools \ + python-twisted \ + python-zope.interface \ + python3-all \ + python3-all-dbg \ + python3-all-dev \ + python3-setuptools \ + python3-pip + +RUN apt-get install -y --no-install-recommends \ +`# Ruby dependencies` \ + ruby \ + ruby-dev \ + ruby-bundler \ +`# Perl dependencies` \ + libbit-vector-perl \ + libclass-accessor-class-perl \ + libcrypt-ssleay-perl \ + libio-socket-ssl-perl \ + libnet-ssleay-perl + +RUN apt-get install -y --no-install-recommends \ +`# Php dependencies` \ + php5 \ + php5-dev \ + php5-cli \ + php-pear \ + re2c \ + phpunit \ +`# GlibC dependencies` \ + libglib2.0-dev + +RUN apt-get update && apt-get install -y --no-install-recommends \ +`# Erlang dependencies` \ + erlang-base \ + erlang-eunit \ + erlang-dev \ + erlang-tools \ + rebar + +RUN apt-get install -y --no-install-recommends \ +`# Haskell dependencies` \ + ghc \ + cabal-install \ +`# Haxe dependencies` \ + neko \ + neko-dev \ + libneko0 + +# Newer release of nodejs +RUN curl -sL https://deb.nodesource.com/setup_4.x | bash +RUN apt-get install -y --no-install-recommends \ +`# Node.js dependencies` \ + nodejs + +# Add mono package repository url to get latest version of mono +RUN echo "deb http://download.mono-project.com/repo/debian trusty main" | tee /etc/apt/sources.list.d/mono.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF +RUN apt-get update && apt-get install -y --no-install-recommends \ +`# CSharp dependencies` \ + mono-devel + +RUN apt-get install -y --no-install-recommends \ +`# D dependencies` \ + xdg-utils \ +`# Dart dependencies` \ + dart \ +`# Lua dependencies` \ + lua5.2 \ + lua5.2-dev \ +`# MinGW dependencies` \ + mingw32 \ + mingw32-binutils \ + mingw32-runtime \ + nsis \ +`# Clean up` \ + && rm -rf /var/cache/apt/* && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* && \ + rm -rf /var/tmp/* + +# Ruby +RUN gem install bundler --no-ri --no-rdoc + +# Python optional dependencies +RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado +RUN pip3 install -U backports.ssl_match_hostname tornado + +# Go +RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz +ENV PATH /usr/local/go/bin:$PATH + +# Haxe +RUN mkdir -p /usr/lib/haxe && \ + wget -O - https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-linux64.tar.gz | \ + tar -C /usr/lib/haxe --strip-components=1 -xz && \ + ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \ + ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \ + mkdir -p /usr/lib/haxe/lib && \ + chmod -R 777 /usr/lib/haxe/lib && \ + haxelib setup --always /usr/lib/haxe/lib && \ + haxelib install --always hxcpp 3.4.64 + +# Node.js +# temporarily removed since this breaks the build (and is not needed to test C# code) +# RUN curl -sSL https://www.npmjs.com/install.sh | sh + +# D +RUN curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd64.deb -o /tmp/dmd_2.070.0-0_amd64.deb && \ + dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \ + rm /tmp/dmd_2.070.0-0_amd64.deb && \ + curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ + curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ + mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ + mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ + mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ + rm -rf libevent-master openssl-master && \ + echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \ + chmod 755 /usr/local/bin/gcc-dmd && \ + echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf + +# Dart +ENV PATH /usr/lib/dart/bin:$PATH + +# OCaml +RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \ + gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \ + gpg --export --armor 61707B09 | apt-key add - && \ + apt-get update && \ + apt-get install -y ocaml opam && \ + opam init && \ + opam install oasis + +# Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0 +ENV PATH /root/.cargo/bin:$PATH + +ENV THRIFT_ROOT /thrift +RUN mkdir -p $THRIFT_ROOT/src +COPY Dockerfile $THRIFT_ROOT/ +WORKDIR $THRIFT_ROOT/src diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile index 560cf876406..255b6e81f0e 100644 --- a/build/docker/ubuntu-xenial/Dockerfile +++ b/build/docker/ubuntu-xenial/Dockerfile @@ -10,32 +10,40 @@ # See the License for the specific language governing permissions and # limitations under the License. +# # Apache Thrift Docker build environment for Ubuntu Xenial +# Using all stock Ubuntu Xenial packaging except for: +# - d: does not come with Ubuntu so we're installing 2.073.2 for coverage +# - dart: does not come with Ubuntu so we're installing 1.22.1 for coverage +# + # # Known missing or disabled libraries: # - d: deimos for libevent and openssl omitted - not compatible / build errors FROM buildpack-deps:xenial-scm MAINTAINER Apache Thrift - ENV DEBIAN_FRONTEND noninteractive ### Add apt repos -RUN apt-get update && apt-get install -y --no-install-recommends apt apt-transport-https curl wget apt-utils +RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y --no-install-recommends apt apt-transport-https curl wget apt-utils # csharp (mono) -RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF +# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \ +# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF # D RUN wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \ - apt-get update && apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring + wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - +ENV D_VERSION 2.073.2-0 # Dart RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g' +# since ubuntu-artful can't run dart, we'll run 1.240 on xenial for now +ENV DART_VERSION 1.24.2-1 # dotnet (core) 2.0.0 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ @@ -43,11 +51,11 @@ RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /et # node.js (this step runs apt-get update internally) # note: node 8.5 introduced some issues with directory handling / jsdoc / something... using 7.x for now -RUN curl -sL https://deb.nodesource.com/setup_7.x | bash +# RUN curl -sL https://deb.nodesource.com/setup_7.x | bash ### install general dependencies -RUN apt-get install -y --no-install-recommends \ +RUN apt-get update && apt-get install -y --no-install-recommends \ `# General dependencies` \ bash-completion \ bison \ @@ -84,19 +92,23 @@ RUN apt-get install -y --no-install-recommends \ `# csharp (mono) dependencies` \ mono-devel -RUN apt-get install -y --no-install-recommends \ +RUN apt-get install -y --allow-unauthenticated --no-install-recommends \ `# D dependencies` \ - dmd-bin \ + dmd-bin=$D_VERSION \ + libphobos2-dev=$D_VERSION \ + dub \ + dfmt \ + dscanner \ libevent-dev \ libssl-dev \ xdg-utils -# libevent deimos doesn't seem to work so disabling it: +# libevent deimos doesn't seem to work so not enabling it: # RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ # curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ # mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ # mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ # rm -rf libevent-master -# openssl deimos doesn't work with openssl-1.0.2 so disabling it: +# openssl deimos doesn't work with openssl-1.0.2 so not enabling it: # RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ # mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ # mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ @@ -104,7 +116,7 @@ RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \ `# Dart dependencies` \ - dart + dart=$DART_VERSION ENV PATH /usr/lib/dart/bin:$PATH RUN apt-get install -y --no-install-recommends \ @@ -159,7 +171,9 @@ RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \ `# Node.js dependencies` \ - nodejs + nodejs \ + npm && \ + ln -s /usr/bin/nodejs /usr/bin/node RUN apt-get install -y --no-install-recommends \ `# OCaml dependencies` \ @@ -222,9 +236,6 @@ RUN apt-get install -y --no-install-recommends \ cargo \ rustc -# Update anything else left hanging -RUN apt-get dist-upgrade -y - # Clean up RUN rm -rf /var/cache/apt/* && \ rm -rf /var/lib/apt/lists/* && \ diff --git a/build/docker/vars.sh b/build/docker/vars.sh new file mode 100755 index 00000000000..752e2825aee --- /dev/null +++ b/build/docker/vars.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +[[ ! -z "$DOCKER_USER" ]] || export DOCKER_USER=$DEFAULT_DOCKER_USER +[[ ! -z "$DOCKER_REPO" ]] || export DOCKER_REPO=$DEFAULT_DOCKER_REPO +[[ ! -z "$DOCKER_TAG" ]] || export DOCKER_TAG=$DOCKER_USER/$DOCKER_REPO:$DISTRO diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 50820334dde..482a89a4d1a 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -111,7 +111,7 @@ thrift_SOURCES += src/thrift/generate/t_c_glib_generator.cc \ src/thrift/generate/t_rs_generator.cc thrift_CPPFLAGS = -I$(srcdir)/src -thrift_CXXFLAGS = -Wall -Wextra -pedantic +thrift_CXXFLAGS = -Wall -Wextra -pedantic -Werror thrift_LDADD = @LEXLIB@ src/thrift/libparse.a if !WITH_PLUGIN diff --git a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc index 10d28b21341..a6cb09d1f53 100644 --- a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc @@ -2909,6 +2909,7 @@ void t_csharp_generator::prepare_member_name_mapping(void* scope, const string& structname) { // begin new scope member_mapping_scope dummy; + dummy.scope_member = 0; member_mapping_scopes.push_back(dummy); member_mapping_scope& active = member_mapping_scopes.back(); active.scope_member = scope; diff --git a/compiler/cpp/src/thrift/generate/t_haxe_generator.cc b/compiler/cpp/src/thrift/generate/t_haxe_generator.cc index 4de4307b3f8..97c7d19a3ff 100644 --- a/compiler/cpp/src/thrift/generate/t_haxe_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_haxe_generator.cc @@ -2556,6 +2556,7 @@ string t_haxe_generator::type_name(t_type* ttype, bool in_container, bool in_ini if (!(tkey->is_binary())) { return "StringMap< " + type_name(tval) + ">"; } + break; // default to ObjectMap<> case t_base_type::TYPE_I8: case t_base_type::TYPE_I16: case t_base_type::TYPE_I32: @@ -2581,6 +2582,7 @@ string t_haxe_generator::type_name(t_type* ttype, bool in_container, bool in_ini if (!(tkey->is_binary())) { return "StringSet"; } + break; // default to ObjectSet case t_base_type::TYPE_I8: case t_base_type::TYPE_I16: case t_base_type::TYPE_I32: diff --git a/compiler/cpp/src/thrift/generate/t_hs_generator.cc b/compiler/cpp/src/thrift/generate/t_hs_generator.cc index 29c081677b3..30eb8fa9ab3 100644 --- a/compiler/cpp/src/thrift/generate/t_hs_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_hs_generator.cc @@ -1415,12 +1415,12 @@ void t_hs_generator::generate_deserialize_container(ofstream& out, t_type* ttype } else if (ttype->is_set()) { out << "(Set.fromList $ P.map (\\" << val << " -> "; - generate_deserialize_type(out, ((t_map*)ttype)->get_key_type(), val); + generate_deserialize_type(out, ((t_set*)ttype)->get_elem_type(), val); out << ") " << arg << ")"; } else if (ttype->is_list()) { out << "(Vector.fromList $ P.map (\\" << val << " -> "; - generate_deserialize_type(out, ((t_map*)ttype)->get_key_type(), val); + generate_deserialize_type(out, ((t_list*)ttype)->get_elem_type(), val); out << ") " << arg << ")"; } } @@ -1488,9 +1488,9 @@ void t_hs_generator::generate_serialize_container(ofstream& out, t_type* ttype, out << ")) $ Map.toList " << prefix; } else if (ttype->is_set()) { - out << "T.TSet " << type_to_enum(((t_list*)ttype)->get_elem_type()); + out << "T.TSet " << type_to_enum(((t_set*)ttype)->get_elem_type()); out << " $ P.map (\\" << v << " -> "; - generate_serialize_type(out, ((t_list*)ttype)->get_elem_type(), v); + generate_serialize_type(out, ((t_set*)ttype)->get_elem_type(), v); out << ") $ Set.toList " << prefix; } else if (ttype->is_list()) { @@ -1577,7 +1577,7 @@ string t_hs_generator::type_to_enum(t_type* type) { return "(T.T_MAP " + ktype + " " + vtype + ")"; } else if (type->is_set()) { - return "(T.T_SET " + type_to_enum(((t_list*)type)->get_elem_type()) + ")"; + return "(T.T_SET " + type_to_enum(((t_set*)type)->get_elem_type()) + ")"; } else if (type->is_list()) { return "(T.T_LIST " + type_to_enum(((t_list*)type)->get_elem_type()) + ")"; diff --git a/compiler/cpp/src/thrift/generate/t_netcore_generator.cc b/compiler/cpp/src/thrift/generate/t_netcore_generator.cc index 71e42366abf..8d157a9e102 100644 --- a/compiler/cpp/src/thrift/generate/t_netcore_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_netcore_generator.cc @@ -2789,6 +2789,7 @@ void t_netcore_generator::prepare_member_name_mapping(void* scope, const vector< { // begin new scope member_mapping_scope dummy; + dummy.scope_member = 0; member_mapping_scopes.push_back(dummy); member_mapping_scope& active = member_mapping_scopes.back(); active.scope_member = scope; diff --git a/compiler/cpp/src/thrift/parse/t_typedef.h b/compiler/cpp/src/thrift/parse/t_typedef.h index 0cccc265e52..aad3a50e8e9 100644 --- a/compiler/cpp/src/thrift/parse/t_typedef.h +++ b/compiler/cpp/src/thrift/parse/t_typedef.h @@ -33,7 +33,7 @@ class t_typedef : public t_type { public: t_typedef(t_program* program, t_type* type, const std::string& symbolic) - : t_type(program, symbolic), type_(type), symbolic_(symbolic), forward_(false), seen_(false) {} + : t_type(program, symbolic), type_(type), symbolic_(symbolic), forward_(false) {} /** * This constructor is used to refer to a type that is lazily @@ -44,8 +44,8 @@ class t_typedef : public t_type { : t_type(program, symbolic), type_(NULL), symbolic_(symbolic), - forward_(forward), - seen_(false) {} + forward_(forward) + {} ~t_typedef() {} @@ -61,7 +61,6 @@ class t_typedef : public t_type { t_type* type_; std::string symbolic_; bool forward_; - mutable bool seen_; }; #endif diff --git a/configure.ac b/configure.ac index 236c4c26a6a..073ad8dc59f 100755 --- a/configure.ac +++ b/configure.ac @@ -106,7 +106,6 @@ AX_CXX_COMPILE_STDCXX_11([noext], [optional]) if test "$ac_success" = "no"; then CXXFLAGS="$CXXFLAGS -Wno-variadic-macros -Wno-long-long -Wno-c++11-long-long" fi -CXXFLAGS="$CXXFLAGS -Wno-deprecated-register" AM_EXTRA_RECURSIVE_TARGETS([style]) AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or -iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec clang-format -i {} \;') diff --git a/doc/images/cgrn.png b/doc/images/cgrn.png new file mode 100644 index 0000000000000000000000000000000000000000..dc0964e0ddd02091afbfc3e9cf6db2cb543814f6 GIT binary patch literal 1125 zcmV-r1e*JaP)%aDP zX2ydY1rK;M@AdJ>*|iNdd&!hdQFT>LZkBP^`83>oDLQg? z?J70f>v&;((Of~Z*{0nZpeU5OESXLnI@9A^zWn=-A@b_GTaKOn&w#^c)@%cI74D6p zp#@D+D#=!pq(m%GxE6(L(Qb}${l)|*P9Cm9vYoqLJGSS(fFH(Jf28h}?IRFpVT4CS4%FXzMA?{Be}=-_C6LeCw5ceSoiyu5CMK=f@Vlyqv}q<`Pap zoZJyX7a$tDmxbP(FcX|C=KF6CoeS!p-n%`-yUMfyGBxyxfkIfD zC#xq|Ju4n85Y*$XB)JJ5ePrd6Dz>T52O$<4Xbq5ZMYa-CPnJN|3X?#Rn%sM563Etl zMm<A4Oyvg1|CZLBfDpM_yTS8R?l$ETPU3{cV8beN~iGd2sTg zQkbAY2$hm%lu!%RwBSpjs+77ELM`Mx=Yy<~!i1J<(3wsE2m1g~%Kd*|n>aT!3DGNl zMwuyv>bBxb!B>i}GC4<*)U#zPM66d7$yZEv?1Gu??*n|c_0L%4nVlEU-$ccbAov-@ z*NG4kG5TJ^t9u@p>qh|1#sF74HNZQEcBeRRv)lYZ`;(<(W80Q2SxkybP~Yu8PEhTx z4e0FsK%<4D$(8H3`0Ix4`EGZ5`<@$4R(4EWzjgD{m76Ah?kj*UKcgy_WoGShSt_E51oVS6;00000NkvXXu0mjfT;K#0 literal 0 HcmV?d00001 diff --git a/doc/images/cred.png b/doc/images/cred.png new file mode 100644 index 0000000000000000000000000000000000000000..086a5fbe9874bffc126ab50a7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2H{>qcddrds)p=8#jH9;n59vl^i+y z!q!R;AXwMvAKSU5)S5%m7LqAMrI4kFiUXyPEJHE{S%zd8WC~P@blOy}UuNj(?PESo z8a-|5t=(Jk9_cQC(}+m4Cj@XFaTctL78!$R6V+%H7n7wRp0#~NnrX5Z_~ssf({@+M zXoBg2cXx|Ro&oOPIoNxPt26?vp&~0?*VHf zVA&><-EHAQxk#cC#4+7#QPP=c&4#xI2J1-L0q0f#&c+N}-a*#HePH!nD8WO$&fLuf z5GHy7-OlMdt;LVmZQDFn*D0d1+!`A}E>~eq1X>fj%3H)aisce*@yuT33UIn-qrG@$ z(zx!@!CTjEAUJ|bkZv34c98B8k}O4KDnZgDKPIxMpa2Y1X*Syc?>C&7RS&ygpB+9n zx_SM+Eo;}%x6~mdDz4T?%T}`SAVRTT!PKi%|8|vt~)+_ zYWv2@rfM0i2X7GLKmrt@SSca(8aGwSpTD&Xa0vM1p)Z^>>kH%JIWe-4-6JFG=m!S- zOCUlgHDmRj=Z~=Iy;pO*7y3qiBs1-^QcnzT;fiZ+#`P8%ot^lWiA72-F^egj! b^H=c?^!p~ibI|U_00000NkvXXu0mjff@AGx literal 0 HcmV?d00001 diff --git a/doc/images/cyel.png b/doc/images/cyel.png new file mode 100644 index 0000000000000000000000000000000000000000..7c1dfc767096878e07ba3ac01f818726d33b40f4 GIT binary patch literal 946 zcmV;j15NyiP)l&>sOJLin(Szg0UjuD}Y9x>V>LIvTO|anG zT>@!=I<)c(Zf@o#zO_I7=x@8(rruAR+T^%#*T6R*w2ElP@XelQEsz|f4bp^=fm_40 ze|jB#^}foWoQr;Ib*;$4vz4+)K!M z+@PV*UN`qZIx_h!;8|RyO=2qGdF5dhJYhl(;lUR04nZee0p2TLR@~>9w1#@d`w7|> z@L7u;uEaG!wyH6UR72-LY{b#|9=u5gV45;NA0{#yt-4fjn5v2Egk zz@7dItew-mHDSo31=V-$sXZT<Doy>vi*VM@}uFeeAVCK^U64Bsm6vwHdYfGN;#UzEntB! zfv>k6*T$Hn*q$sLPI>jHII#pE$5u`;` zWxzc9IF;FVIq>98UQbIrohG~hU;|ftVDWZ?b8nvE{H;}NQJV+6>NY+2-~Cnm14mqm UAN^3V_W%F@07*qoM6N<$g7f3S-~a#s literal 0 HcmV?d00001 diff --git a/doc/images/thrift-layers.png b/doc/images/thrift-layers.png new file mode 100644 index 0000000000000000000000000000000000000000..c1accf40901672edfca0b295b8405e2b48167993 GIT binary patch literal 27211 zcmb6AbzD@>7e9`pf>P4TE+O3^mqtM8T`FUFv6ma(I?8f5#XWSZ*c)7X*{8BNIHi$9=T>;w(l}ZOJwZ@Dk@f197ax7UKL&i1snk_S2H6V0i!p5#xYkRG$_?ISH?A0VZ@KqwNSw*am2My#Wk+ZvrwTh5!bU&rOD67 zwO9d>Ip@}yrn31)z^4ikP^R)Gab)+6z-9nvQ!1}*S<^r!&S{YNTq5gX zsQxKRxULRot`H}+uwkhXr=gB83TLwl zcee`XunK3OIO?zpzpScryf|vN0q3+1r>9A4U;y{D31_ZJp{K5Jt_Od79H*zpu?`v- zA1CYS2^bi#N*&m(>m2WdpryKor74_|5v%cWnK>x2rzdw{Aas0OWo}%iXP~UJXJl!P zacNFqZrpKc4S#Mv(!dAPK> zxw~|_yL5HBTX?!QwYGV9cv!rKO@Wg;&`ke#HHPk;MN-F)g_B-N-1>2hHn2rhzO)QH(b& zzT?r`aMgVZ{`!nD8~@{P&A@EMQE{eD=D7s)3>lJq;PUcnujHs;t#ED4;Dzoq>DuO6 z;bWhktMf)54gDwiNh+$U1e#6=H8m<7P)8^0Gfhl1MbHpBHkLC7%E?h+5@Ba!BP;;8 zxU^MJs;Z%K|KCMNp`ka9ky3=eerW$qNb;Nz*;4mUhnelk-LwB1S*W6>rXU3|Cd%i} zxMOf^w0Iva+hczHw4Hw`CE%X@iXsr<_k`}@k^6@U*z3C~$0e$@-*;fT)tsiq$8dQ% zL#1Ok))O;M@H}~@__~pLlMpe+x%lj1a~YY!Dh*{{AhxCcp0tClf-pqe2uys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WXA%?%l~1_ zoV&^{Rw%M2jRKsNj8(we zKa0tqN@P@DRFNUAY^?FIHC#GXScw$|k=jzHoz1HQ0|QS#y?yvsFK>t4D-^>d?e`3s zDI~Aw@1Q-1`7+oCS*WlNUNTyDb`cPXKDE@0` z425ZsMk|m;MHBs~tyU&0&c7{D6Th88ZYKTsH=9-z;W7@o@THTET|!*cWpjPTWi56G z#2)Xh$ur#=)pcK)G$?Z3To1qbmy#l1QH#$0g79QB|MukQM;4a;&2{9v#5rAS*Moib zew+rsFS&!HbIx+VC|!seplwm5G&oG?BER8UTO!}tNf@~P@a*V2Ni6GI`xuH-W|Ar| zovY+M_)K~ZiOCav9azuYB7~*iNZj6fRnvL(K5xh zfJMFGF%s_YN(9s{(<(m~N9dsj20Zcq`-+%wJL{hz=Z9EzmG`yQGXK5zNnKe->D?X6 Gr~e0dvRX|5 literal 0 HcmV?d00001 diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp index 0d1d14d1779..438418753ee 100644 --- a/lib/cpp/test/TMemoryBufferTest.cpp +++ b/lib/cpp/test/TMemoryBufferTest.cpp @@ -82,13 +82,14 @@ BOOST_AUTO_TEST_CASE(test_roundtrip) { BOOST_AUTO_TEST_CASE(test_copy) { string* str1 = new string("abcd1234"); + ptrdiff_t str1addr = reinterpret_cast(str1); const char* data1 = str1->data(); TMemoryBuffer buf((uint8_t*)str1->data(), static_cast(str1->length()), TMemoryBuffer::COPY); delete str1; string* str2 = new string("plsreuse"); - bool obj_reuse = (str1 == str2); + bool obj_reuse = (str1addr == reinterpret_cast(str2)); bool dat_reuse = (data1 == str2->data()); BOOST_TEST_MESSAGE("Object reuse: " << obj_reuse << " Data reuse: " << dat_reuse << ((obj_reuse && dat_reuse) ? " YAY!" : "")); diff --git a/lib/cpp/test/concurrency/ThreadFactoryTests.h b/lib/cpp/test/concurrency/ThreadFactoryTests.h index 6ac9aa51cd5..48330f374c0 100644 --- a/lib/cpp/test/concurrency/ThreadFactoryTests.h +++ b/lib/cpp/test/concurrency/ThreadFactoryTests.h @@ -54,39 +54,33 @@ class ThreadFactoryTests { void run() { Synchronized s(_monitor); - - _count--; - - // std::cout << "\t\t\tthread count: " << _count << std::endl; - - if (_count == 0) { + + if (--_count == 0) { _monitor.notify(); } } Monitor& _monitor; - int& _count; }; bool reapNThreads(int loop = 1, int count = 10) { PlatformThreadFactory threadFactory = PlatformThreadFactory(); - shared_ptr monitor(new Monitor); for (int lix = 0; lix < loop; lix++) { - int* activeCount = new int(count); + int activeCount = 0; std::vector > threads; - int tix; for (tix = 0; tix < count; tix++) { try { + ++activeCount; threads.push_back( - threadFactory.newThread(shared_ptr(new ReapNTask(*monitor, *activeCount)))); + threadFactory.newThread(shared_ptr(new ReapNTask(*monitor, activeCount)))); } catch (SystemResourceException& e) { std::cout << "\t\t\tfailed to create " << lix* count + tix << " thread " << e.what() << std::endl; @@ -110,17 +104,15 @@ class ThreadFactoryTests { { Synchronized s(*monitor); - while (*activeCount > 0) { + while (activeCount > 0) { monitor->wait(1000); } } - delete activeCount; std::cout << "\t\t\treaped " << lix* count << " threads" << std::endl; } std::cout << "\t\t\tSuccess!" << std::endl; - return true; } diff --git a/lib/d/src/thrift/base.d b/lib/d/src/thrift/base.d index 57aec1818d3..38034a7b87f 100644 --- a/lib/d/src/thrift/base.d +++ b/lib/d/src/thrift/base.d @@ -50,7 +50,7 @@ class TCompoundOperationException : TException { /// 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.9.0 dev"; +enum VERSION = "1.0.0 dev"; /** * Functions used for logging inside Thrift. diff --git a/lib/go/test/Makefile.am b/lib/go/test/Makefile.am index 5531e070c41..842f2de6180 100644 --- a/lib/go/test/Makefile.am +++ b/lib/go/test/Makefile.am @@ -59,8 +59,10 @@ gopath: $(THRIFT) $(THRIFTTEST) \ $(THRIFT) $(THRIFTARGS) InitialismsTest.thrift $(THRIFT) $(THRIFTARGS),read_write_private DontExportRWTest.thrift $(THRIFT) $(THRIFTARGS),ignore_initialisms IgnoreInitialismsTest.thrift - GOPATH=`pwd`/gopath $(GO) get github.com/golang/mock/gomock GOPATH=`pwd`/gopath $(GO) get golang.org/x/net/context + GOPATH=`pwd`/gopath $(GO) get github.com/golang/mock/gomock || true + sed -i 's/\"context\"/\"golang.org\/x\/net\/context\"/g' gopath/src/github.com/golang/mock/gomock/controller.go || true + GOPATH=`pwd`/gopath $(GO) get github.com/golang/mock/gomock ln -nfs ../../../thrift gopath/src/thrift ln -nfs ../../tests gopath/src/tests cp -r ./dontexportrwtest gopath/src diff --git a/lib/js/Makefile.am b/lib/js/Makefile.am index 181e15e9b04..9ea20a4ab8d 100644 --- a/lib/js/Makefile.am +++ b/lib/js/Makefile.am @@ -18,11 +18,13 @@ # # Make sure this doesn't fail if ant is not configured. - +# We call install twice to work around npm issues +# +if HAVE_NPM SUBDIRS = test check-local: all - npm install - npm list + $(NPM) install || $(NPM) install + $(NPM) list ./node_modules/.bin/grunt - +endif diff --git a/lib/nodejs/Makefile.am b/lib/nodejs/Makefile.am index a3424d074cd..9a7b4eb2c88 100755 --- a/lib/nodejs/Makefile.am +++ b/lib/nodejs/Makefile.am @@ -15,12 +15,13 @@ # specific language governing permissions and limitations # under the License. +# We call npm twice to work around npm issues stubs: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) --gen js:node -o test/ $(top_srcdir)/test/ThriftTest.thrift deps: $(top_srcdir)/package.json - $(NPM) install --no-bin-links $(top_srcdir)/ + $(NPM) install $(top_srcdir)/ || $(NPM) install $(top_srcdir)/ all-local: deps diff --git a/lib/py/setup.py b/lib/py/setup.py index d0655730bec..3d14118122f 100644 --- a/lib/py/setup.py +++ b/lib/py/setup.py @@ -121,6 +121,7 @@ def run_setup(with_binary): **extensions ) + try: with_binary = True run_setup(with_binary) diff --git a/lib/py/src/ext/binary.h b/lib/py/src/ext/binary.h index dedeec35bce..960b0d003a4 100644 --- a/lib/py/src/ext/binary.h +++ b/lib/py/src/ext/binary.h @@ -113,7 +113,8 @@ class BinaryProtocol : public ProtocolBase { if (!readBytes(&buf, sizeof(int16_t))) { return false; } - val = static_cast(ntohs(*reinterpret_cast(buf))); + memcpy(&val, buf, sizeof(int16_t)); + val = ntohs(val); return true; } @@ -122,7 +123,8 @@ class BinaryProtocol : public ProtocolBase { if (!readBytes(&buf, sizeof(int32_t))) { return false; } - val = static_cast(ntohl(*reinterpret_cast(buf))); + memcpy(&val, buf, sizeof(int32_t)); + val = ntohl(val); return true; } @@ -131,7 +133,8 @@ class BinaryProtocol : public ProtocolBase { if (!readBytes(&buf, sizeof(int64_t))) { return false; } - val = static_cast(ntohll(*reinterpret_cast(buf))); + memcpy(&val, buf, sizeof(int64_t)); + val = ntohll(val); return true; } diff --git a/lib/py/src/ext/compact.h b/lib/py/src/ext/compact.h index 5bba2376124..a78d7a703fb 100644 --- a/lib/py/src/ext/compact.h +++ b/lib/py/src/ext/compact.h @@ -162,7 +162,8 @@ class CompactProtocol : public ProtocolBase { if (!readBytes(&buf, 8)) { return false; } - transfer.f = letohll(*reinterpret_cast(buf)); + memcpy(&transfer.f, buf, sizeof(int64_t)); + transfer.f = letohll(transfer.f); val = transfer.t; return true; } diff --git a/lib/py/src/ext/protocol.tcc b/lib/py/src/ext/protocol.tcc index 6e978d7c7b1..c025d0c9680 100644 --- a/lib/py/src/ext/protocol.tcc +++ b/lib/py/src/ext/protocol.tcc @@ -102,7 +102,7 @@ inline bool ProtocolBase::writeBuffer(char* data, size_t size) { PyErr_SetString(PyExc_IOError, "failed to write to cStringIO object"); return false; } - if (len != size) { + if (static_cast(len) != size) { PyErr_Format(PyExc_EOFError, "write length mismatch: expected %lu got %d", size, len); return false; } diff --git a/lib/py/src/protocol/TCompactProtocol.py b/lib/py/src/protocol/TCompactProtocol.py index 16fd9be28c3..e485cffb145 100644 --- a/lib/py/src/protocol/TCompactProtocol.py +++ b/lib/py/src/protocol/TCompactProtocol.py @@ -42,6 +42,8 @@ def nested(self, *args, **kwargs): return func(self, *args, **kwargs) return nested return helper + + writer = make_helper(VALUE_WRITE, CONTAINER_WRITE) reader = make_helper(VALUE_READ, CONTAINER_READ) @@ -94,6 +96,7 @@ class CompactType(object): MAP = 0x0B STRUCT = 0x0C + CTYPES = { TType.STOP: CompactType.STOP, TType.BOOL: CompactType.TRUE, # used for collection diff --git a/lib/py/src/server/TNonblockingServer.py b/lib/py/src/server/TNonblockingServer.py index 67ee04ed5c1..26c0f7e1fd4 100644 --- a/lib/py/src/server/TNonblockingServer.py +++ b/lib/py/src/server/TNonblockingServer.py @@ -62,6 +62,7 @@ def run(self): logger.exception("Exception while processing request", exc_info=True) callback(False, b'') + WAIT_LEN = 0 WAIT_MESSAGE = 1 WAIT_PROCESS = 2 diff --git a/lib/py/src/transport/sslcompat.py b/lib/py/src/transport/sslcompat.py index 8ad4ce4002b..ab00cb2a839 100644 --- a/lib/py/src/transport/sslcompat.py +++ b/lib/py/src/transport/sslcompat.py @@ -96,4 +96,5 @@ def _optional_dependencies(): match = legacy_validate_callback return ipaddr, match + _match_has_ipaddress, _match_hostname = _optional_dependencies() diff --git a/lib/py/test/test_sslsocket.py b/lib/py/test/test_sslsocket.py index 8951618a930..3c4be9c2aba 100644 --- a/lib/py/test/test_sslsocket.py +++ b/lib/py/test/test_sslsocket.py @@ -334,6 +334,7 @@ def test_ssl_context(self): self._assert_connection_success(server, ssl_context=client_context) + if __name__ == '__main__': logging.basicConfig(level=logging.WARN) from thrift.transport.TSSLSocket import TSSLSocket, TSSLServerSocket, _match_has_ipaddress diff --git a/lib/py/test/thrift_json.py b/lib/py/test/thrift_json.py index fc1e79cc7e0..40e7a47e389 100644 --- a/lib/py/test/thrift_json.py +++ b/lib/py/test/thrift_json.py @@ -46,5 +46,6 @@ def test_escaped_unicode_string(self): unicode_text = unicode_text.encode('utf8') self.assertEqual(protocol.readString(), unicode_text) + if __name__ == '__main__': unittest.main() diff --git a/test/features/string_limit.py b/test/features/string_limit.py index 695d9652e37..14f57d083ba 100644 --- a/test/features/string_limit.py +++ b/test/features/string_limit.py @@ -57,5 +57,6 @@ def main(argv): print('[ERROR]: limit + 1') assert False + if __name__ == '__main__': main(sys.argv[1:]) diff --git a/test/go/Makefile.am b/test/go/Makefile.am index 1438d4464d9..db272587541 100644 --- a/test/go/Makefile.am +++ b/test/go/Makefile.am @@ -35,9 +35,11 @@ gopath: $(THRIFT) ThriftTest.thrift mkdir -p src/gen $(THRIFTCMD) ThriftTest.thrift $(THRIFTCMD) ../StressTest.thrift - ln -nfs ../../../lib/go/thrift src/thrift - GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock GOPATH=`pwd` $(GO) get golang.org/x/net/context + GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock || true + sed -i 's/\"context\"/\"golang.org\/x\/net\/context\"/g' src/github.com/golang/mock/gomock/controller.go || true + GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock + ln -nfs ../../../lib/go/thrift src/thrift touch gopath bin/testclient: gopath diff --git a/test/py/FastbinaryTest.py b/test/py/FastbinaryTest.py index d231abf3d57..05c0bb6d15a 100755 --- a/test/py/FastbinaryTest.py +++ b/test/py/FastbinaryTest.py @@ -50,6 +50,7 @@ def __init__(self): def isOpen(self): return True + ooe1 = OneOfEach() ooe1.im_true = True ooe1.im_false = False diff --git a/test/py/SerializationTest.py b/test/py/SerializationTest.py index b080d87fc08..ef7983568a6 100755 --- a/test/py/SerializationTest.py +++ b/test/py/SerializationTest.py @@ -452,5 +452,6 @@ def suite(): suite.addTest(loader.loadTestsFromTestCase(SerializersTest)) return suite + if __name__ == "__main__": unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2)) diff --git a/test/py/TestClient.py b/test/py/TestClient.py index 18ef66bb778..1ab8e78aed9 100755 --- a/test/py/TestClient.py +++ b/test/py/TestClient.py @@ -301,6 +301,7 @@ def parseArgs(self, argv): self.testNames = ([self.defaultTest]) self.createTests() + if __name__ == "__main__": parser = OptionParser() parser.add_option('--libpydir', type='string', dest='libpydir', diff --git a/test/py/TestEof.py b/test/py/TestEof.py index cda105090cd..0b4a8296014 100755 --- a/test/py/TestEof.py +++ b/test/py/TestEof.py @@ -127,5 +127,6 @@ def suite(): suite.addTest(loader.loadTestsFromTestCase(TestEof)) return suite + if __name__ == "__main__": unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2)) diff --git a/test/py/TestFrozen.py b/test/py/TestFrozen.py index e568e8cc150..6d2595cf29b 100755 --- a/test/py/TestFrozen.py +++ b/test/py/TestFrozen.py @@ -118,5 +118,6 @@ def suite(): suite.addTest(loader.loadTestsFromTestCase(TestFrozenAcceleratedCompact)) return suite + if __name__ == "__main__": unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2)) diff --git a/test/py/TestServer.py b/test/py/TestServer.py index 070560c483f..a7366a87ba5 100755 --- a/test/py/TestServer.py +++ b/test/py/TestServer.py @@ -267,6 +267,7 @@ def clean_shutdown(signum, frame): # enter server main loop server.serve() + if __name__ == '__main__': parser = OptionParser() parser.add_option('--libpydir', type='string', dest='libpydir', diff --git a/test/py/TestSocket.py b/test/py/TestSocket.py index a3c5ff0f329..ae3160f315c 100755 --- a/test/py/TestSocket.py +++ b/test/py/TestSocket.py @@ -67,6 +67,7 @@ def testWriteTimeout(self): except: self.assert_(time.time() - starttime < 5.0) + if __name__ == '__main__': suite = unittest.TestSuite() loader = unittest.TestLoader() diff --git a/test/test.py b/test/test.py index 9305967c3ac..5a015eac7df 100755 --- a/test/test.py +++ b/test/test.py @@ -166,5 +166,6 @@ def main(argv): res = run_cross_tests(server_match, client_match, options.jobs, options.skip_known_failures, options.retry_count, options.regex) return 0 if res else 1 + if __name__ == '__main__': sys.exit(main(sys.argv[1:])) diff --git a/tutorial/hs/LICENSE b/tutorial/hs/LICENSE new file mode 100644 index 00000000000..3b6d7d74cc9 --- /dev/null +++ b/tutorial/hs/LICENSE @@ -0,0 +1,239 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + +-------------------------------------------------- +SOFTWARE DISTRIBUTED WITH THRIFT: + +The Apache Thrift software includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +-------------------------------------------------- +Portions of the following files are licensed under the MIT License: + + lib/erl/src/Makefile.am + +Please see doc/otp-base-license.txt for the full terms of this license. + +-------------------------------------------------- +For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components: + +# Copyright (c) 2007 Thomas Porschberg +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +-------------------------------------------------- +For the lib/nodejs/lib/thrift/json_parse.js: + +/* + json_parse.js + 2015-05-02 + Public Domain. + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + +*/ +(By Douglas Crockford ) +-------------------------------------------------- diff --git a/tutorial/hs/Makefile.am b/tutorial/hs/Makefile.am index f274eb62cac..a3eccc2b1c8 100755 --- a/tutorial/hs/Makefile.am +++ b/tutorial/hs/Makefile.am @@ -37,3 +37,6 @@ tutorialserver: all tutorialclient: all dist/build/HaskellClient/HaskellClient + +EXTRA_DIST = \ + LICENSE diff --git a/tutorial/hs/ThriftTutorial.cabal b/tutorial/hs/ThriftTutorial.cabal index e6f01828398..88f1379405d 100755 --- a/tutorial/hs/ThriftTutorial.cabal +++ b/tutorial/hs/ThriftTutorial.cabal @@ -27,7 +27,7 @@ Synopsis: Thrift Tutorial library package Homepage: http://thrift.apache.org Bug-Reports: https://issues.apache.org/jira/browse/THRIFT Maintainer: dev@thrift.apache.org -License-File: ../../LICENSE +License-File: LICENSE Description: Haskell tutorial for the Apache Thrift RPC system. Requires the use of the thrift code generator. diff --git a/tutorial/py/PythonClient.py b/tutorial/py/PythonClient.py index c659716e1c6..a6c19664197 100755 --- a/tutorial/py/PythonClient.py +++ b/tutorial/py/PythonClient.py @@ -81,6 +81,7 @@ def main(): # Close! transport.close() + if __name__ == '__main__': try: main() diff --git a/tutorial/py/PythonServer.py b/tutorial/py/PythonServer.py index 7c590ba1c09..e6421ef0815 100755 --- a/tutorial/py/PythonServer.py +++ b/tutorial/py/PythonServer.py @@ -82,6 +82,7 @@ def getStruct(self, key): def zip(self): print('zip()') + if __name__ == '__main__': handler = CalculatorHandler() processor = Calculator.Processor(handler)