[thrift] branch ci/pypi-automation updated (f15550d1a -> ab64f3e26)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git omit f15550d1a THRIFT-5546: automate pypi publishing [ci skip] new ab64f3e26 THRIFT-5546: automate pypi publishing [ci skip] This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (f15550d1a) \ N -- N -- N refs/heads/ci/pypi-automation (ab64f3e26) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: doc/ReleaseManagement.md | 13 - 1 file changed, 12 insertions(+), 1 deletion(-)
[thrift] 01/01: THRIFT-5546: automate pypi publishing [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git commit ab64f3e264c684675dda85a709b301a424c699cc Author: James E. King III AuthorDate: Mon Apr 4 13:17:57 2022 -0400 THRIFT-5546: automate pypi publishing [ci skip] When a pre-release is created on GitHub for the repo it will publish to the TestPyPI service, and if that pre-release is promoted to a release, it will publish to the PyPI (real) service. --- .github/actions/cloudtruth/configure-action | 1 + .github/actions/pypa/gh-action-pypi-publish | 1 + .github/workflows/publish.yml | 52 + .gitmodules | 6 doc/ReleaseManagement.md| 13 +++- 5 files changed, 72 insertions(+), 1 deletion(-) diff --git a/.github/actions/cloudtruth/configure-action b/.github/actions/cloudtruth/configure-action new file mode 16 index 0..9ec7a0ab1 --- /dev/null +++ b/.github/actions/cloudtruth/configure-action @@ -0,0 +1 @@ +Subproject commit 9ec7a0ab1c6e1bf92620c4a1b3fd38c614dc1659 diff --git a/.github/actions/pypa/gh-action-pypi-publish b/.github/actions/pypa/gh-action-pypi-publish new file mode 16 index 0..717ba43cf --- /dev/null +++ b/.github/actions/pypa/gh-action-pypi-publish @@ -0,0 +1 @@ +Subproject commit 717ba43cfbb0387f6ce311b169a825772f54d295 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0..5bc73a014 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,52 @@ +# +# Apache Thrift release publishing workflow +# +# When a release is created in GitHub, it should be created in pre-release +# mode first. This will trigger a "prereleased" event which will cause this +# workflow to run and publish packages to various package managers. You +# must check the Actions tab in GitHub to see the result of the workflow. +# +# github.event.action is either "prereleased" or "released" and corresponds +# with a named environment in CloudTruth +# +# | Destinations +# Language | Prereleased | Released +# --+---+--- +# py| test.pypi.org | pypi.org +# +--- +name: Publish + +on: + release: +types: + - prereleased + - released + +permissions: + contents: read + +jobs: + pypi: +runs-on: ubuntu-latest +timeout-minutes: 5 +steps: + - uses: actions/checkout@v3 +with: + persist-credentials: false + submodules: recursive + - uses: actions/setup-python@v3 + - name: Get configuration and secrets from CloudTruth +uses: ./.github/actions/cloudtruth/configure-action +with: + apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}" + project: "${{ github.repository }}" + environment: "${{ github.event.action }}" + - name: build sdist +run: "cd lib/py && python setup.py sdist" + - name: Publish to PyPI +uses: ./.github/actions/pypa/gh-action-pypi-publish +with: + password: "${{ env.PYPI_PASSWORD }}" + repository_url: "${{ env.PYPI_REPOSITORY }}" + packages_dir: lib/py/dist diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0..bbaf357b3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule ".github/actions/cloudtruth/configure-action"] + path = .github/actions/cloudtruth/configure-action + url = https://github.com/cloudtruth/configure-action +[submodule ".github/actions/pypa/gh-action-pypi-publish"] + path = .github/actions/pypa/gh-action-pypi-publish + url = https://github.com/pypa/gh-action-pypi-publish diff --git a/doc/ReleaseManagement.md b/doc/ReleaseManagement.md index e659ad470..83e07aa7f 100644 --- a/doc/ReleaseManagement.md +++ b/doc/ReleaseManagement.md @@ -333,7 +333,18 @@ Voting on the development mailing list provides additional benefits (wisdom from **NOTE:** If you get the error "gpg failed to sign the data" when tagging, try this fix: ```export GPG_TTY=$(tty)```. Alternatively, it may be necessary to specify the ```-u ``` as an additional argument. -1. Create a new release from the [GitHub Tags Page](https://github.com/apache/thrift/tags). Attach the statically built Windows thrift compiler as a binary here. +1. Create a new release from the [GitHub Tags Page](https://github.com/apache/thrift/tags). + +Attach the statically built Windows thrift compiler as a binary here. + +You may find it useful to use the button that automates release notes. + +We have *some* automation in place to get packages published to various package managers. To leverage this: + +- Please first create a "pre-release"
[thrift] tag ci/pypi-automation-test-4 created (now f15550d1a)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag ci/pypi-automation-test-4 in repository https://gitbox.apache.org/repos/asf/thrift.git at f15550d1a (commit) No new revisions were added by this update.
[thrift] 01/01: THRIFT-5546: automate pypi publishing [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git commit f15550d1add5c486a1ae0bb7287d0c62f38f82bf Author: James E. King III AuthorDate: Mon Apr 4 13:17:57 2022 -0400 THRIFT-5546: automate pypi publishing [ci skip] When a pre-release is created on GitHub for the repo it will publish to the TestPyPI service, and if that pre-release is promoted to a release, it will publish to the PyPI (real) service. --- .github/actions/cloudtruth/configure-action | 1 + .github/actions/pypa/gh-action-pypi-publish | 1 + .github/workflows/publish.yml | 52 + .gitmodules | 6 4 files changed, 60 insertions(+) diff --git a/.github/actions/cloudtruth/configure-action b/.github/actions/cloudtruth/configure-action new file mode 16 index 0..9ec7a0ab1 --- /dev/null +++ b/.github/actions/cloudtruth/configure-action @@ -0,0 +1 @@ +Subproject commit 9ec7a0ab1c6e1bf92620c4a1b3fd38c614dc1659 diff --git a/.github/actions/pypa/gh-action-pypi-publish b/.github/actions/pypa/gh-action-pypi-publish new file mode 16 index 0..717ba43cf --- /dev/null +++ b/.github/actions/pypa/gh-action-pypi-publish @@ -0,0 +1 @@ +Subproject commit 717ba43cfbb0387f6ce311b169a825772f54d295 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0..5bc73a014 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,52 @@ +# +# Apache Thrift release publishing workflow +# +# When a release is created in GitHub, it should be created in pre-release +# mode first. This will trigger a "prereleased" event which will cause this +# workflow to run and publish packages to various package managers. You +# must check the Actions tab in GitHub to see the result of the workflow. +# +# github.event.action is either "prereleased" or "released" and corresponds +# with a named environment in CloudTruth +# +# | Destinations +# Language | Prereleased | Released +# --+---+--- +# py| test.pypi.org | pypi.org +# +--- +name: Publish + +on: + release: +types: + - prereleased + - released + +permissions: + contents: read + +jobs: + pypi: +runs-on: ubuntu-latest +timeout-minutes: 5 +steps: + - uses: actions/checkout@v3 +with: + persist-credentials: false + submodules: recursive + - uses: actions/setup-python@v3 + - name: Get configuration and secrets from CloudTruth +uses: ./.github/actions/cloudtruth/configure-action +with: + apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}" + project: "${{ github.repository }}" + environment: "${{ github.event.action }}" + - name: build sdist +run: "cd lib/py && python setup.py sdist" + - name: Publish to PyPI +uses: ./.github/actions/pypa/gh-action-pypi-publish +with: + password: "${{ env.PYPI_PASSWORD }}" + repository_url: "${{ env.PYPI_REPOSITORY }}" + packages_dir: lib/py/dist diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0..bbaf357b3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule ".github/actions/cloudtruth/configure-action"] + path = .github/actions/cloudtruth/configure-action + url = https://github.com/cloudtruth/configure-action +[submodule ".github/actions/pypa/gh-action-pypi-publish"] + path = .github/actions/pypa/gh-action-pypi-publish + url = https://github.com/pypa/gh-action-pypi-publish
[thrift] branch ci/pypi-automation updated (bde8a84da -> f15550d1a)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git omit bde8a84da THRIFT-5546: automate pypi publishing [ci skip] new f15550d1a THRIFT-5546: automate pypi publishing [ci skip] This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (bde8a84da) \ N -- N -- N refs/heads/ci/pypi-automation (f15550d1a) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .github/workflows/publish.yml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)
[thrift] tag ci/pypi-automation-test-3 created (now bde8a84da)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag ci/pypi-automation-test-3 in repository https://gitbox.apache.org/repos/asf/thrift.git at bde8a84da (commit) No new revisions were added by this update.
[thrift] tag ci/pypi-automation-test-2 created (now bde8a84da)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag ci/pypi-automation-test-2 in repository https://gitbox.apache.org/repos/asf/thrift.git at bde8a84da (commit) No new revisions were added by this update.
[thrift] 01/01: THRIFT-5546: automate pypi publishing [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git commit bde8a84da584b2cd37ad19625738595491259211 Author: James E. King III AuthorDate: Mon Apr 4 13:17:57 2022 -0400 THRIFT-5546: automate pypi publishing [ci skip] When a pre-release is created on GitHub for the repo it will publish to the TestPyPI service, and if that pre-release is promoted to a release, it will publish to the PyPI (real) service. --- .github/actions/cloudtruth/configure-action | 1 + .github/actions/pypa/gh-action-pypi-publish | 1 + .github/workflows/publish.yml | 51 + .gitmodules | 6 4 files changed, 59 insertions(+) diff --git a/.github/actions/cloudtruth/configure-action b/.github/actions/cloudtruth/configure-action new file mode 16 index 0..9ec7a0ab1 --- /dev/null +++ b/.github/actions/cloudtruth/configure-action @@ -0,0 +1 @@ +Subproject commit 9ec7a0ab1c6e1bf92620c4a1b3fd38c614dc1659 diff --git a/.github/actions/pypa/gh-action-pypi-publish b/.github/actions/pypa/gh-action-pypi-publish new file mode 16 index 0..717ba43cf --- /dev/null +++ b/.github/actions/pypa/gh-action-pypi-publish @@ -0,0 +1 @@ +Subproject commit 717ba43cfbb0387f6ce311b169a825772f54d295 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0..b58b4c5eb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,51 @@ +# +# Apache Thrift release publishing workflow +# +# When a release is created in GitHub, it should be created in pre-release +# mode first. This will trigger a "prereleased" event which will cause this +# workflow to run and publish packages to various package managers. You +# must check the Actions tab in GitHub to see the result of the workflow. +# +# github.event.action is either "prereleased" or "released" and corresponds +# with a named environment in CloudTruth +# +# | Destinations +# Language | Prereleased | Released +# --+---+--- +# py| test.pypi.org | pypi.org +# +--- +name: Publish + +on: + release: +types: + - prereleased + - released + +permissions: + contents: read + +jobs: + pypi: +runs-on: ubuntu-latest +timeout-minutes: 5 +steps: + - uses: actions/checkout@v3 +with: + persist-credentials: false + submodules: recursive + - uses: actions/setup-python@v3 + - uses: ./.github/actions/cloudtruth/configure-action +with: + apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}" + project: "${{ github.repository }}" + environment: "${{ github.event.action }}" + - name: build sdist +run: python setup.py sdist + - name: Publish to PyPI +uses: ./.github/actions/pypa/gh-action-pypi-publish +with: + user: "${{ env.PYPI_USERNAME }}" + password: "${{ env.PYPI_PASSWORD }}" + repository_url: "${{ env.PYPI_REPOSITORY }}" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0..bbaf357b3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule ".github/actions/cloudtruth/configure-action"] + path = .github/actions/cloudtruth/configure-action + url = https://github.com/cloudtruth/configure-action +[submodule ".github/actions/pypa/gh-action-pypi-publish"] + path = .github/actions/pypa/gh-action-pypi-publish + url = https://github.com/pypa/gh-action-pypi-publish
[thrift] branch ci/pypi-automation updated (a9294bb20 -> bde8a84da)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git omit a9294bb20 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip] new bde8a84da THRIFT-5546: automate pypi publishing [ci skip] This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a9294bb20) \ N -- N -- N refs/heads/ci/pypi-automation (bde8a84da) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .github/actions/cloudtruth/configure-action | 1 + .github/actions/pypa/gh-action-pypi-publish | 1 + .github/workflows/publish.yml | 13 + .gitmodules | 6 ++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 16 .github/actions/cloudtruth/configure-action create mode 16 .github/actions/pypa/gh-action-pypi-publish create mode 100644 .gitmodules
[thrift] tag ci/pypi-automation-test-1 created (now a9294bb20)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag ci/pypi-automation-test-1 in repository https://gitbox.apache.org/repos/asf/thrift.git at a9294bb20 (commit) No new revisions were added by this update.
[thrift] branch ci/pypi-automation created (now a9294bb20)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git at a9294bb20 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip] This branch includes the following new commits: new a9294bb20 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip] The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[thrift] 01/01: THRIFT-5546 automate pypi publishing on pre-release and release [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch ci/pypi-automation in repository https://gitbox.apache.org/repos/asf/thrift.git commit a9294bb20a058079b8d7812febeeb6f4edc3eae3 Author: James E. King III AuthorDate: Mon Apr 4 13:17:57 2022 -0400 THRIFT-5546 automate pypi publishing on pre-release and release [ci skip] --- .github/workflows/publish.yml | 46 +++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0..d4468abfe --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +# +# Apache Thrift release publishing workflow +# +# When a release is created in GitHub, it should be created in pre-release +# mode first. This will trigger a "prereleased" event which will cause this +# workflow to run and publish packages to various package managers. You +# must check the Actions tab in GitHub to see the result of the workflow. +# +# github.event.action is either "prereleased" or "released" and corresponds +# with a named environment in CloudTruth +# +# | Destinations +# Language | Prereleased | Released +# --+---+--- +# py| test.pypi.org | pypi.org +# +--- +name: Publish + +on: + release: +types: + - prereleased + - released + +jobs: + pypi: +runs-on: ubuntu-latest +timeout-minutes: 5 + +steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: cloudtruth/configure-action@v2 +with: + apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}" + project: "${{ github.repository }}" + environment: "${{ github.event.action }}" + - name: build sdist +run: python setup.py sdist + - name: "Publish to PyPI" +uses: pypa/gh-action-pypi-publish@release/v1 +with: + user: "${{ env.PYPI_USERNAME }}" + password: "${{ env.PYPI_PASSWORD }}" + repository_url: "${{ env.PYPI_REPOSITORY }}"
[thrift] branch master updated: fix perl packaging issue
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new cb808fc fix perl packaging issue cb808fc is described below commit cb808fcb79d03028c6138891381689e1ef4e4a94 Author: James E. King III AuthorDate: Sun Sep 26 07:45:25 2021 -0400 fix perl packaging issue --- lib/perl/build-cpan-dist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/perl/build-cpan-dist.sh b/lib/perl/build-cpan-dist.sh index c92fd76..ac0ff0b 100755 --- a/lib/perl/build-cpan-dist.sh +++ b/lib/perl/build-cpan-dist.sh @@ -52,5 +52,5 @@ cp -pr ../gen-perl . cp -pr ../gen-perl2 . perl ../tools/FixupDist.pl cd .. -tar cvzf --hard-dereference $DISTFILE $DISTDIR +tar cvzf $DISTFILE $DISTDIR rm -r $DISTDIR
[thrift] branch master updated: Initialisation of immutable data in static constructors has been deprecated. They now need to be initialised in shared static constructors.
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 74d6d9d Initialisation of immutable data in static constructors has been deprecated. They now need to be initialised in shared static constructors. 74d6d9d is described below commit 74d6d9d3d6400d1672f48b4acf5bc7d1260ad96d Author: Laeeth Isharc AuthorDate: Mon Aug 5 13:23:29 2019 +0100 Initialisation of immutable data in static constructors has been deprecated. They now need to be initialised in shared static constructors. This change brings the generator for D up to date with the latest version of the compiler, but it should continue to work with older versions. --- compiler/cpp/src/thrift/generate/t_d_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cpp/src/thrift/generate/t_d_generator.cc b/compiler/cpp/src/thrift/generate/t_d_generator.cc index b844204..65f4b44 100644 --- a/compiler/cpp/src/thrift/generate/t_d_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_d_generator.cc @@ -145,7 +145,7 @@ protected: indent(f_consts) << "immutable(" << render_type_name(type) << ") " << name << ";" << endl; } - f_consts << endl << "static this() {" << endl; + f_consts << endl << "shared static this() {" << endl; indent_up(); bool first = true;
[thrift] branch master updated: Add pointer helpers for missing types
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new bb311a7 Add pointer helpers for missing types bb311a7 is described below commit bb311a772e0a6fc142387abc3489a103662ea187 Author: Craig Wickesser AuthorDate: Fri Jul 19 10:21:51 2019 -0400 Add pointer helpers for missing types --- lib/go/thrift/pointerize.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/go/thrift/pointerize.go b/lib/go/thrift/pointerize.go index 8d6b2c2..fb564ea 100644 --- a/lib/go/thrift/pointerize.go +++ b/lib/go/thrift/pointerize.go @@ -41,6 +41,8 @@ package thrift func Float32Ptr(v float32) *float32 { return } func Float64Ptr(v float64) *float64 { return } func IntPtr(v int) *int { return } +func Int8Ptr(v int8) *int8 { return } +func Int16Ptr(v int16) *int16 { return } func Int32Ptr(v int32) *int32 { return } func Int64Ptr(v int64) *int64 { return } func StringPtr(v string) *string{ return }
[thrift] branch master updated: Added an Ubuntu Disco 19.04 dockerfile for testing [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 90a0446 Added an Ubuntu Disco 19.04 dockerfile for testing [ci skip] 90a0446 is described below commit 90a044659878f3581aba922dbde1ed4bd7918678 Author: James E. King III AuthorDate: Tue Jul 23 22:50:28 2019 -0400 Added an Ubuntu Disco 19.04 dockerfile for testing [ci skip] --- build/docker/ubuntu-disco/Dockerfile | 285 +++ 1 file changed, 285 insertions(+) diff --git a/build/docker/ubuntu-disco/Dockerfile b/build/docker/ubuntu-disco/Dockerfile new file mode 100644 index 000..b017c4e --- /dev/null +++ b/build/docker/ubuntu-disco/Dockerfile @@ -0,0 +1,285 @@ +# 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 Disco +# with some updated packages. +# + +FROM buildpack-deps:disco-scm +MAINTAINER Apache Thrift +ENV DEBIAN_FRONTEND noninteractive + +### Add apt repos + +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 + +# 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 + +# dotnet (netcore) +RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ +wget -q -O /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list && \ +chown root:root /etc/apt/trusted.gpg.d/microsoft.gpg && \ +chown root:root /etc/apt/sources.list.d/microsoft-prod.list + +# erlang +RUN wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | apt-key add - && \ +echo "deb https://packages.erlang-solutions.com/ubuntu disco contrib" | tee /etc/apt/sources.list.d/erlang.list + +# node.js +RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ +echo "deb https://deb.nodesource.com/node_10.x disco main" | tee /etc/apt/sources.list.d/nodesource.list + +### install general dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ +`# General dependencies` \ + bash-completion \ + bison \ + build-essential \ + clang \ + cmake \ + debhelper \ + flex \ + gdb \ + libasound2 \ + libatk-bridge2.0-0 \ + libgtk-3-0 \ + llvm \ + ninja-build \ + pkg-config \ + unzip \ + valgrind \ + vim +ENV PATH /usr/lib/llvm-6.0/bin:$PATH + +# lib/as3 (ActionScript) +RUN mkdir -p /usr/local/adobe/flex/4.6 && \ +cd /usr/local/adobe/flex/4.6 && \ +wget -q "http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip; && \ +unzip flex_sdk_4.6.zip +ENV FLEX_HOME /usr/local/adobe/flex/4.6 + +RUN apt-get install -y --no-install-recommends \ +`# C++ dependencies` \ + 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 + +ENV SBCL_VERSION 1.5.3 +RUN \ +`# Common Lisp (sbcl) dependencies` \ +curl --version && \ +curl -o sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 -J -L https://sourceforge.net/projects/sbcl/files/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2/download?use_mirror=managedway# && \ +tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ +cd sbcl-${SBCL_VERSION}-x86-64-linux && \ +./install.sh && \ +sbcl --version && \ +cd .. && \ +rm -rf sbcl* + +ENV D_VERSION 2.087.0 +ENV DMD_DEB dmd_2.087.0-0_amd64.deb +RUN \ +`# D dependencies` \ +wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \ +dpkg --install ${DMD_DEB} && \ +rm -f
[thrift] branch master updated (49aab65 -> f34b50f)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 49aab65 Update the versioning description [ci skip] add f34b50f Add a coverity scan utility build script [ci skip] No new revisions were added by this update. Summary of changes: build/docker/scripts/coverity.sh | 40 1 file changed, 40 insertions(+) create mode 100755 build/docker/scripts/coverity.sh
[thrift] branch master updated: Update the versioning description [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 49aab65 Update the versioning description [ci skip] 49aab65 is described below commit 49aab657b95e0b0955cb487fefb794ae2f83fd98 Author: James E. King III AuthorDate: Thu Jul 11 06:55:28 2019 -0400 Update the versioning description [ci skip] --- doc/ReleaseManagement.md | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/ReleaseManagement.md b/doc/ReleaseManagement.md index ce0744b..362fd83 100644 --- a/doc/ReleaseManagement.md +++ b/doc/ReleaseManagement.md @@ -8,12 +8,13 @@ It is important to note here that Apache Thrift is designed for version interope ### Versioning -Apache Thrift and the vast majority of package management systems out there conform to the [SemVer 2.0](https://semver.org/spec/v2.0.0.html) version numbering specification. +Apache Thrift and the vast majority of package management systems out there conform to the [SemVer 2.0](https://semver.org/spec/v2.0.0.html) version numbering specification. Apache Thrift uses the following versioning rules: -In terms of releases, the important version numbers for Apache Thrift are the major and minor. The patch number is used in the following cases: +- *major* is currently always zero; +- *minor* is increased for each release cycle; +- *patch* is increased for patch builds between release cycles to address critical defect, security, or packaging issues -1. There were language-specific critical defects or packaging issues. -1. There was something horribly and fundamentally wrong with a x.x.0 release. +Further, if there are only packaging changes for a single third-party distribution point to correct an issue, the major.minor.patch may remain the same while adding a suffix compatible with that distribution point, for example "0.12.0.1" for nuget, or "0.12.0-1" for maven. External Package Patches
[thrift] branch master updated: THRIFT-4849: Do not Ignore InterruptedException
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 286eee1 THRIFT-4849: Do not Ignore InterruptedException 286eee1 is described below commit 286eee16b147a302ddc7b10740c5e5401ebbec17 Author: Beluga Behr AuthorDate: Wed Apr 17 09:33:58 2019 -0400 THRIFT-4849: Do not Ignore InterruptedException --- lib/java/src/org/apache/thrift/server/TNonblockingServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java index 2358c63..79610b0 100644 --- a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java +++ b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java @@ -86,8 +86,8 @@ public class TNonblockingServer extends AbstractNonblockingServer { try { selectAcceptThread_.join(); } catch (InterruptedException e) { - // for now, just silently ignore. technically this means we'll have less of - // a graceful shutdown as a result. + LOGGER.debug("Interrupted while waiting for accept thread", e); + Thread.currentThread().interrupt(); } }
[thrift] branch master updated: THRIFT-4844: createConnection ignores connect_timeout option
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 234e80e THRIFT-4844: createConnection ignores connect_timeout option 234e80e is described below commit 234e80e1b9acb1bc778c7adfaa6cb695d922d5f0 Author: fmalaguti AuthorDate: Thu Apr 4 15:05:26 2019 +0200 THRIFT-4844: createConnection ignores connect_timeout option --- lib/nodejs/lib/thrift/connection.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js index 72ecb69..25e34ed 100644 --- a/lib/nodejs/lib/thrift/connection.js +++ b/lib/nodejs/lib/thrift/connection.js @@ -256,7 +256,11 @@ Connection.prototype.connection_gone = function () { }; exports.createConnection = function(host, port, options) { - var stream = net.createConnection(port, host); + var stream = net.createConnection( { +port: port, +host: host, +timeout: options.connect_timeout || options.timeout || 0 + }); var connection = new Connection(stream, options); connection.host = host; connection.port = port;
[thrift] 02/02: THRIFT-4805: Fixed readme files
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 178891f7d62adc98d1d1e661a0c26dd6a67ee50b Author: James E. King III AuthorDate: Mon Jul 8 06:49:15 2019 -0400 THRIFT-4805: Fixed readme files --- CHANGES.md | 2 +- lib/java/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9f2d1e4..9d13d95 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,7 +25,7 @@ - [THRIFT-4709](https://issues.apache.org/jira/browse/THRIFT-4709) - java: changes to UTF-8 handling require JDK 1.7 at a minimum - [THRIFT-4712](https://issues.apache.org/jira/browse/THRIFT-4712) - java: class org.apache.thrift.ShortStack is no longer public - [THRIFT-4725](https://issues.apache.org/jira/browse/THRIFT-4725) - java: change return type signature of 'process' methods -- [THRIFT-4805](https://issues.apache.org/jira/browse/THRIFT-4805) - java: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE +- [THRIFT-4805](https://issues.apache.org/jira/browse/THRIFT-4805) - java: replaced TSaslTransportException with TTransportException - [THRIFT-4675](https://issues.apache.org/jira/browse/THRIFT-4675) - js: now uses node-int64 for 64 bit integer constants - [THRIFT-4841](https://issues.apache.org/jira/browse/THRIFT-4841) - delphi: old THTTPTransport is now TMsxmlHTTPTransport - [THRIFT-4536](https://issues.apache.org/jira/browse/THRIFT-4536) - rust: convert from try-from crate to rust stable (1.34+), re-export ordered-float diff --git a/lib/java/README.md b/lib/java/README.md index 78e6445..c8ec1c3 100644 --- a/lib/java/README.md +++ b/lib/java/README.md @@ -168,10 +168,10 @@ http://gradle.org/ # Breaking Changes -## 1.0 +## 0.13.0 * The signature of the 'process' method in TAsyncProcessor and TProcessor has -changed to remove a boolean return type and to instead rely on Exceptions. +changed to remove the boolean return type and instead rely on Exceptions. * Per THRIFT-4805, TSaslTransportException has been removed. The same condition is now covered by TTansportException, where `TTransportException.getType() == END_OF_FILE`.
[thrift] 01/02: THRIFT-4805: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit c35ed736d26a1dfd8965ae197a67904ed9b4fba3 Author: Mithun RK AuthorDate: Mon Mar 11 14:14:05 2019 -0700 THRIFT-4805: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE Two fixes here: 1. Additional logic to properly catch and handle TTransportException. Currently, T(SASL)TransportException gets caught and handled in the wrong catch-block. 2. The fix for THRIFT-3769 mutes _all_ TTransportExceptions in TThreadPoolServer. This might mute legitimate failures. The intent of THRIFT-3769 (and THRIFT-2268) was to mute the noise caused by TTransportException.END_OF_FILE. This commit lets legitimate failures to be bubbled upwards. --- CHANGES.md | 1 + lib/java/README.md | 5 ++- .../apache/thrift/server/TThreadPoolServer.java| 36 -- .../apache/thrift/transport/TSaslTransport.java| 17 ++--- .../thrift/transport/TSaslTransportException.java | 43 -- 5 files changed, 40 insertions(+), 62 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index df73121..9f2d1e4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,7 @@ - [THRIFT-4709](https://issues.apache.org/jira/browse/THRIFT-4709) - java: changes to UTF-8 handling require JDK 1.7 at a minimum - [THRIFT-4712](https://issues.apache.org/jira/browse/THRIFT-4712) - java: class org.apache.thrift.ShortStack is no longer public - [THRIFT-4725](https://issues.apache.org/jira/browse/THRIFT-4725) - java: change return type signature of 'process' methods +- [THRIFT-4805](https://issues.apache.org/jira/browse/THRIFT-4805) - java: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE - [THRIFT-4675](https://issues.apache.org/jira/browse/THRIFT-4675) - js: now uses node-int64 for 64 bit integer constants - [THRIFT-4841](https://issues.apache.org/jira/browse/THRIFT-4841) - delphi: old THTTPTransport is now TMsxmlHTTPTransport - [THRIFT-4536](https://issues.apache.org/jira/browse/THRIFT-4536) - rust: convert from try-from crate to rust stable (1.34+), re-export ordered-float diff --git a/lib/java/README.md b/lib/java/README.md index 7dca456..78e6445 100644 --- a/lib/java/README.md +++ b/lib/java/README.md @@ -170,9 +170,12 @@ http://gradle.org/ ## 1.0 -The signature of the 'process' method in TAsyncProcessor and TProcessor has +* The signature of the 'process' method in TAsyncProcessor and TProcessor has changed to remove a boolean return type and to instead rely on Exceptions. +* Per THRIFT-4805, TSaslTransportException has been removed. The same condition +is now covered by TTansportException, where `TTransportException.getType() == END_OF_FILE`. + ## 0.12.0 The access modifier of the AutoExpandingBuffer class has been changed from diff --git a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java index db1ecb9..87e8733 100644 --- a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java +++ b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java @@ -19,6 +19,8 @@ package org.apache.thrift.server; +import java.util.Arrays; +import java.util.List; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; @@ -29,14 +31,12 @@ import java.util.concurrent.TimeUnit; import org.apache.thrift.TException; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSaslTransportException; import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - /** * Server which uses Java's built in ThreadPool management to spawn off * a worker pool that @@ -312,21 +312,13 @@ public class TThreadPoolServer extends TServer { } processor.process(inputProtocol, outputProtocol); } - } catch (TException tx) { -LOGGER.error("Thrift error occurred during processing of message.", tx); } catch (Exception x) { // We'll usually receive RuntimeException types here // Need to unwrap to ascertain real causing exception before we choose to ignore -Throwable realCause = x.getCause(); // Ignore err-logging all transport-level/type exceptions -if ((realCause != null && realCause instanceof TTransportException) -|| (x instanceof TTransportException)) { - LOGGER.debug( - "Received TTransportException during processing of message. Ignor
[thrift] branch master updated (08a6eb6 -> 178891f)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 08a6eb6 THRIFT-4902: Swift 4 and 5 compatibility (#1827) new c35ed73 THRIFT-4805: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE new 178891f THRIFT-4805: Fixed readme files The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGES.md | 1 + lib/java/README.md | 9 +++-- .../apache/thrift/server/TThreadPoolServer.java| 36 -- .../apache/thrift/transport/TSaslTransport.java| 17 ++--- .../thrift/transport/TSaslTransportException.java | 43 -- 5 files changed, 42 insertions(+), 64 deletions(-) delete mode 100644 lib/java/src/org/apache/thrift/transport/TSaslTransportException.java
[thrift] branch master updated: THRIFT-4902: Swift 4 and 5 compatibility (#1827)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 08a6eb6 THRIFT-4902: Swift 4 and 5 compatibility (#1827) 08a6eb6 is described below commit 08a6eb6e1f21aa15682e414e124d7ee1a51a39c7 Author: Antoine Cœur AuthorDate: Mon Jul 8 18:42:09 2019 +0800 THRIFT-4902: Swift 4 and 5 compatibility (#1827) --- .travis.yml | 23 +- Thrift.podspec | 13 ++--- lib/swift/Sources/TBinaryProtocol.swift | 30 ++--- lib/swift/Sources/TCompactProtocol.swift| 10 +++--- lib/swift/Sources/TFramedTransport.swift| 8 lib/swift/Sources/TMap.swift| 8 ++-- lib/swift/Sources/TProtocol.swift | 13 ++--- lib/swift/Sources/TSSLSocketTransport.swift | 15 +++ lib/swift/Sources/TSet.swift| 2 +- lib/swift/Sources/TSocketServer.swift | 1 - lib/swift/Sources/TSocketTransport.swift| 16 ++- lib/swift/Sources/TStreamTransport.swift| 15 +++ lib/swift/Sources/TStruct.swift | 8 13 files changed, 96 insertions(+), 66 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a399a6..400cfa1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,7 +148,28 @@ jobs: env: - JOB="Coverity Scan" - SCRIPT="covscan.sh" - + +# - phase: swift +# We lint the podspec +- os: osx + osx_image: xcode10.1 + language: swift + script: +- gem update cocoapods +- pod lib lint --allow-warnings --swift-version=3 + env: +- JOB="pod lib lint" + +- os: osx + osx_image: xcode10.2 + language: swift + script: +- gem update cocoapods +- pod lib lint --allow-warnings --swift-version=4.0 +- pod lib lint --allow-warnings --swift-version=4.2 +- pod lib lint --allow-warnings --swift-version=5.0 + env: +- JOB="pod lib lint" ### - phase: osx -- # disabled due to the time delays it imposes on build jobs diff --git a/Thrift.podspec b/Thrift.podspec index cb1c9b2..4c8fa68 100644 --- a/Thrift.podspec +++ b/Thrift.podspec @@ -1,16 +1,15 @@ Pod::Spec.new do |s| - s.name = "Thrift-swift3" - s.version = "0.13.0" + s.name = 'Thrift' + s.version = '0.13.0' s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC." s.description = <<-DESC The Apache Thrift scalable cross-language software framework for networked services development combines a software stack with a code generation engine to build services that work efficiently and seamlessly between many programming languages. DESC - s.homepage = "http://thrift.apache.org; + s.homepage = 'https://thrift.apache.org' s.license = { :type => 'Apache License, Version 2.0', :url => 'https://www.apache.org/licenses/LICENSE-2.0' } - s.author= { "Apache Thrift Developers" => "d...@thrift.apache.org" } + s.author= { 'Apache Thrift Developers' => 'd...@thrift.apache.org' } s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.10' - s.requires_arc = true - s.source= { :git => "https://github.com/apache/thrift.git;, :tag => "v0.13.0" } - s.source_files = "lib/swift/Sources/*.swift" + s.source= { :git => 'https://github.com/apache/thrift.git', :tag => 'v0.13.0' } + s.source_files = 'lib/swift/Sources/*.swift' end diff --git a/lib/swift/Sources/TBinaryProtocol.swift b/lib/swift/Sources/TBinaryProtocol.swift index a97249a..85acce0 100644 --- a/lib/swift/Sources/TBinaryProtocol.swift +++ b/lib/swift/Sources/TBinaryProtocol.swift @@ -325,7 +325,7 @@ public class TBinaryProtocol: TProtocol { } public func write(_ value: UInt8) throws { -let buff = Data(bytes: [value]) +let buff = Data([value]) try ProtocolTransportTry(error: TProtocolError(message: "Transport write failed")) { try self.transport.write(data: buff) @@ -334,8 +334,8 @@ public class TBinaryProtocol: TProtocol { public func write(_ value: Int16) throws { var buff = Data() -buff.append(Data(bytes: [UInt8(0xff & (value >> 8))])) -buff.append(Data(bytes: [UInt8(0xff & (value))])) +buff.append(Data([UInt8(0xff & (value >> 8))])) +buff.append(Data([UInt8(0xff & (value))])) try ProtocolTransportTry(error:
[thrift] branch master updated: Fix a typo in README.md.
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new f943564 Fix a typo in README.md. f943564 is described below commit f9435643d758f9b08937399abe7f721ec7d65fcf Author: Matt Kantor AuthorDate: Thu Jul 4 11:55:26 2019 -0700 Fix a typo in README.md. The crate is named `ordered-float`, not `ordered_float`. --- tutorial/rs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/rs/README.md b/tutorial/rs/README.md index 8ad39ad..166854b 100644 --- a/tutorial/rs/README.md +++ b/tutorial/rs/README.md @@ -8,7 +8,7 @@ ```toml thrift = "x.y.z" # x.y.z is the version of the thrift compiler -ordered_float = "0.3.0" +ordered-float = "0.3.0" try_from = "0.2.0" ```
[thrift] branch master updated (1a2dee6 -> 08fea16)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 1a2dee6 Use THRIFT_WRITE instead of ::write in TFileTransport.cpp new 93ff9b0 Update language levels, fix erlang and rust in CI new 3131fe9 THRIFT-4904: Fix python unit test errors and exception escapes new 08fea16 Mark some csharp-erl, erl-csharp ssl tests as known issues. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore| 3 +- LANGUAGES.md | 22 +- build/docker/README.md| 32 +- build/docker/ubuntu-bionic/Dockerfile | 40 +- build/docker/ubuntu-xenial/Dockerfile | 40 +- lib/d/README.md | 19 +- lib/d/test/Makefile.am| 19 +- lib/d/test/async_test.d | 8 +- lib/d/test/async_test_runner.sh | 7 +- lib/d/test/openssl.test.cnf | 14 - lib/d/test/thrift_test_server.d | 5 +- lib/js/package-lock.json | 861 +++--- lib/py/src/transport/TSSLSocket.py| 6 +- lib/py/src/transport/TSocket.py | 27 +- lib/py/src/transport/TTransport.py| 3 +- lib/py/test/test_sslsocket.py | 10 +- lib/rs/Cargo.toml | 6 +- lib/rs/src/errors.rs | 3 - lib/rs/src/protocol/stored.rs | 1 - lib/rs/src/server/mod.rs | 1 - lib/rs/src/server/threaded.rs | 1 - lib/rs/test/Cargo.toml| 4 +- test/features/tls.sh | 7 +- test/known_failures_Linux.json| 38 +- test/rs/Cargo.toml| 8 +- test/tests.json | 12 +- tutorial/rs/Cargo.toml| 6 +- 27 files changed, 230 insertions(+), 973 deletions(-) delete mode 100644 lib/d/test/openssl.test.cnf
[thrift] 03/03: Mark some csharp-erl, erl-csharp ssl tests as known issues.
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 08fea1640e3585b74bbbd9ec53db798df7fe1656 Author: James E. King III AuthorDate: Sat Jul 6 06:20:32 2019 -0400 Mark some csharp-erl, erl-csharp ssl tests as known issues. The latest ssl (9.3) in erl does not support TLSv1.0 or TLSv1.1 by default and cross tests are failing. Since csharp was deprecated in favor of netstd, ignoring it. --- test/known_failures_Linux.json | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/test/known_failures_Linux.json b/test/known_failures_Linux.json index 9f97754..dd6195a 100644 --- a/test/known_failures_Linux.json +++ b/test/known_failures_Linux.json @@ -67,6 +67,9 @@ "cpp-nodejs_compact_http-domain", "cpp-nodejs_compact_http-ip", "cpp-nodejs_compact_http-ip-ssl", + "cpp-nodejs_header_http-domain", + "cpp-nodejs_header_http-ip", + "cpp-nodejs_header_http-ip-ssl", "cpp-nodejs_json_http-domain", "cpp-nodejs_json_http-ip", "cpp-nodejs_json_http-ip-ssl", @@ -76,15 +79,12 @@ "cpp-nodejs_multic-compact_http-domain", "cpp-nodejs_multic-compact_http-ip", "cpp-nodejs_multic-compact_http-ip-ssl", + "cpp-nodejs_multih-header_http-domain", + "cpp-nodejs_multih-header_http-ip", + "cpp-nodejs_multih-header_http-ip-ssl", "cpp-nodejs_multij-json_http-domain", "cpp-nodejs_multij-json_http-ip", "cpp-nodejs_multij-json_http-ip-ssl", - "cpp-nodejs_multih-header_http-ip", - "cpp-nodejs_multih-header_http-ip-ssl", - "cpp-nodejs_multih-header_http-domain", - "cpp-nodejs_header_http-ip", - "cpp-nodejs_header_http-ip-ssl", - "cpp-nodejs_header_http-domain", "cpp-py3_binary-accel_http-ip", "cpp-py3_binary-accel_http-ip-ssl", "cpp-py3_binary_http-ip", @@ -159,6 +159,10 @@ "cpp-rs_multi_framed-ip", "cpp-rs_multic_buffered-ip", "cpp-rs_multic_framed-ip", + "csharp-erl_binary_buffered-ip-ssl", + "csharp-erl_binary_framed-ip-ssl", + "csharp-erl_compact_buffered-ip-ssl", + "csharp-erl_compact_framed-ip-ssl", "csharp-rb_binary-accel_buffered-ip-ssl", "csharp-rb_binary-accel_framed-ip-ssl", "csharp-rb_binary_buffered-ip-ssl", @@ -288,7 +292,11 @@ "erl-cpp_binary_buffered-ip", "erl-cpp_compact_buffered-ip", "erl-csharp_binary_buffered-ip", + "erl-csharp_binary_buffered-ip-ssl", + "erl-csharp_binary_framed-ip-ssl", "erl-csharp_compact_buffered-ip", + "erl-csharp_compact_buffered-ip-ssl", + "erl-csharp_compact_framed-ip-ssl", "erl-nodejs_binary_buffered-ip", "erl-nodejs_compact_buffered-ip", "erl-nodets_binary_buffered-ip", @@ -343,13 +351,13 @@ "nodejs-cpp_compact_http-domain", "nodejs-cpp_compact_http-ip", "nodejs-cpp_compact_http-ip-ssl", + "nodejs-cpp_header_http-domain", + "nodejs-cpp_header_http-ip", + "nodejs-cpp_header_http-ip-ssl", "nodejs-cpp_json_buffered-ip-ssl", "nodejs-cpp_json_http-domain", "nodejs-cpp_json_http-ip", "nodejs-cpp_json_http-ip-ssl", - "nodejs-cpp_header_http-ip", - "nodejs-cpp_header_http-ip-ssl", - "nodejs-cpp_header_http-domain", "nodejs-d_binary_http-ip", "nodejs-d_binary_http-ip-ssl", "nodejs-d_compact_http-ip", @@ -369,8 +377,8 @@ "nodejs-go_json_http-ip-ssl", "nodejs-hs_binary_http-ip", "nodejs-hs_compact_http-ip", - "nodejs-hs_json_http-ip", "nodejs-hs_header_http-ip", + "nodejs-hs_json_http-ip", "nodejs-java_binary_http-ip", "nodejs-java_binary_http-ip-ssl", "nodejs-java_compact_http-ip", @@ -389,12 +397,10 @@ "nodejs-py3_compact-accelc_http-ip-ssl", "nodejs-py3_compact_http-ip", "nodejs-py3_compact_http-ip-ssl", - "nodejs-py3_json_http-ip", - "nodejs-py3_json_http-ip-ssl", "nodejs-py3_header_http-ip", "nodejs-py3_header_http-ip-ssl", - "nodejs-py_header_http-ip", - "nodejs-py_header_http-ip-ssl", + "nodejs-py3_json_http-ip", + "nodejs-py3_json_http-ip-ssl", "nodejs-py_binary-accel_http-ip", "nodejs-py_binary-accel_http-ip-ssl", "nodejs-py_binary_http-ip", @@ -403,6 +409,8 @@ "nodejs-py_compact-accelc_http-ip-ssl", "nodejs-py_compact_http-ip", "nodejs-py_compact_http-ip-ssl", + "nodejs-py_header_http-ip", + "nodejs-py_header_http-ip-ssl", "nodejs-py_json_http-ip", "nodejs-py_json_http-ip-ssl", "perl-rs_multi_buffered-ip", @@ -607,4 +615,4 @@ "rb-cpp_json_framed-domain", "rb-cpp_json_framed-ip", "rb-cpp_json_framed-ip-ssl" -] +] \ No newline at end of file
[thrift] 02/03: THRIFT-4904: Fix python unit test errors and exception escapes
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 3131fe975ce2efd2887e41f86e73f7205a02a2a4 Author: James E. King III AuthorDate: Tue Jul 2 14:21:05 2019 -0400 THRIFT-4904: Fix python unit test errors and exception escapes Due to the way SSL layers on top of sockets, it was possible to complete a connection and then have the server close it. This would happen if the client is not checking certificates but the server is. The TSSLSocket unit test was enhanced to do a read and a write as well as just connecting to ensure a more complete test. The TSocket read() and write() calls were leaking OSError, socker.error, and ssl.Error exceptions. These cases are now wrapped into a TTransportException of the appropriate type, and the original exception is added as an argument named inner. --- lib/py/src/transport/TSSLSocket.py | 6 +++--- lib/py/src/transport/TSocket.py| 27 --- lib/py/src/transport/TTransport.py | 3 ++- lib/py/test/test_sslsocket.py | 10 -- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/lib/py/src/transport/TSSLSocket.py b/lib/py/src/transport/TSSLSocket.py index 066d8da..5b3ae59 100644 --- a/lib/py/src/transport/TSSLSocket.py +++ b/lib/py/src/transport/TSSLSocket.py @@ -291,11 +291,11 @@ class TSSLSocket(TSocket.TSocket, TSSLBase): plain_sock = socket.socket(family, socktype) try: return self._wrap_socket(plain_sock) -except Exception: +except Exception as ex: plain_sock.close() msg = 'failed to initialize SSL' logger.exception(msg) -raise TTransportException(TTransportException.NOT_OPEN, msg) +raise TTransportException(type=TTransportException.NOT_OPEN, message=msg, inner=ex) def open(self): super(TSSLSocket, self).open() @@ -307,7 +307,7 @@ class TSSLSocket(TSocket.TSocket, TSSLBase): except TTransportException: raise except Exception as ex: -raise TTransportException(TTransportException.UNKNOWN, str(ex)) +raise TTransportException(message=str(ex), inner=ex) class TSSLServerSocket(TSocket.TServerSocket, TSSLBase): diff --git a/lib/py/src/transport/TSocket.py b/lib/py/src/transport/TSocket.py index c8be25a..df25d42 100644 --- a/lib/py/src/transport/TSocket.py +++ b/lib/py/src/transport/TSocket.py @@ -94,13 +94,13 @@ class TSocket(TSocketBase): def open(self): if self.handle: -raise TTransportException(TTransportException.ALREADY_OPEN) +raise TTransportException(type=TTransportException.ALREADY_OPEN, message="already open") try: addrs = self._resolveAddr() -except socket.gaierror: +except socket.gaierror as gai: msg = 'failed to resolve sockaddr for ' + str(self._address) logger.exception(msg) -raise TTransportException(TTransportException.NOT_OPEN, msg) +raise TTransportException(type=TTransportException.NOT_OPEN, message=msg, inner=gai) for family, socktype, _, _, sockaddr in addrs: handle = self._do_open(family, socktype) @@ -119,7 +119,7 @@ class TSocket(TSocketBase): msg = 'Could not connect to any of %s' % list(map(lambda a: a[4], addrs)) logger.error(msg) -raise TTransportException(TTransportException.NOT_OPEN, msg) +raise TTransportException(type=TTransportException.NOT_OPEN, message=msg) def read(self, sz): try: @@ -134,8 +134,10 @@ class TSocket(TSocketBase): self.close() # Trigger the check to raise the END_OF_FILE exception below. buff = '' +elif e.args[0] == errno.ETIMEDOUT: +raise TTransportException(type=TTransportException.TIMED_OUT, message="read timeout", inner=e) else: -raise +raise TTransportException(message="unexpected exception", inner=e) if len(buff) == 0: raise TTransportException(type=TTransportException.END_OF_FILE, message='TSocket read 0 bytes') @@ -148,12 +150,15 @@ class TSocket(TSocketBase): sent = 0 have = len(buff) while sent < have: -plus = self.handle.send(buff) -if plus == 0: -raise TTransportException(type=TTransportException.END_OF_FILE, - message='TSocket sent 0 bytes') -sent += plus -buff = buff[plus:] +try: +plus = self.handle.send(buff) +if plus
[thrift] 01/03: Update language levels, fix erlang and rust in CI
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 93ff9b00531682ece08a1a43883e55fd2aa83a15 Author: James E. King III AuthorDate: Fri Jun 21 17:50:34 2019 -0400 Update language levels, fix erlang and rust in CI - Include rebar3 in docker image so erlang builds in CI - Include the correct path in docker image so rust builds in CI - Updated common lisp (sbcl) to 1.5.3 in docker image - Updated dlang to 2.087.0 in docker image - Updated dart to 2.0.0 in xenial docker image - Updated dart to 2.4.0 in bionic docker image - Updated erlang to 22.0 in docker image - Updated openjdk to 11.0.3 in docker image - Updated node.js to 10.16 in docker image - Updated rust to 1.34.0 in xenial docker image - Updated rust to 1.35.0 in bionic docker image THRIFT-4905: Disable hanging experimental dlang async ssl test --- .gitignore| 3 +- LANGUAGES.md | 22 +- build/docker/README.md| 32 +- build/docker/ubuntu-bionic/Dockerfile | 40 +- build/docker/ubuntu-xenial/Dockerfile | 40 +- lib/d/README.md | 19 +- lib/d/test/Makefile.am| 19 +- lib/d/test/async_test.d | 8 +- lib/d/test/async_test_runner.sh | 7 +- lib/d/test/openssl.test.cnf | 14 - lib/d/test/thrift_test_server.d | 5 +- lib/js/package-lock.json | 861 +++--- lib/rs/Cargo.toml | 6 +- lib/rs/src/errors.rs | 3 - lib/rs/src/protocol/stored.rs | 1 - lib/rs/src/server/mod.rs | 1 - lib/rs/src/server/threaded.rs | 1 - lib/rs/test/Cargo.toml| 4 +- test/features/tls.sh | 7 +- test/rs/Cargo.toml| 8 +- test/tests.json | 12 +- tutorial/rs/Cargo.toml| 6 +- 22 files changed, 178 insertions(+), 941 deletions(-) diff --git a/.gitignore b/.gitignore index 3f584e2..54fb986 100644 --- a/.gitignore +++ b/.gitignore @@ -222,7 +222,6 @@ project.lock.json /lib/erl/test/*.beam /lib/erl/test/*.hrl /lib/erl/test/Thrift_omit_without.thrift -/lib/erl/rebar.lock /lib/haxe/test/bin /lib/haxe/test/data.tmp /lib/hs/dist @@ -323,6 +322,8 @@ project.lock.json /test/erl/.generated /test/erl/.rebar /test/erl/ebin +/test/erl/_build/ +/test/erl/rebar.lock /test/go/bin/ /test/go/ThriftTest.thrift /test/go/gopath diff --git a/LANGUAGES.md b/LANGUAGES.md index 5391fe1..59d5e53 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -72,7 +72,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/c_glib/README.md;>C (glib) 0.6.0 -2.48.22.56.0 +2.48.22.56.4 @@ -105,7 +105,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/cl/README.md;>Common LISP 0.12.0 -SBCL 1.4.x +SBCL 1.4.xSBCL 1.5.3 @@ -116,7 +116,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/d/README.md;>Dlang 0.9.0 -2.075.12.083.2 +2.075.12.087.0 @@ -127,7 +127,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/dart/README.md;>Dart 0.10.0 -1.24.32.x +2.0.02.4.0 @@ -171,7 +171,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/erl/README.md;>Erlang 0.3.0 -18.320.0.4 +18.322.0 @@ -182,7 +182,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/go/README.md;>Go 0.7.0 -1.7.61.11.4 +1.10.81.12.6 @@ -215,7 +215,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/java/README.md;>Java (SE) 0.2.0 -1.8.0_1511.8.0_191 +1.8.0_15111.0.3 @@ -259,7 +259,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/nodejs/README.md;>node.js 0.6.0 -6.x8.x +6.x10.x @@ -303,7 +303,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/php/README.md;>PHP 0.2.0 -7.0.227.2.10 +7.0.227.2.19 @@ -314,7 +314,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/py/README.md;>Python 0.2.0 -2.7.12, 3.5.22.7.15rc1, 3.6.7 +2.7.12, 3.5.22.7.15, 3.6.8 @@ -336,7 +3
[thrift] branch master updated: Use THRIFT_WRITE instead of ::write in TFileTransport.cpp
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 1a2dee6 Use THRIFT_WRITE instead of ::write in TFileTransport.cpp 1a2dee6 is described below commit 1a2dee60b4384de2f6190caa85cf3e2a497c31b9 Author: Shaoyu Zhang AuthorDate: Sat Mar 23 13:47:15 2019 +0800 Use THRIFT_WRITE instead of ::write in TFileTransport.cpp --- lib/cpp/src/thrift/transport/TFileTransport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp b/lib/cpp/src/thrift/transport/TFileTransport.cpp index 53e5136..eaf2bc3 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.cpp +++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp @@ -427,7 +427,7 @@ void TFileTransport::writerThread() { auto* zeros = new uint8_t[padding]; memset(zeros, '\0', padding); boost::scoped_array array(zeros); -if (-1 == ::write(fd_, zeros, padding)) { +if (-1 == ::THRIFT_WRITE(fd_, zeros, padding)) { int errno_copy = THRIFT_ERRNO; GlobalOutput.perror("TFileTransport: writerThread() error while padding zeros ", errno_copy);
[thrift] branch master updated: THRIFT-4842 - Fix memory leak on set property c_glib (#1773)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 9b49c96 THRIFT-4842 - Fix memory leak on set property c_glib (#1773) 9b49c96 is described below commit 9b49c96a6a064c40779966960ad1c98d90d6011c Author: Gonzalo Aguilar Delgado AuthorDate: Tue Jul 2 02:13:09 2019 +0200 THRIFT-4842 - Fix memory leak on set property c_glib (#1773) --- lib/c_glib/src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c b/lib/c_glib/src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c index 352e301..5084ead 100644 --- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c +++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c @@ -76,6 +76,7 @@ thrift_multiplexed_protocol_set_property (GObject *object, switch (property_id) { case PROP_THRIFT_MULTIPLEXED_PROTOCOL_SERVICE_NAME: +g_free(self->service_name); self->service_name = g_value_dup_string (value); break;
[thrift] branch master updated: THRIFT-4830: Add to_string helper function for cpp generator (#1765)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 6a61dfa THRIFT-4830: Add to_string helper function for cpp generator (#1765) 6a61dfa is described below commit 6a61dfabbf6ae2fa9fbbc3996590ebdbe38e569f Author: soroshsabz AuthorDate: Tue Jul 2 04:43:54 2019 +0430 THRIFT-4830: Add to_string helper function for cpp generator (#1765) --- .../cpp/src/thrift/generate/t_cpp_generator.cc | 44 ++ lib/cpp/test/EnumTest.cpp | 22 ++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc index dca3167..d66b6e6 100644 --- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc @@ -114,6 +114,8 @@ public: void generate_enum(t_enum* tenum) override; void generate_enum_ostream_operator_decl(std::ostream& out, t_enum* tenum); void generate_enum_ostream_operator(std::ostream& out, t_enum* tenum); + void generate_enum_to_string_helper_function_decl(std::ostream& out, t_enum* tenum); + void generate_enum_to_string_helper_function(std::ostream& out, t_enum* tenum); void generate_forward_declaration(t_struct* tstruct) override; void generate_struct(t_struct* tstruct) override { generate_cpp_struct(tstruct, false); } void generate_xception(t_struct* txception) override { generate_cpp_struct(txception, true); } @@ -584,6 +586,9 @@ void t_cpp_generator::generate_enum(t_enum* tenum) { generate_enum_ostream_operator_decl(f_types_, tenum); generate_enum_ostream_operator(f_types_impl_, tenum); + + generate_enum_to_string_helper_function_decl(f_types_, tenum); + generate_enum_to_string_helper_function(f_types_impl_, tenum); } void t_cpp_generator::generate_enum_ostream_operator_decl(std::ostream& out, t_enum* tenum) { @@ -631,6 +636,45 @@ void t_cpp_generator::generate_enum_ostream_operator(std::ostream& out, t_enum* } } +void t_cpp_generator::generate_enum_to_string_helper_function_decl(std::ostream& out, t_enum* tenum) { + out << "std::string to_string(const "; + if (gen_pure_enums_) { +out << tenum->get_name(); + } else { +out << tenum->get_name() << "::type&"; + } + out << " val);" << endl; + out << endl; +} + +void t_cpp_generator::generate_enum_to_string_helper_function(std::ostream& out, t_enum* tenum) { + if (!has_custom_ostream(tenum)) { +out << "std::string to_string(const "; +if (gen_pure_enums_) { + out << tenum->get_name(); +} else { + out << tenum->get_name() << "::type&"; +} +out << " val) " ; + scope_up(out); + +out << indent() << "std::map::const_iterator it = _" + << tenum->get_name() << "_VALUES_TO_NAMES.find(val);" << endl; +out << indent() << "if (it != _" << tenum->get_name() << "_VALUES_TO_NAMES.end()) {" << endl; +indent_up(); +out << indent() << "return std::string(it->second);" << endl; +indent_down(); +out << indent() << "} else {" << endl; +indent_up(); +out << indent() << "return std::to_string(static_cast(val));" << endl; +indent_down(); +out << indent() << "}" << endl; + +scope_down(out); +out << endl; + } +} + /** * Generates a class that holds all the constants. */ diff --git a/lib/cpp/test/EnumTest.cpp b/lib/cpp/test/EnumTest.cpp index 6487906..388abb7 100644 --- a/lib/cpp/test/EnumTest.cpp +++ b/lib/cpp/test/EnumTest.cpp @@ -26,6 +26,13 @@ std::ostream& operator <<(std::ostream& os, const MyEnumWithCustomOstream::type& return os; } +std::string to_string(const MyEnumWithCustomOstream::type& val) +{ + std::ostringstream os; + os << val; + return os.str(); +} + BOOST_AUTO_TEST_SUITE(EnumTest) BOOST_AUTO_TEST_CASE(test_enum_value) { @@ -66,7 +73,6 @@ std::string EnumToString(_T e) return ss.str(); } - BOOST_AUTO_TEST_CASE(test_enum_ostream) { BOOST_CHECK_EQUAL(EnumToString(MyEnum1::ME1_0), "ME1_0"); @@ -75,10 +81,22 @@ BOOST_AUTO_TEST_CASE(test_enum_ostream) BOOST_CHECK_EQUAL(EnumToString(MyEnumWithCustomOstream::CustoM2), "{2:CUSTOM!}"); // some invalid or unknown value - auto uut = (MyEnum5::type)44; + auto uut = static_cast(44); BOOST_CHECK_EQUAL(EnumToString(uut), "44"); } +BOOST_AUTO_TEST_CASE(test_enum_to_string) +{ + BOOST_CHECK_EQUAL(::to_string(MyEnum1::ME1_0), "ME1_0"); + BOOST_CHECK_EQUAL(::to_string(MyEnum5::e2), "e2"); + BOOST_CHECK_EQUAL(::to_string(MyEnum3::ME3_N1), "ME3_N1"); + BOOST_CHECK_EQUAL(::to_string(MyEnumWithCustomOstream::CustoM2), "{2:CUSTOM!}"); + + // some invalid or unknown value + auto uut = static_cast(44); + BOOST_CHECK_EQUAL(::to_string(uut), "44"); +} + BOOST_AUTO_TEST_CASE(test_enum_constant) { MyStruct ms;
[thrift] branch master updated: THRIFT-4878 - [c_glib] add unix domain socket support to ThriftSocket (#1807)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 6c847d2 THRIFT-4878 - [c_glib] add unix domain socket support to ThriftSocket (#1807) 6c847d2 is described below commit 6c847d2d028c155534aee006a77a5dca783233c4 Author: Kevin Wojniak AuthorDate: Mon Jul 1 17:11:56 2019 -0700 THRIFT-4878 - [c_glib] add unix domain socket support to ThriftSocket (#1807) --- .../thrift/c_glib/transport/thrift_server_socket.c | 90 +- .../thrift/c_glib/transport/thrift_server_socket.h | 1 + .../src/thrift/c_glib/transport/thrift_socket.c| 55 - .../src/thrift/c_glib/transport/thrift_socket.h| 1 + test/c_glib/src/test_client.c | 43 --- test/c_glib/src/test_server.c | 33 ++-- test/tests.json| 3 +- 7 files changed, 187 insertions(+), 39 deletions(-) diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.c index 6ea897c..1646374 100644 --- a/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.c +++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_server_socket.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,7 @@ enum _ThriftServerSocketProperties { PROP_0, PROP_THRIFT_SERVER_SOCKET_PORT, + PROP_THRIFT_SERVER_SOCKET_PATH, PROP_THRIFT_SERVER_SOCKET_BACKLOG }; @@ -48,17 +50,12 @@ gboolean thrift_server_socket_listen (ThriftServerTransport *transport, GError **error) { int enabled = 1; /* for setsockopt() */ - struct sockaddr_in pin; ThriftServerSocket *tsocket = THRIFT_SERVER_SOCKET (transport); - /* create a address structure */ - memset (, 0, sizeof(pin)); - pin.sin_family = AF_INET; - pin.sin_addr.s_addr = INADDR_ANY; - pin.sin_port = htons(tsocket->port); + const int socket_domain = tsocket->path ? PF_UNIX : AF_INET; /* create a socket */ - if ((tsocket->sd = socket (AF_INET, SOCK_STREAM, 0)) == -1) + if ((tsocket->sd = socket (socket_domain, SOCK_STREAM, 0)) == -1) { g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, THRIFT_SERVER_SOCKET_ERROR_SOCKET, @@ -76,22 +73,60 @@ thrift_server_socket_listen (ThriftServerTransport *transport, GError **error) } /* bind to the socket */ - if (bind(tsocket->sd, (struct sockaddr *) , sizeof(pin)) == -1) + if (tsocket->path) { -g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, - THRIFT_SERVER_SOCKET_ERROR_BIND, - "failed to bind to port %d - %s", - tsocket->port, strerror(errno)); -return FALSE; +/* create a socket structure */ +struct sockaddr_un pin; +memset (, 0, sizeof(pin)); +pin.sun_family = AF_UNIX; +memcpy(pin.sun_path, tsocket->path, strlen(tsocket->path) + 1); + +if (bind(tsocket->sd, (struct sockaddr *) , sizeof(pin)) == -1) +{ + g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, + THRIFT_SERVER_SOCKET_ERROR_BIND, + "failed to bind to path %s", + tsocket->path, strerror(errno)); + return FALSE; +} + } + else + { +/* create a address structure */ +struct sockaddr_in pin; +memset (, 0, sizeof(pin)); +pin.sin_family = AF_INET; +pin.sin_addr.s_addr = INADDR_ANY; +pin.sin_port = htons(tsocket->port); + +if (bind(tsocket->sd, (struct sockaddr *) , sizeof(pin)) == -1) +{ + g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, + THRIFT_SERVER_SOCKET_ERROR_BIND, + "failed to bind to port %d - %s", + tsocket->port, strerror(errno)); + return FALSE; +} } if (listen(tsocket->sd, tsocket->backlog) == -1) { -g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, - THRIFT_SERVER_SOCKET_ERROR_LISTEN, - "failed to listen to port %d - %s", - tsocket->port, strerror(errno)); -return FALSE; +if (tsocket->path) +{ + g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, + THRIFT_SERVER_SOCKET_ERROR_BIND, + "failed to bind to path %s", + tsocket->path, strerror(errno)); + return FALSE; +} +else +{ + g_set_error (error, THRIFT_SERVER_SOCKET_ERROR, + THRIFT_SERVER_SOCKET_ERROR_LISTEN, + "failed to listen to port %d - %s", + tsocket->port, strerror(errno)); + return FALSE; +} } return TRUE; @@ -178,6 +213,9 @@ thrift_server_socket_get_property (GObject *object, guint prope
[thrift] branch master updated: Fix typescript generation for multi include cases
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 35cda2f Fix typescript generation for multi include cases 35cda2f is described below commit 35cda2fa85ae9c94fc1296e2abcaa2ef733b7352 Author: Phil Price AuthorDate: Sun Jun 23 11:56:28 2019 -0700 Fix typescript generation for multi include cases - Ensure imports are generated for includes in *_types.d.ts files - Ensure generated type names for struct fields and function arguments are prefixed with import name if the type is not defined within the same program. --- compiler/cpp/src/thrift/generate/t_js_generator.cc | 24 -- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_js_generator.cc b/compiler/cpp/src/thrift/generate/t_js_generator.cc index 88758b2..dfc3986 100644 --- a/compiler/cpp/src/thrift/generate/t_js_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_js_generator.cc @@ -395,6 +395,11 @@ private: unordered_map module_name_2_import_path; /** + * Cache for TypeScript includes to generated import name. + */ + unordered_map include_2_import_name; + + /** * The prefix to use when generating the episode file. */ string thrift_package_output_directory_; @@ -464,7 +469,7 @@ void t_js_generator::init_generator() { f_types_ << js_includes() << endl << render_includes() << endl; if (gen_ts_) { -f_types_ts_ << autogen_comment() << ts_includes() << endl; +f_types_ts_ << autogen_comment() << ts_includes() << endl << render_ts_includes() << endl; } if (gen_node_) { @@ -567,7 +572,9 @@ string t_js_generator::render_ts_includes() { } const vector& includes = program_->get_includes(); for (auto include : includes) { -result += "import " + make_valid_nodeJs_identifier(include->get_name()) + "_ttypes = require('" + get_import_path(include) + "');\n"; +string include_name = make_valid_nodeJs_identifier(include->get_name()) + "_ttypes"; +include_2_import_name.insert({include, include_name}); +result += "import " + include_name + " = require('" + get_import_path(include) + "');\n"; } if (includes.size() > 0) { result += "\n"; @@ -2719,9 +2726,22 @@ string t_js_generator::ts_get_type(t_type* type) { } } else if (type->is_enum() || type->is_struct() || type->is_xception()) { std::string type_name; + if (type->get_program()) { type_name = js_namespace(type->get_program()); + + // If the type is not defined within the current program, we need to prefix it with the same name as + // the generated "import" statement for the types containing program + if(type->get_program() != program_) { +auto prefix = include_2_import_name.find(type->get_program()); + +if(prefix != include_2_import_name.end()) { + type_name.append(prefix->second); + type_name.append("."); +} + } } + type_name.append(type->get_name()); ts_type = type_name; } else if (type->is_list() || type->is_set()) {
[thrift] branch master updated: THRIFT-4896 - prevent cpp and c_glib include directories from leaking into other targets (#1821)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new a392566 THRIFT-4896 - prevent cpp and c_glib include directories from leaking into other targets (#1821) a392566 is described below commit a392566e9b31edfb3f3da9bb09dc193215c285c2 Author: Kevin Wojniak AuthorDate: Mon Jul 1 11:07:45 2019 -0700 THRIFT-4896 - prevent cpp and c_glib include directories from leaking into other targets (#1821) - enable the automake `nostdinc` option - fix up include paths --- compiler/cpp/Makefile.am | 2 +- compiler/cpp/src/Makefile.am | 2 +- compiler/cpp/test/Makefile.am | 2 +- configure.ac | 2 +- lib/c_glib/Makefile.am| 4 ++-- lib/c_glib/test/Makefile.am | 4 ++-- lib/cpp/Makefile.am | 2 +- lib/cpp/test/Makefile.am | 4 ++-- lib/lua/Makefile.am | 2 +- test/c_glib/Makefile.am | 4 ++-- test/cpp/Makefile.am | 4 ++-- tutorial/c_glib/Makefile.am | 4 ++-- tutorial/cpp/Makefile.am | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 9a3aeda..91801c6 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -21,7 +21,7 @@ # Please see doc/old-thrift-license.txt in the Thrift distribution for # details. -AUTOMAKE_OPTIONS = subdir-objects +AUTOMAKE_OPTIONS = subdir-objects nostdinc SUBDIRS = src . if WITH_TESTS diff --git a/compiler/cpp/src/Makefile.am b/compiler/cpp/src/Makefile.am index b3139e2..0297708 100644 --- a/compiler/cpp/src/Makefile.am +++ b/compiler/cpp/src/Makefile.am @@ -21,7 +21,7 @@ # Please see doc/old-thrift-license.txt in the Thrift distribution for # details. -AUTOMAKE_OPTIONS = subdir-objects +AUTOMAKE_OPTIONS = subdir-objects nostdinc AM_YFLAGS = -d diff --git a/compiler/cpp/test/Makefile.am b/compiler/cpp/test/Makefile.am index 9625834..801f9d8 100644 --- a/compiler/cpp/test/Makefile.am +++ b/compiler/cpp/test/Makefile.am @@ -21,7 +21,7 @@ # Please see doc/old-thrift-license.txt in the Thrift distribution for # details. -AUTOMAKE_OPTIONS = subdir-objects serial-tests +AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/compiler/cpp/src AM_LDFLAGS = $(BOOST_LDFLAGS) diff --git a/configure.ac b/configure.ac index 391cdb3..58f9319 100755 --- a/configure.ac +++ b/configure.ac @@ -776,7 +776,7 @@ AC_SUBST(GCOV_LDFLAGS) AC_CONFIG_HEADERS(config.h:config.hin) AC_CONFIG_HEADERS(lib/cpp/src/thrift/config.h:config.hin) AC_CONFIG_HEADERS(lib/c_glib/src/thrift/config.h:config.hin) -# gruard against pre defined config.h +# guard against pre defined config.h AH_TOP([ #ifndef CONFIG_H #define CONFIG_H diff --git a/lib/c_glib/Makefile.am b/lib/c_glib/Makefile.am index 49b5b23..fd7f93d 100755 --- a/lib/c_glib/Makefile.am +++ b/lib/c_glib/Makefile.am @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -AUTOMAKE_OPTIONS = serial-tests +AUTOMAKE_OPTIONS = serial-tests nostdinc SUBDIRS = . test pkgconfigdir = $(libdir)/pkgconfig @@ -59,7 +59,7 @@ libthrift_c_glib_la_SOURCES = src/thrift/c_glib/thrift.c \ src/thrift/c_glib/server/thrift_server.c \ src/thrift/c_glib/server/thrift_simple_server.c -libthrift_c_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) +libthrift_c_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) -I$(top_builddir)/lib/c_glib/src/thrift libthrift_c_glib_la_LDFLAGS = $(AM_LDFLAGS) $(GLIB_LIBS) $(GOBJECT_LIBS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) include_thriftdir = $(includedir)/thrift/c_glib diff --git a/lib/c_glib/test/Makefile.am b/lib/c_glib/test/Makefile.am index 5e9d2ea..c99e0da 100755 --- a/lib/c_glib/test/Makefile.am +++ b/lib/c_glib/test/Makefile.am @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -AUTOMAKE_OPTIONS = subdir-objects serial-tests +AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc SUBDIRS = @@ -36,7 +36,7 @@ BUILT_SOURCES = \ gen-c_glib/t_test_thrift_test.h \ gen-c_glib/t_test_thrift_test_types.h -AM_CPPFLAGS = -I../src -I./gen-c_glib +AM_CPPFLAGS = -I../src -I./gen-c_glib -I$(top_builddir)/lib/c_glib/src/thrift AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) \ @GCOV_CFLAGS@ AM_CXXFLAGS = $(AM_CFLAGS) diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am index 114ff17..9b5fb4c 100755 --- a/lib/cpp/Makefile.am +++ b/lib/cpp/Makefile.am @@ -17,7 +17,7 @@ # under the License. # -AUTOMAKE_OPTIONS = subdir-objects +AUTOMAKE_OPTIONS = subdir-objects nostdinc moc__%.cpp: %.h
[thrift] branch master updated: Change docker builds to include specific version of Rust (1.35.0)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new c2c1e1d Change docker builds to include specific version of Rust (1.35.0) c2c1e1d is described below commit c2c1e1d709e65d37359cefeb5dc068913f83021b Author: Allen George AuthorDate: Mon Jul 1 07:46:04 2019 -0400 Change docker builds to include specific version of Rust (1.35.0) --- LANGUAGES.md | 2 +- build/docker/README.md| 2 +- build/docker/ubuntu-bionic/Dockerfile | 2 +- build/docker/ubuntu-xenial/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LANGUAGES.md b/LANGUAGES.md index 370dc3c..5391fe1 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -336,7 +336,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr https://github.com/apache/thrift/blob/master/lib/rs/README.md;>Rust 0.11.0 -1.17.01.30.0 +1.35.01.30.0 diff --git a/build/docker/README.md b/build/docker/README.md index b65f74b..ce79985 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -192,6 +192,6 @@ Last updated: October 1, 2017 | python| 2.7.12| 2.7.15rc1 | | | python3 | 3.5.2 | 3.6.7 | | | ruby | 2.3.1p112 | 2.5.1p57 | | -| rust | 1.30.0| 1.30.0| | +| rust | 1.35.0| 1.35.0| | | smalltalk | | | Not in CI | | swift | | 4.2.1 | | diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile index c8131bb..b508b1e 100644 --- a/build/docker/ubuntu-bionic/Dockerfile +++ b/build/docker/ubuntu-bionic/Dockerfile @@ -257,7 +257,7 @@ RUN apt-get install -y --no-install-recommends \ ruby-bundler # Rust dependencies -RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.35.0 -y # Swift on Linux for cross tests RUN cd / && \ diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile index 97aaaea..119d4cd 100644 --- a/build/docker/ubuntu-xenial/Dockerfile +++ b/build/docker/ubuntu-xenial/Dockerfile @@ -255,7 +255,7 @@ RUN apt-get install -y --no-install-recommends \ ruby-bundler # Rust dependencies -RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.35.0 -y # Clean up RUN rm -rf /var/cache/apt/* && \
[thrift] branch master updated (d9019fc -> 5338d99)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from d9019fc THRIFT-4797: Fix import collisions in Go new 0124c4d minor change new 5338d99 bug fixed The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: tutorial/rs/README.md | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-)
[thrift] 02/02: bug fixed
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 5338d99176756eefc21fe5c3f2eed3fab99ef715 Author: jose andres AuthorDate: Tue May 14 15:38:21 2019 +0200 bug fixed Use TTcpChannel instead of TTcpTransport --- tutorial/rs/README.md | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tutorial/rs/README.md b/tutorial/rs/README.md index a686b9b..8ad39ad 100644 --- a/tutorial/rs/README.md +++ b/tutorial/rs/README.md @@ -35,12 +35,13 @@ extern crate thrift; extern crate try_from; // generated Rust module -use tutorial; +mod tutorial; use thrift::protocol::{TCompactInputProtocol, TCompactOutputProtocol}; use thrift::protocol::{TInputProtocol, TOutputProtocol}; use thrift::transport::{TFramedReadTransport, TFramedWriteTransport}; use thrift::transport::{TIoChannel, TTcpChannel}; + use tutorial::{CalculatorSyncClient, TCalculatorSyncClient}; use tutorial::{Operation, Work}; @@ -60,7 +61,7 @@ fn run() -> thrift::Result<()> { // println!("connect to server on 127.0.0.1:9090"); -let mut c = TTcpTransport::new(); +let mut c = TTcpChannel::new(); c.open("127.0.0.1:9090")?; let (i_chan, o_chan) = c.split()?; @@ -72,7 +73,7 @@ fn run() -> thrift::Result<()> { TFramedWriteTransport::new(o_chan) ); -let client = CalculatorSyncClient::new(i_prot, o_prot); +let mut client = CalculatorSyncClient::new(i_prot, o_prot); // // alright! - let's make some calls
[thrift] 01/02: minor change
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 0124c4d66b4e550c1c56c45e994f842b0638d8a2 Author: jose andres AuthorDate: Tue May 14 15:13:17 2019 +0200 minor change upgrade to thrift 0.12.0 [THRIFT-4529] - Rust enum variants are now camel-cased instead of uppercased to conform to Rust naming conventions --- tutorial/rs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/rs/README.md b/tutorial/rs/README.md index 384e9f8..a686b9b 100644 --- a/tutorial/rs/README.md +++ b/tutorial/rs/README.md @@ -84,14 +84,14 @@ fn run() -> thrift::Result<()> { // two-way with some return let res = client.calculate( 72, -Work::new(7, 8, Operation::MULTIPLY, None) +Work::new(7, 8, Operation::Multiply, None) )?; println!("multiplied 7 and 8, got {}", res); // two-way and returns a Thrift-defined exception let res = client.calculate( 77, -Work::new(2, 0, Operation::DIVIDE, None) +Work::new(2, 0, Operation::Divide, None) ); match res { Ok(v) => panic!("shouldn't have succeeded with result {}", v),
[thrift] branch master updated: Fix some typos in ThriftTest.thrift
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new c5068e2 Fix some typos in ThriftTest.thrift c5068e2 is described below commit c5068e297ccb32d3776673c752977714baf45391 Author: Kevin Wojniak AuthorDate: Wed Jun 26 22:11:01 2019 -0700 Fix some typos in ThriftTest.thrift [ci skip] --- test/ThriftTest.thrift | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift index 99a15ff..cf28b2a 100644 --- a/test/ThriftTest.thrift +++ b/test/ThriftTest.thrift @@ -212,7 +212,7 @@ service ThriftTest Xtruct2 testNest(1: Xtruct2 thing), /** - * Prints 'testMap("{%s")' where thing has been formatted into a string of 'key => value' pairs + * Prints 'testMap("{%s")' where thing has been formatted into a string of 'key => value' pairs * separated by commas and new lines * @param map thing - the map to print * @return map - returns the map 'thing' @@ -220,7 +220,7 @@ service ThriftTest map testMap(1: map thing), /** - * Prints 'testStringMap("{%s}")' where thing has been formatted into a string of 'key => value' pairs + * Prints 'testStringMap("{%s}")' where thing has been formatted into a string of 'key => value' pairs * separated by commas and new lines * @param map thing - the map to print * @return map - returns the map 'thing' @@ -228,7 +228,7 @@ service ThriftTest map testStringMap(1: map thing), /** - * Prints 'testSet("{%s}")' where thing has been formatted into a string of values + * Prints 'testSet("{%s}")' where thing has been formatted into a string of values * separated by commas and new lines * @param set thing - the set to print * @return set - returns the set 'thing' @@ -236,7 +236,7 @@ service ThriftTest set testSet(1: set thing), /** - * Prints 'testList("{%s}")' where thing has been formatted into a string of values + * Prints 'testList("{%s}")' where thing has been formatted into a string of values * separated by commas and new lines * @param list thing - the list to print * @return list - returns the list 'thing' @@ -244,7 +244,7 @@ service ThriftTest listtestList(1: list thing), /** - * Prints 'testEnum("%d")' where thing has been formatted into it's numeric value + * Prints 'testEnum("%d")' where thing has been formatted into its numeric value * @param Numberz thing - the Numberz to print * @return Numberz - returns the Numberz 'thing' */ @@ -266,9 +266,9 @@ service ThriftTest map> testMapMap(1: i32 hello), /** - * So you think you've got this all worked, out eh? + * So you think you've got this all worked out, eh? * - * Creates a the returned map with these values and prints it out: + * Creates a map with these values and prints it out: * { 1 => { 2 => argument, *3 => argument, * }, @@ -295,16 +295,16 @@ service ThriftTest * Print 'testException(%s)' with arg as '%s' * @param string arg - a string indication what type of exception to throw * if arg == "Xception" throw Xception with errorCode = 1001 and message = arg - * elsen if arg == "TException" throw TException + * else if arg == "TException" throw TException * else do not throw anything */ void testException(1: string arg) throws(1: Xception err1), /** * Print 'testMultiException(%s, %s)' with arg0 as '%s' and arg1 as '%s' - * @param string arg - a string indication what type of exception to throw + * @param string arg - a string indicating what type of exception to throw * if arg0 == "Xception" throw Xception with errorCode = 1001 and message = "This is an Xception" - * elsen if arg0 == "Xception2" throw Xception2 with errorCode = 2002 and struct_thing.string_thing = "This is an Xception2" + * else if arg0 == "Xception2" throw Xception2 with errorCode = 2002 and struct_thing.string_thing = "This is an Xception2" * else do not throw anything * @return Xtruct - an Xtruct with string_thing = arg1 */
[thrift] branch master updated: THRIFT-4878: Document c_glib domain transport change in matrix [skip ci]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 03bf848 THRIFT-4878: Document c_glib domain transport change in matrix [skip ci] 03bf848 is described below commit 03bf8482690026beeb7560a4f8d2ab7512edafd9 Author: James E. King III AuthorDate: Sun Jun 23 08:47:56 2019 -0400 THRIFT-4878: Document c_glib domain transport change in matrix [skip ci] --- LANGUAGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LANGUAGES.md b/LANGUAGES.md index 3510138..370dc3c 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -73,7 +73,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr 0.6.0 2.48.22.56.0 - +
[thrift] branch master updated: Add a PR checklist item for skipping CI [skip ci]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new d886ab2 Add a PR checklist item for skipping CI [skip ci] d886ab2 is described below commit d886ab291dbde2cac695b3586d41f278e4ffadfc Author: James E. King III AuthorDate: Sun Jun 23 08:40:36 2019 -0400 Add a PR checklist item for skipping CI [skip ci] --- .github/pull_request_template.md | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index edd7bef..04188b0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,12 +1,13 @@ - + - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? (not required for trivial changes) - [ ] Does your pull request title follow the pattern "THRIFT-: describe my issue"? (not required for trivial changes) -- [ ] Did you squash your changes to a single commit? -- [ ] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change" +- [ ] Did you squash your changes to a single commit? (not required, but preferred) +- [ ] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? +- [ ] If your change does not involve any code, add ` [skip ci]` at the end of your pull request to free up build resources.
[thrift] branch master updated: Fix environment spelling
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 99ae730 Fix environment spelling 99ae730 is described below commit 99ae730c5dac4c7a16e1d706ee56ca3e132fce29 Author: Kevin Wojniak AuthorDate: Fri Jun 21 23:05:40 2019 -0700 Fix environment spelling --- test/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/README.md b/test/README.md index 0682f5d..19cc2a1 100755 --- a/test/README.md +++ b/test/README.md @@ -166,7 +166,7 @@ failing tests: #define TEST_STRUCTS 2 // 0010 #define TEST_CONTAINERS4 // 0100 #define TEST_EXCEPTIONS8 // 1000 - #define TEST_UNKNOWN 64 // 0100 (Failed to prepare environemt etc.) + #define TEST_UNKNOWN 64 // 0100 (Failed to prepare environment etc.) #define TEST_TIMEOUT 128 // 1000 #define TEST_NOTUSED 48 // 0011 (reserved bits)
[thrift] branch master updated: THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 95870f0 THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804) 95870f0 is described below commit 95870f06cdee04b9ec8a263f8c71597a3b95678a Author: antbofh AuthorDate: Fri Jun 21 22:33:55 2019 +0300 THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804) --- lib/py/src/transport/TTransport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/py/src/transport/TTransport.py b/lib/py/src/transport/TTransport.py index d13060f..8573ba7 100644 --- a/lib/py/src/transport/TTransport.py +++ b/lib/py/src/transport/TTransport.py @@ -376,7 +376,7 @@ class TSaslClientTransport(TTransportBase, CReadableTransport): if not self.transport.isOpen(): self.transport.open() -self.send_sasl_msg(self.START, self.sasl.mechanism) +self.send_sasl_msg(self.START, bytes(self.sasl.mechanism, 'ascii')) self.send_sasl_msg(self.OK, self.sasl.process()) while True: @@ -417,7 +417,7 @@ class TSaslClientTransport(TTransportBase, CReadableTransport): def flush(self): data = self.__wbuf.getvalue() encoded = self.sasl.wrap(data) -self.transport.write(''.join((pack("!i", len(encoded)), encoded))) +self.transport.write(pack("!i", len(encoded)) + encoded) self.transport.flush() self.__wbuf = BufferIO()
[thrift] branch master updated: Fix mingw appveyor build issue [skip travis]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new a85d532 Fix mingw appveyor build issue [skip travis] a85d532 is described below commit a85d532bb397ecfab59afa079da1fe776548af08 Author: James E. King III AuthorDate: Mon Jun 17 04:06:41 2019 -0400 Fix mingw appveyor build issue [skip travis] --- build/appveyor/MING-appveyor-install.bat | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build/appveyor/MING-appveyor-install.bat b/build/appveyor/MING-appveyor-install.bat index 1069b05..4b5d730 100644 --- a/build/appveyor/MING-appveyor-install.bat +++ b/build/appveyor/MING-appveyor-install.bat @@ -36,10 +36,16 @@ SET PACKAGES=^ ::mingw-w64-%MINGWPLAT%-qt5 : WAY too large (1GB download!) - tested in cygwin builds anyway +:: the following uninstall and system upgrade was causing issues; appveyor's is relatively new :: Remove old packages that no longer exist to avoid an error -%BASH% -lc "pacman --noconfirm --remove libcatgets catgets || true" || EXIT /B +:: %BASH% -lc "pacman --noconfirm --remove libcatgets catgets || true" || EXIT /B + +:: Remove incompatible packages 8.2.0-3 and 7.3.0-2 (mingw packaging bugs if you ask me!) +:: %BASH% -lc "pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc || true" || EXIT /B +:: %BASH% -lc "pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc || true" || EXIT /B :: Upgrade things -%BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B -%BASH% -lc "pacman --noconfirm -Su %IGNORE%"|| EXIT /B -%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B \ No newline at end of file +:: %BASH% -lc "pacman --noconfirm -Syu %IGNORE%" || EXIT /B +:: %BASH% -lc "pacman --noconfirm -Su %IGNORE%"|| EXIT /B +:: +%BASH% -lc "pacman --noconfirm %PACKAGES%" || EXIT /B
[thrift] branch master updated: CPP generator test, catching exceptions by ref instead.
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 29ecfab CPP generator test, catching exceptions by ref instead. 29ecfab is described below commit 29ecfaba536984e0a41fb1f1bcb1520640dd5471 Author: David Carlier AuthorDate: Fri Jun 14 13:01:31 2019 + CPP generator test, catching exceptions by ref instead. --- lib/cpp/test/processor/EventLog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cpp/test/processor/EventLog.cpp b/lib/cpp/test/processor/EventLog.cpp index c8e0d9b..c75955d 100644 --- a/lib/cpp/test/processor/EventLog.cpp +++ b/lib/cpp/test/processor/EventLog.cpp @@ -98,7 +98,7 @@ Event EventLog::waitForEvent(int64_t timeout) { while (events_.empty()) { monitor_.wait(timeout); } - } catch (TimedOutException ex) { + } catch (const TimedOutException &) { return Event(ET_LOG_END, 0, 0, ""); } @@ -119,7 +119,7 @@ Event EventLog::waitForConnEvent(uint32_t connId, int64_t timeout) { while (it == events_.end()) { monitor_.wait(timeout); } -} catch (TimedOutException ex) { +} catch (const TimedOutException &) { return Event(ET_LOG_END, 0, 0, ""); }
[thrift] branch master updated: Implement episodic compilation for js code generation
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 3f0d444 Implement episodic compilation for js code generation 3f0d444 is described below commit 3f0d4447919a7b358e60b09ab919bbe52758cc98 Author: Mustafa Senol Cosar AuthorDate: Fri Mar 1 18:57:09 2019 +0300 Implement episodic compilation for js code generation --- compiler/cpp/Makefile.am | 2 +- compiler/cpp/src/thrift/generate/t_js_generator.cc | 186 ++--- compiler/cpp/src/thrift/main.cc| 3 + compiler/cpp/src/thrift/parse/t_program.h | 11 +- lib/nodejs/Makefile.am | 2 + .../test/episodic-code-generation-test/client.js | 77 + .../episodic_compilation.package.json | 3 + .../test/episodic-code-generation-test/server.js | 50 ++ lib/nodejs/test/testAll.sh | 68 +++- test/Service.thrift| 24 +++ test/Types.thrift | 23 +++ 11 files changed, 411 insertions(+), 38 deletions(-) diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 16d4d3a..9a3aeda 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -65,7 +65,7 @@ thrift_SOURCES = src/thrift/audit/t_audit.cpp \ src/thrift/parse/t_type.h \ src/thrift/parse/t_typedef.cc \ src/thrift/parse/t_typedef.h \ - src/thrift/platform.h + src/thrift/platform.h # Specific client generator source thrift_SOURCES += src/thrift/generate/t_as3_generator.cc \ diff --git a/compiler/cpp/src/thrift/generate/t_js_generator.cc b/compiler/cpp/src/thrift/generate/t_js_generator.cc index af402a4..88758b2 100644 --- a/compiler/cpp/src/thrift/generate/t_js_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_js_generator.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -38,9 +39,11 @@ using std::ostream; using std::ostringstream; using std::string; using std::stringstream; +using std::unordered_map; using std::vector; static const string endl = "\n"; // avoid ostream << std::endl flushes +static const string episode_file_name = "thrift.js.episode"; // largest consecutive integer representable by a double (2 ^ 53 - 1) static const int64_t max_safe_integer = 0x1f; // smallest consecutive number representable by a double (-2 ^ 53 + 1) @@ -65,6 +68,7 @@ public: gen_jquery_ = false; gen_ts_ = false; gen_es6_ = false; +gen_episode_file_ = false; bool with_ns_ = false; @@ -79,22 +83,26 @@ public: with_ns_ = true; } else if( iter->first.compare("es6") == 0) { gen_es6_ = true; + } else if( iter->first.compare("imports") == 0) { +parse_imports(program, iter->second); + } else if (iter->first.compare("thrift_package_output_directory") == 0) { +parse_thrift_package_output_directory(iter->second); } else { -throw "unknown option js:" + iter->first; +throw std::invalid_argument("unknown option js:" + iter->first); } } if (gen_es6_ && gen_jquery_) { - throw "Invalid switch: [-gen js:es6,jquery] options not compatible"; + throw std::invalid_argument("invalid switch: [-gen js:es6,jquery] options not compatible"); } if (gen_node_ && gen_jquery_) { - throw "Invalid switch: [-gen js:node,jquery] options not compatible, try: [-gen js:node -gen " -"js:jquery]"; + throw std::invalid_argument("invalid switch: [-gen js:node,jquery] options not compatible, try: [-gen js:node -gen " +"js:jquery]"); } if (!gen_node_ && with_ns_) { - throw "Invalid switch: [-gen js:with_ns] is only valid when using node.js"; + throw std::invalid_argument("invalid switch: [-gen js:with_ns] is only valid when using node.js"); } // Depending on the processing flags, we will update these to be ES6 compatible @@ -207,6 +215,7 @@ public: std::string ts_service_includes(); std::string render_includes(); std::string render_ts_includes(); + std::string get_import_path(t_program* program); std::string declare_field(t_field* tfield, bool init = false, bool obj = false); std::string function_signature(t_function* tfunction, std::string prefix = "", @@ -215,6 +224,13 @@ public: std::string type_to_enum(t_type* ttype); std::string make_valid_nodeJs_identifier(std:
[thrift] branch 0.12.1 deleted (was 17fa32f)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch 0.12.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. was 17fa32f fix java build issue The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[thrift] branch master updated (370d751 -> 057bebc)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 370d751 spelling mistake, perhaps (#1803) [ci skip add 1e41be4 THRIFT-4784 Thrift should throw when skipping over unexpected data Client: as3 Patch: Jens Geyer add 798e90a THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742) add 92c660f additional test for TSimpleJSONProtocol add 5e64997 THRIFT-4691: ensure CPAN module runs unit tests add 5ecaeb9 THRIFT-4746: changes for publishing 0.12.0 to maven; fix java debug vs. release build with cmake add 52da9ab THRIFT-4750: as3 changes to build and publish to maven central add c685cb0 THRIFT-4698: add haskell hackage sdist target and fix cabal file add 8d21d80 Release 0.12.1 add 17fa32f fix java build issue new 057bebc Merge branch '0.12.1' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: lib/csharp/src/Thrift.csproj | 2 +- lib/hs/Makefile.am | 3 +++ lib/hs/thrift.cabal | 2 +- lib/rs/README.md | 1 + 4 files changed, 6 insertions(+), 2 deletions(-)
[thrift] 01/01: Merge branch '0.12.1'
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 057bebc1c346d6adcc2894d8f299c4276650d33d Merge: 370d751 17fa32f Author: James E. King III AuthorDate: Sun May 26 14:59:04 2019 -0400 Merge branch '0.12.1' lib/csharp/src/Thrift.csproj | 2 +- lib/hs/Makefile.am | 3 +++ lib/hs/thrift.cabal | 2 +- lib/rs/README.md | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --cc lib/hs/thrift.cabal index 0849b80,cab9d1e..dd30d89 --- a/lib/hs/thrift.cabal +++ b/lib/hs/thrift.cabal @@@ -18,9 -18,9 +18,9 @@@ -- Name: thrift -Version:0.12.1 +Version:0.13.0 Cabal-Version: 1.24 - License:OtherLicense + License:Apache Category: Foreign Build-Type: Simple Synopsis: Haskell bindings for the Apache Thrift RPC system diff --cc lib/rs/README.md index c8d3643,f611a91..f518f4e --- a/lib/rs/README.md +++ b/lib/rs/README.md @@@ -46,15 -46,7 +46,16 @@@ It does not currently use any Rust 201 Breaking changes are minimized. When they are made they will be outlined below with transition guidelines. -# Thrift 0.12.x +# Thrift 0.13.0 ++ +* **[THRIFT-4536]** - Use TryFrom from std, required rust 1.34.0 or higher + +Previously TryFrom was from try_from crate, it is now from the std library, +but this functionality is only available in rust 1.34.0. Additionally, +ordered-float is now re-exported under the thrift module to reduce +possible dependency mismatches. + +# Thrift 0.12.0 * **[THRIFT-4529]** - Rust enum variants are now camel-cased instead of uppercased to conform to Rust naming conventions
[thrift] branch master updated: spelling mistake, perhaps (#1803) [ci skip
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 370d751 spelling mistake, perhaps (#1803) [ci skip 370d751 is described below commit 370d7513f074d96007006a82fca4d45e72afe4da Author: timestee <19310233+times...@users.noreply.github.com> AuthorDate: Mon May 20 19:20:42 2019 +0800 spelling mistake, perhaps (#1803) [ci skip --- lib/go/thrift/socket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/go/thrift/socket.go b/lib/go/thrift/socket.go index 8854279..88b98f5 100644 --- a/lib/go/thrift/socket.go +++ b/lib/go/thrift/socket.go @@ -162,5 +162,5 @@ func (p *TSocket) Interrupt() error { func (p *TSocket) RemainingBytes() (num_bytes uint64) { const maxSize = ^uint64(0) - return maxSize // the thruth is, we just don't know unless framed is used + return maxSize // the truth is, we just don't know unless framed is used }
[thrift] branch master updated: hotfix: clear the offline queue when once written
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new c035eca hotfix: clear the offline queue when once written c035eca is described below commit c035eca3c672511779440bd0779ce5bc93d5c327 Author: Henrik Tudborg AuthorDate: Mon Apr 18 20:20:10 2016 +0200 hotfix: clear the offline queue when once written --- lib/nodejs/lib/thrift/connection.js | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js index 9e5c063..72ecb69 100644 --- a/lib/nodejs/lib/thrift/connection.js +++ b/lib/nodejs/lib/thrift/connection.js @@ -74,10 +74,7 @@ var Connection = exports.Connection = function(stream, options) { this.framePos = 0; this.frame = null; self.initialize_retry_vars(); - -self.offline_queue.forEach(function(data) { - self.connection.write(data); -}); +self.flush_offline_queue(); self.emit("connect"); }); @@ -177,6 +174,18 @@ Connection.prototype.initialize_retry_vars = function () { this.attempts = 0; }; +Connection.prototype.flush_offline_queue = function () { + var self = this; + var offline_queue = this.offline_queue; + + // Reset offline queue + this.offline_queue = []; + // Attempt to write queued items + offline_queue.forEach(function(data) { +self.write(data); + }); +}; + Connection.prototype.write = function(data) { if (!this.connected) { this.offline_queue.push(data); @@ -311,10 +320,7 @@ var StdIOConnection = exports.StdIOConnection = function(command, options) { this.frame = null; this.connected = true; - self.offline_queue.forEach(function(data) { - self.connection.write(data); - }); - + self.flush_offline_queue(); this.connection.addListener("error", function(err) { self.emit("error", err); @@ -359,6 +365,18 @@ StdIOConnection.prototype.end = function() { this.connection.end(); }; +StdIOConnection.prototype.flush_offline_queue = function () { + var self = this; + var offline_queue = this.offline_queue; + + // Reset offline queue + this.offline_queue = []; + // Attempt to write queued items + offline_queue.forEach(function(data) { +self.write(data); + }); +}; + StdIOConnection.prototype.write = function(data) { if (!this.connected) { this.offline_queue.push(data);
[thrift] branch master updated: THRIFT-4845: Stop ignoring small timeouts
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 79c2337 THRIFT-4845: Stop ignoring small timeouts 79c2337 is described below commit 79c23377057f5bbb2d52097eb13073db2d69db8c Author: Jeremy Mikkola AuthorDate: Thu Apr 4 18:03:32 2019 -0700 THRIFT-4845: Stop ignoring small timeouts Client: php CURLOPT_TIMEOUT requires a long [0], so it seems that small values like 0.2 are being rounded to 0, resulting in a lack of any timeout. This change uses CURLOPT_TIMEOUT_MS, which the PHP documentation says was "added in cURL 7.16.2. Available since PHP 5.2.3." [0] https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html --- lib/php/lib/Transport/TCurlClient.php | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/php/lib/Transport/TCurlClient.php b/lib/php/lib/Transport/TCurlClient.php index 482b43b..2060d34 100644 --- a/lib/php/lib/Transport/TCurlClient.php +++ b/lib/php/lib/Transport/TCurlClient.php @@ -230,7 +230,12 @@ class TCurlClient extends TTransport curl_setopt(self::$curlHandle, CURLOPT_HTTPHEADER, $headers); if ($this->timeout_ > 0) { -curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT, $this->timeout_); +if ($this->timeout_ < 1.0) { +// Timestamps smaller than 1 second are ignored when CURLOPT_TIMEOUT is used +curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT_MS, 1000 * $this->timeout_); +} else { +curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT, $this->timeout_); +} } curl_setopt(self::$curlHandle, CURLOPT_POSTFIELDS, $this->request_); $this->request_ = '';
[thrift] branch master updated (6ba58e9 -> b261f3c)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 6ba58e9 Update README [ci skip] new 6b6a827 THRIFT-4857: Made Java TField class hash code consistent with equals. new b261f3c THRIFT-4857: [java] added a unit test for TField The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/org/apache/thrift/protocol/TField.java | 3 +- .../org/apache/thrift/protocol/TestTField.java | 60 ++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 lib/java/test/org/apache/thrift/protocol/TestTField.java
[thrift] 01/02: THRIFT-4857: Made Java TField class hash code consistent with equals.
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 6b6a8279aba29a67f005f5e498e88519cdb85049 Author: Garret Wilson AuthorDate: Fri May 3 13:12:16 2019 -0700 THRIFT-4857: Made Java TField class hash code consistent with equals. Client: java --- lib/java/src/org/apache/thrift/protocol/TField.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/java/src/org/apache/thrift/protocol/TField.java b/lib/java/src/org/apache/thrift/protocol/TField.java index 31331bb..3872b00 100644 --- a/lib/java/src/org/apache/thrift/protocol/TField.java +++ b/lib/java/src/org/apache/thrift/protocol/TField.java @@ -21,7 +21,7 @@ package org.apache.thrift.protocol; /** * Helper class that encapsulates field metadata. - * + * Two fields are considered equal if they have the same type and id. */ public class TField { public TField() { @@ -47,7 +47,6 @@ public class TField { final int prime = 31; int result = 1; result = prime * result + id; -result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + type; return result; }
[thrift] 02/02: THRIFT-4857: [java] added a unit test for TField
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit b261f3c0f114be31ef0f9a103dc4d2baa7c4fc3f Author: James E. King III AuthorDate: Mon May 13 08:04:09 2019 -0400 THRIFT-4857: [java] added a unit test for TField --- .../org/apache/thrift/protocol/TestTField.java | 60 ++ 1 file changed, 60 insertions(+) diff --git a/lib/java/test/org/apache/thrift/protocol/TestTField.java b/lib/java/test/org/apache/thrift/protocol/TestTField.java new file mode 100644 index 000..f72c259 --- /dev/null +++ b/lib/java/test/org/apache/thrift/protocol/TestTField.java @@ -0,0 +1,60 @@ +/* + * 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. + */ +package org.apache.thrift.protocol; + +import junit.framework.TestCase; +import static org.junit.Assert.assertNotEquals; + +public abstract class TestTField extends TestCase { + + public void testConstructor() { +TField uut = new TField(); +assertEquals("", uut.name); +assertEquals(TType.STOP, uut.type); +assertEquals(0, uut.id); + +uut = new TField("foo", TType.VOID, (short)42); +assertEquals("foo", uut.name); +assertEquals(TType.VOID, uut.type); +assertEquals(42, uut.id); + } + + public void testEquality() { +TField uut1 = new TField(); +TField uut2 = new TField(); +assertEquals(uut1, uut2); +assertEquals(uut1.hashCode(), uut2.hashCode()); + +uut1 = new TField("foo", TType.I32, (short)1); +uut2 = new TField("foo", TType.I32, (short)2); +assertNotEquals(uut1, uut2); +assertNotEquals(uut1.hashCode(), uut2.hashCode()); + +uut1 = new TField("foo", TType.VOID, (short)1); +uut2 = new TField("foo", TType.I32, (short)1); +assertNotEquals(uut1, uut2); +assertNotEquals(uut1.hashCode(), uut2.hashCode()); + +uut1 = new TField("foo", TType.VOID, (short)5); +uut2 = new TField("bar", TType.I32, (short)5); +assertEquals(uut1, uut2); // name field is ignored +assertEquals(uut1.hashCode(), uut2.hashCode()); + } + +}
[thrift] branch master updated: Update README [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 6ba58e9 Update README [ci skip] 6ba58e9 is described below commit 6ba58e9a662e9c61b63e1bff68b374d6bba848ce Author: James E. King III AuthorDate: Mon May 13 07:21:21 2019 -0400 Update README [ci skip] --- README.md | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d09e6e1..2e8a28a 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,27 @@ Apache Thrift Introduction -Thrift is a lightweight, language-independent software stack with an -associated code generation mechanism for point-to-point RPC. Thrift provides -clean abstractions for data transport, data serialization, and application -level processing. The code generation system takes a simple definition -language as input and generates code across programming languages that -uses the abstracted stack to build interoperable RPC clients and servers. +Thrift is a lightweight, language-independent software stack for +point-to-point RPC implementation. +Thrift provides clean abstractions and implementations for data transport, +data serialization, and application level processing. The code generation +system takes a simple definition language as 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 [25 programming languages](LANGUAGES.md), chances are Thrift +for [28 programming languages](LANGUAGES.md), chances are Thrift supports the languages that you currently use. Thrift is specifically designed to support non-atomic version changes -across client and server code. +across client and server code. This allows you to upgrade your +server while still being able service older clients; or have newer +clients issue requests to older servers. An excellent community-provided +write-up about thrift and compatibility when versioning an API can be +found in the [Thrift Missing Guide](https://diwakergupta.github.io/thrift-missing-guide/#_versioning_compatibility). For more details on Thrift's design and implementation, see the Thrift whitepaper included in this distribution, or at the README.md file @@ -30,7 +35,8 @@ Status | Branch | Travis | Appveyor | Coverity Scan | codecov.io | Website | | :- | :- | :--- | : | :- | :-- | -| [`master`](https://github.com/apache/thrift/tree/master) | [![Build Status](https://travis-ci.org/apache/thrift.svg?branch=master)](https://travis-ci.org/apache/thrift) | [![Build status](https://ci.appveyor.com/api/projects/status/github/apache/thrift?branch=master=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/history) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/1345/badge.svg)](https://scan.coverity.com/projects/thrift) | | [![Webs [...] +| [`master`](https://github.com/apache/thrift/tree/master) | [![Build Status](https://travis-ci.org/apache/thrift.svg?branch=master)](https://travis-ci.org/apache/thrift/branches) | [![Build status](https://ci.appveyor.com/api/projects/status/github/apache/thrift?branch=master=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/history) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/1345/badge.svg)](https://scan.coverity.com/projects/thrift) | [...] +| [`0.12.0`](https://github.com/apache/thrift/tree/0.12.0) | [![Build Status](https://travis-ci.org/apache/thrift.svg?branch=0.12.0)](https://travis-ci.org/apache/thrift/branches) | | | | | Releases
[thrift] branch master updated: THRIFT-4583: Switch to rebar3 Client: erl
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 4ffe763 THRIFT-4583: Switch to rebar3 Client: erl 4ffe763 is described below commit 4ffe76351eac93fa2f2632241544e10e80b2b11e Author: Sergey Yelin AuthorDate: Thu Apr 18 17:27:46 2019 +0300 THRIFT-4583: Switch to rebar3 Client: erl --- .gitignore| 5 - configure.ac | 2 +- lib/erl/Makefile.am | 10 +++--- lib/erl/rebar.config | 2 ++ lib/erl/rebar.test.config | 5 - 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 135b085..fb7651e 100644 --- a/.gitignore +++ b/.gitignore @@ -211,15 +211,18 @@ project.lock.json /lib/delphi/**/*.2007 /lib/delphi/**/*.dproj /lib/delphi/**/codegen/*.bat +/lib/erl/_build/ /lib/erl/.eunit /lib/erl/.generated /lib/erl/.rebar/ -/lib/erl/deps/ +/lib/erl/_build/ /lib/erl/ebin +/lib/erl/rebar.lock /lib/erl/src/thrift.app.src /lib/erl/test/*.beam /lib/erl/test/*.hrl /lib/erl/test/Thrift_omit_without.thrift +/lib/erl/rebar.lock /lib/haxe/test/bin /lib/haxe/test/data.tmp /lib/hs/dist diff --git a/configure.ac b/configure.ac index 5f25a5c..391cdb3 100755 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,7 @@ AX_THRIFT_LIB(erlang, [Erlang], yes) if test "$with_erlang" = "yes"; then AC_ERLANG_PATH_ERL AC_ERLANG_PATH_ERLC - AC_PATH_PROG([REBAR], [rebar]) + AC_PATH_PROG([REBAR], [rebar3]) if test -n "$ERLC" ; then AC_ERLANG_SUBST_LIB_DIR # Install into the detected Erlang directory instead of $libdir/erlang/lib diff --git a/lib/erl/Makefile.am b/lib/erl/Makefile.am index fdfc9eb..d4544a3 100644 --- a/lib/erl/Makefile.am +++ b/lib/erl/Makefile.am @@ -49,13 +49,10 @@ $(THRIFT_OMIT_FILE): test/Thrift_omit_with.thrift touch .generated all: .generated - $(REBAR) get-deps $(REBAR) compile check: .generated - $(REBAR) -C rebar.test.config get-deps - $(REBAR) -C rebar.test.config compile - $(REBAR) -C rebar.test.config skip_deps=true eunit + $(REBAR) eunit install: all mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) ; \ @@ -73,7 +70,7 @@ clean-local: $(REBAR) clean $(RM).generated $(RM) -r .rebar/ - $(RM) -r deps/ + $(RM) -r _build/ $(RM) -r test/gen-erl/ $(RM)$(THRIFT_OMIT_FILE) @@ -83,7 +80,7 @@ maintainer-clean-local: dist-hook: $(RM)$(distdir)/.generated $(RM) -r $(distdir)/.rebar/ - $(RM) -r $(distdir)/deps/ + $(RM) -r $(distdir)/_build/ $(RM) -r $(distdir)/ebin/ $(RM) -r $(distdir)/test/gen-erl/ $(RM)$(distdir)/$(THRIFT_OMIT_FILE) @@ -94,7 +91,6 @@ EXTRA_DIST = \ coding_standards.md \ rebar.config \ rebar.config.script \ - rebar.test.config \ test \ README.md diff --git a/lib/erl/rebar.config b/lib/erl/rebar.config index 1ea18a4..1b32947 100644 --- a/lib/erl/rebar.config +++ b/lib/erl/rebar.config @@ -1 +1,3 @@ {erl_opts, [{platform_define, "^R.*", otp16_or_less}, debug_info]}. + +{profiles, [{test, [{deps, [meck]}]}]}. diff --git a/lib/erl/rebar.test.config b/lib/erl/rebar.test.config deleted file mode 100644 index 2ff2afb..000 --- a/lib/erl/rebar.test.config +++ /dev/null @@ -1,5 +0,0 @@ -{erl_opts, [{platform_define, "^R.*", otp16_or_less}, debug_info]}. - -{deps, [ - {meck, "", {git, "https://github.com/eproxus/meck.git;, {tag, "0.8.9"}}} -]}.
[thrift] branch master updated: Make Field definition follow Literal definition
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new b808a11 Make Field definition follow Literal definition b808a11 is described below commit b808a11559644cc385fe403a06ef8c626149b9b1 Author: Aaron Goldman AuthorDate: Mon Apr 22 13:35:23 2019 -0700 Make Field definition follow Literal definition I think this is a violation of your Literal syntax. Could you explain what i'm missing in the language definition? Is this supposed to be a litteral '='? Literal ::= ('"' [^"]* '"') | ("'" [^']* "'") --- doc/specs/idl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/specs/idl.md b/doc/specs/idl.md index 524f4e7..ac35368 100644 --- a/doc/specs/idl.md +++ b/doc/specs/idl.md @@ -96,7 +96,7 @@ A service provides the interface for a set of functionality provided by a Thrift ## Field -[16] Field ::= FieldID? FieldReq? FieldType Identifier ('= ConstValue)? XsdFieldOptions ListSeparator? +[16] Field ::= FieldID? FieldReq? FieldType Identifier ('=' ConstValue)? XsdFieldOptions ListSeparator? ### Field ID
[thrift] branch master updated: Report error for abnormal server termination only Client: erl
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new ce32ed7 Report error for abnormal server termination only Client: erl ce32ed7 is described below commit ce32ed70124f4213894f2c0cfdb76bf624ce62b6 Author: Sergey Elin AuthorDate: Sun May 5 20:14:43 2019 +0300 Report error for abnormal server termination only Client: erl --- lib/erl/src/thrift_socket_server.erl | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/erl/src/thrift_socket_server.erl b/lib/erl/src/thrift_socket_server.erl index 4e3c052..432e65b 100644 --- a/lib/erl/src/thrift_socket_server.erl +++ b/lib/erl/src/thrift_socket_server.erl @@ -278,9 +278,13 @@ handle_cast(stop, State) -> terminate(Reason, #thrift_socket_server{listen=Listen, port=Port}) -> gen_tcp:close(Listen), -{backtrace, Bt} = erlang:process_info(self(), backtrace), -error_logger:error_report({?MODULE, ?LINE, - {child_error, Reason, Bt}}), +case Reason of +normal -> ok; +shutdown -> ok; +_ -> {backtrace, Bt} = erlang:process_info(self(), backtrace), + error_logger:error_report({?MODULE, ?LINE, + {child_error, Reason, Bt}}) +end, case Port < 1024 of true -> catch fdsrv:stop(),
[thrift] branch master updated: Add missing autogenerated comment to header files Client: erl
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new f3d4d51 Add missing autogenerated comment to header files Client: erl f3d4d51 is described below commit f3d4d51d429015cd14229ae16b242038dffe5fa4 Author: Sergey Elin AuthorDate: Sat May 11 19:33:15 2019 +0300 Add missing autogenerated comment to header files Client: erl --- compiler/cpp/src/thrift/generate/t_erl_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/cpp/src/thrift/generate/t_erl_generator.cc b/compiler/cpp/src/thrift/generate/t_erl_generator.cc index d331ecc..910a38a 100644 --- a/compiler/cpp/src/thrift/generate/t_erl_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_erl_generator.cc @@ -295,7 +295,8 @@ void t_erl_generator::init_generator() { * Boilerplate at beginning and end of header files */ void t_erl_generator::hrl_header(ostream& out, string name) { - out << "-ifndef(_" << name << "_included)." << endl << "-define(_" << name << "_included, yeah)." + out << erl_autogen_comment() << endl + << "-ifndef(_" << name << "_included)." << endl << "-define(_" << name << "_included, yeah)." << endl; }
[thrift] branch master updated: Update and fix js dependencies
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 522f873 Update and fix js dependencies 522f873 is described below commit 522f873e1ee916d599c61c274e13fa0f31a8b12d Author: James E. King III AuthorDate: Fri May 10 15:17:33 2019 -0400 Update and fix js dependencies --- lib/js/package.json | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/js/package.json b/lib/js/package.json index a10aaf1..309622d 100644 --- a/lib/js/package.json +++ b/lib/js/package.json @@ -11,21 +11,21 @@ "repository": "https://github.com/apache/thrift;, "license": "Apache-2.0", "devDependencies": { -"browserify": "^16.2.3", -"grunt": "^1.0.3", -"grunt-cli": "^1.3.2", -"grunt-contrib-concat": "^1.0.1", -"grunt-contrib-jshint": "^1.0.0", -"grunt-contrib-qunit": "^3.1.0", -"grunt-contrib-uglify": "^1.0.1", -"grunt-jsdoc": "^2.2.1", -"grunt-shell-spawn": "^0.4.0", -"jslint": "^0.12.0", -"node-int64": "^0.4.0" +"browserify": "~16.2", +"grunt": "~1.0", +"grunt-cli": "~1.3", +"grunt-contrib-concat": "~1.0", +"grunt-contrib-jshint": "~2.1", +"grunt-contrib-qunit": "~3.1", +"grunt-contrib-uglify": "~4.0", +"grunt-jsdoc": "~2.3", +"grunt-shell-spawn": "~0.4", +"jslint": "~0.12", +"node-int64": "~0.4.0" }, "dependencies": { -"jsdoc": "^3.5.5", -"json-int64": "^1.0.0", -"nopt": "^4.0.1" +"jsdoc": "~3.5", +"json-int64": "~1.0", +"nopt": "~4.0" } }
[thrift] 02/03: THRIFT-4861: Set minimum boost to 1.56 and stop using deprecated boost predef endian header Client: cpp
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit ee8caca54ef51e05c7eee8d67e3c63cd73081e8a Author: James E. King III AuthorDate: Sat May 4 08:20:59 2019 -0400 THRIFT-4861: Set minimum boost to 1.56 and stop using deprecated boost predef endian header Client: cpp --- build/cmake/BoostMacros.cmake | 2 +- configure.ac| 2 +- debian/control | 4 ++-- doc/install/README.md | 4 ++-- doc/install/centos.md | 8 lib/cpp/src/thrift/protocol/TProtocol.h | 17 ++--- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/build/cmake/BoostMacros.cmake b/build/cmake/BoostMacros.cmake index 61be622..cc50b53 100644 --- a/build/cmake/BoostMacros.cmake +++ b/build/cmake/BoostMacros.cmake @@ -17,7 +17,7 @@ # under the License. # -set(BOOST_MINREV 1.53) +set(BOOST_MINREV 1.56) # we are not ready for the new style link targets introduced in # boost 1.70.0 and cmake 3.14.2 which showed up on appveyor in diff --git a/configure.ac b/configure.ac index b09c983..5f25a5c 100755 --- a/configure.ac +++ b/configure.ac @@ -158,7 +158,7 @@ AM_CONDITIONAL(WITH_AS3, [test "$have_as3" = "yes"]) AX_THRIFT_LIB(cpp, [C++], yes) have_cpp=no if test "$with_cpp" = "yes"; then - AX_BOOST_BASE([1.53.0]) + AX_BOOST_BASE([1.56.0]) if test "x$succeeded" = "xyes" ; then AC_SUBST([BOOST_LIB_DIR], [$(echo "$BOOST_LDFLAGS" | sed -e 's/^\-L//')]) AC_SUBST([BOOST_CHRONO_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_chrono.a")]) diff --git a/debian/control b/debian/control index 9de66fc..414a815 100644 --- a/debian/control +++ b/debian/control @@ -3,11 +3,11 @@ Section: devel Priority: extra Build-Depends: debhelper (>= 9), build-essential, mono-mcs, python-dev, ant, mono-devel, libmono-system-web4.0-cil, erlang-base, ruby-dev | ruby1.9.1-dev, ruby-bundler ,autoconf, automake, -pkg-config, libtool, bison, flex, libboost-dev | libboost1.53-dev | libboost1.63-all-dev, +pkg-config, libtool, bison, flex, libboost-dev | libboost1.56-dev | libboost1.63-all-dev, python-all, python-setuptools, python-all-dev, python-all-dbg, python3-all, python3-setuptools, python3-all-dev, python3-all-dbg, openjdk-8-jdk | openjdk-8-jdk-headless | openjdk-11-jdk | openjdk-11-jdk-headless | default-jdk, -libboost-test-dev | libboost-test1.53-dev | libboost-test1.63-dev, libevent-dev, libssl-dev, perl (>= 5.8.0-7), +libboost-test-dev | libboost-test1.56-dev | libboost-test1.63-dev, libevent-dev, libssl-dev, perl (>= 5.8.0-7), php (>= 5), php-dev (>= 5), libglib2.0-dev, qtchooser, qtbase5-dev-tools Maintainer: Thrift Developer's Homepage: http://thrift.apache.org/ diff --git a/doc/install/README.md b/doc/install/README.md index 22231cd..e48cc4a 100644 --- a/doc/install/README.md +++ b/doc/install/README.md @@ -3,7 +3,7 @@ * A relatively POSIX-compliant *NIX system * Cygwin or MinGW can be used on Windows (but there are better options, see below) * g++ 4.2 -* boost 1.53.0 +* boost 1.56.0 * Runtime libraries for lex and yacc might be needed for the compiler. ## Requirements for building from source @@ -23,7 +23,7 @@ These are only required if you choose to build the libraries for the given language * C++ -* Boost 1.53.0 +* Boost 1.56.0 * libevent (optional, to build the nonblocking server) * zlib (optional) * Java diff --git a/doc/install/centos.md b/doc/install/centos.md index 04932c2..18282a3 100644 --- a/doc/install/centos.md +++ b/doc/install/centos.md @@ -54,11 +54,11 @@ If you will be developing Apache Thrift clients/servers in C++ you will also nee sudo yum -y install libevent-devel zlib-devel openssl-devel -### Upgrade Boost >= 1.53 +### Upgrade Boost >= 1.56 - wget http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.gz - tar xvf boost_1_53_0.tar.gz - cd boost_1_53_0 + wget http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz + tar xvf boost_1_56_0.tar.gz + cd boost_1_56_0 ./bootstrap.sh sudo ./b2 install diff --git a/lib/cpp/src/thrift/protocol/TProtocol.h b/lib/cpp/src/thrift/protocol/TProtocol.h index 7566a25..df9c5c3 100644 --- a/lib/cpp/src/thrift/protocol/TProtocol.h +++ b/lib/cpp/src/thrift/protocol/TProtocol.h @@ -88,15 +88,18 @@ static inline To bitwise_cast(From from) { # define __THRIFT_LITTLE_ENDIAN LITTLE_ENDIAN # define __THRIFT_BIG_ENDIAN BIG_ENDIAN # else -# include -# include -# define __THRIFT_BYTE_ORDER BOOST_BYTE_ORDER +# include +# if BOOST_ENDIAN_BIG_BYTE +#define __THRIFT_BYTE_ORDER 4321 +#define __THRIFT_LITTLE_ENDIAN 0 +#define __THR
[thrift] 03/03: Remove unused THREADMODEL from MSVC appveyor build
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit acdd4226c210336e9e15eb812e5932a645fcd5ce Author: James E. King III AuthorDate: Sat May 4 15:56:56 2019 -0400 Remove unused THREADMODEL from MSVC appveyor build --- build/appveyor/MSVC-appveyor-build.bat | 3 +-- build/appveyor/cl_setenv.bat | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/build/appveyor/MSVC-appveyor-build.bat b/build/appveyor/MSVC-appveyor-build.bat index 892daa1..3d2bbee 100644 --- a/build/appveyor/MSVC-appveyor-build.bat +++ b/build/appveyor/MSVC-appveyor-build.bat @@ -51,8 +51,7 @@ CD "%BUILDDIR%" || EXIT /B -DOPENSSL_USE_STATIC_LIBS=OFF ^ -DZLIB_LIBRARY="%WIN3P%\zlib-inst\lib\zlib%ZLIB_LIB_SUFFIX%.lib" ^ -DZLIB_ROOT="%WIN3P%\zlib-inst" ^ --DWITH_PYTHON=%WITH_PYTHON% ^ --DWITH_%THREADMODEL%THREADS=ON || EXIT /B +-DWITH_PYTHON=%WITH_PYTHON% || EXIT /B @ECHO OFF cmake --build . ^ diff --git a/build/appveyor/cl_setenv.bat b/build/appveyor/cl_setenv.bat index da4d4ee..98931a6 100644 --- a/build/appveyor/cl_setenv.bat +++ b/build/appveyor/cl_setenv.bat @@ -52,8 +52,6 @@ IF "%PROFILE:~0,4%" == "MSVC" ( SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM% SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty - SET THREADMODEL=STD - IF "%PYTHON_VERSION%" == "" ( SET WITH_PYTHON=OFF ) ELSE (
[thrift] 01/03: Fix MinGW build issue in AppVeyor
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git commit 9ecdce3fe00931cebda39357b31b655236ab9221 Author: James E. King III AuthorDate: Fri May 3 11:24:55 2019 -0400 Fix MinGW build issue in AppVeyor --- appveyor.yml | 2 +- build/cmake/BoostMacros.cmake | 14 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 74c92f1..ef729eb 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -62,7 +62,7 @@ environment: - PROFILE: MINGW PLATFORM: x64 CONFIGURATION: RelWithDebInfo - DISABLED_TESTS: (StressTestNonBlocking) + DISABLED_TESTS: (StalenessCheckTest|StressTestNonBlocking) - PROFILE: CYGWIN PLATFORM: x64 diff --git a/build/cmake/BoostMacros.cmake b/build/cmake/BoostMacros.cmake index 0c7f13d..61be622 100644 --- a/build/cmake/BoostMacros.cmake +++ b/build/cmake/BoostMacros.cmake @@ -19,14 +19,22 @@ set(BOOST_MINREV 1.53) +# we are not ready for the new style link targets introduced in +# boost 1.70.0 and cmake 3.14.2 which showed up on appveyor in +# mingw builds +set(Boost_NO_BOOST_CMAKE ON) + macro(REQUIRE_BOOST_HEADERS) find_package(Boost ${BOOST_MINREV} QUIET REQUIRED) if (NOT Boost_FOUND) string(CONCAT fatal_message - "Boost 1.53 or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}") +"Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}") message(FATAL_ERROR, ${fatal_message}) endif() - include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") + if (DEFINED Boost_INCLUDE_DIRS) +# pre-boost 1.70.0 aware cmake, otherwise it is using targets +include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") + endif() endmacro() macro(REQUIRE_BOOST_LIBRARIES libs) @@ -34,7 +42,7 @@ macro(REQUIRE_BOOST_LIBRARIES libs) find_package(Boost ${BOOST_MINREV} REQUIRED COMPONENTS ${${libs}}) if (NOT Boost_FOUND) string(CONCAT fatal_message - "Boost 1.53 or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, " +"Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, " "or use -DBUILD_TESTING=OFF") message(FATAL_ERROR, ${fatal_message}) endif()
[thrift] branch master updated (27d8387 -> acdd422)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 27d8387 THRIFT-4860 Allow changing "User-Agent" Client: netstd Patch: Jens Geyer new 9ecdce3 Fix MinGW build issue in AppVeyor new ee8caca THRIFT-4861: Set minimum boost to 1.56 and stop using deprecated boost predef endian header Client: cpp new acdd422 Remove unused THREADMODEL from MSVC appveyor build The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: appveyor.yml| 2 +- build/appveyor/MSVC-appveyor-build.bat | 3 +-- build/appveyor/cl_setenv.bat| 2 -- build/cmake/BoostMacros.cmake | 16 configure.ac| 2 +- debian/control | 4 ++-- doc/install/README.md | 4 ++-- doc/install/centos.md | 8 lib/cpp/src/thrift/protocol/TProtocol.h | 17 ++--- 9 files changed, 33 insertions(+), 25 deletions(-)
[thrift] branch master updated: THRIFT-4834 CI error at Haskell: Failed to load interface for 'Network' (#1780)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 2135a36 THRIFT-4834 CI error at Haskell: Failed to load interface for 'Network' (#1780) 2135a36 is described below commit 2135a361a5d3767b6d48c70acff4b2b6577e6d9c Author: Jens Geyer AuthorDate: Tue Apr 16 16:27:03 2019 +0200 THRIFT-4834 CI error at Haskell: Failed to load interface for 'Network' (#1780) --- lib/hs/thrift.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hs/thrift.cabal b/lib/hs/thrift.cabal index 84a59ac..0849b80 100644 --- a/lib/hs/thrift.cabal +++ b/lib/hs/thrift.cabal @@ -42,7 +42,7 @@ Library Build-Depends: base >= 4, base < 5, containers, ghc-prim, attoparsec, binary, bytestring >= 0.10, base64-bytestring, hashable, HTTP, text, hspec-core > 2.4.0, unordered-containers >= 0.2.6, vector >= 0.10.12.2, QuickCheck >= 2.8.2, split if flag(network-uri) - build-depends: network-uri >= 2.6, network >= 2.6 + build-depends: network-uri >= 2.6, network >= 2.6 && < 3.0 else build-depends: network < 2.6 Exposed-Modules:
[thrift] branch master updated: TryFrom stable
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new ddec431 TryFrom stable ddec431 is described below commit ddec431b4a402258c3b56b873908c98a15f22de4 Author: Danny Browning AuthorDate: Fri Mar 8 14:20:41 2019 -0700 TryFrom stable TryFrom is now stable, so use that. Additionally re-export OrderedFloat since it is used by the generated code. Relax dependencies to reduce downstream conflicts. --- compiler/cpp/src/thrift/generate/t_rs_generator.cc | 11 --- lib/rs/Cargo.toml | 11 +-- lib/rs/src/errors.rs | 14 +++--- lib/rs/src/lib.rs | 5 - lib/rs/src/protocol/binary.rs | 3 +-- lib/rs/src/protocol/compact.rs | 3 +-- lib/rs/src/protocol/mod.rs | 7 +++ lib/rs/test/src/lib.rs | 2 -- 8 files changed, 25 insertions(+), 31 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_rs_generator.cc b/compiler/cpp/src/thrift/generate/t_rs_generator.cc index fdf6861..f6b4b6d 100644 --- a/compiler/cpp/src/thrift/generate/t_rs_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_rs_generator.cc @@ -550,20 +550,17 @@ void t_rs_generator::render_attributes_and_includes() { f_gen_ << endl; // add standard includes - f_gen_ << "extern crate ordered_float;" << endl; f_gen_ << "extern crate thrift;" << endl; - f_gen_ << "extern crate try_from;" << endl; f_gen_ << endl; - f_gen_ << "use ordered_float::OrderedFloat;" << endl; + f_gen_ << "use thrift::OrderedFloat;" << endl; f_gen_ << "use std::cell::RefCell;" << endl; f_gen_ << "use std::collections::{BTreeMap, BTreeSet};" << endl; - f_gen_ << "use std::convert::From;" << endl; + f_gen_ << "use std::convert::{From, TryFrom};" << endl; f_gen_ << "use std::default::Default;" << endl; f_gen_ << "use std::error::Error;" << endl; f_gen_ << "use std::fmt;" << endl; f_gen_ << "use std::fmt::{Display, Formatter};" << endl; f_gen_ << "use std::rc::Rc;" << endl; - f_gen_ << "use try_from::TryFrom;" << endl; f_gen_ << endl; f_gen_ << "use thrift::{ApplicationError, ApplicationErrorKind, ProtocolError, ProtocolErrorKind, TThriftClient};" << endl; f_gen_ << "use thrift::protocol::{TFieldIdentifier, TListIdentifier, TMapIdentifier, TMessageIdentifier, TMessageType, TInputProtocol, TOutputProtocol, TSetIdentifier, TStructIdentifier, TType};" << endl; @@ -932,9 +929,9 @@ void t_rs_generator::render_enum_conversion(t_enum* tenum, const string& enum_na f_gen_ << "impl TryFrom for " << enum_name << " {" << endl; indent_up(); - f_gen_ << indent() << "type Err = thrift::Error;"; + f_gen_ << indent() << "type Error = thrift::Error;"; - f_gen_ << indent() << "fn try_from(i: i32) -> Result {" << endl; + f_gen_ << indent() << "fn try_from(i: i32) -> Result {" << endl; indent_up(); f_gen_ << indent() << "match i {" << endl; diff --git a/lib/rs/Cargo.toml b/lib/rs/Cargo.toml index 3a25b16..bad2a38 100644 --- a/lib/rs/Cargo.toml +++ b/lib/rs/Cargo.toml @@ -11,9 +11,8 @@ exclude = ["Makefile*", "test/**", "*.iml"] keywords = ["thrift"] [dependencies] -byteorder = "~1.2.1" -integer-encoding = "~1.0.4" -log = "~0.3.8" -threadpool = "~1.7.1" -try_from = "~0.2.2" - +ordered-float = "0.5" +byteorder = "1" +integer-encoding = "1" +log = "0.4" +threadpool = "1.7" diff --git a/lib/rs/src/errors.rs b/lib/rs/src/errors.rs index 16a2576..6fb1aee 100644 --- a/lib/rs/src/errors.rs +++ b/lib/rs/src/errors.rs @@ -19,7 +19,7 @@ use std::convert::{From, Into}; use std::error::Error as StdError; use std::fmt::{Debug, Display, Formatter}; use std::{error, fmt, io, string}; -use try_from::TryFrom; +use std::convert::TryFrom; use protocol::{TFieldIdentifier, TInputProtocol, TOutputProtocol, TStructIdentifier, TType}; @@ -413,8 +413,8 @@ impl Display for TransportError { } impl TryFrom for TransportErrorKind { -type Err = Error; -fn try_from(from: i32) -> Result { +
[thrift] branch master updated: [RS] Add clarification of where a constant comes from
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 718ab46 [RS] Add clarification of where a constant comes from 718ab46 is described below commit 718ab46379b6b358f5b216b76e5031da04f0dcae Author: Paco AuthorDate: Wed Mar 13 02:05:30 2019 + [RS] Add clarification of where a constant comes from --- tutorial/rs/src/bin/tutorial_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/rs/src/bin/tutorial_client.rs b/tutorial/rs/src/bin/tutorial_client.rs index c80fafc..bfd81d4 100644 --- a/tutorial/rs/src/bin/tutorial_client.rs +++ b/tutorial/rs/src/bin/tutorial_client.rs @@ -75,7 +75,7 @@ fn run() -> thrift::Result<()> { println!("multiplied 7 and 8 and got {}", res); // let's get the log for it -let res = client.get_struct(32)?; +let res = client.get_struct(logid /* 32 */)?; println!("got log {:?} for operation {}", res, logid); // ok - let's be bad :(
[thrift] branch master updated: fix xenial and bump go version on bionic
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 3b77982 fix xenial and bump go version on bionic 3b77982 is described below commit 3b7798295b7aec5d65da9aff402d3292e25fe0ab Author: James E. King III AuthorDate: Fri Mar 15 15:59:27 2019 -0400 fix xenial and bump go version on bionic --- build/docker/ubuntu-bionic/Dockerfile | 4 ++-- build/docker/ubuntu-xenial/Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile index a0ed317..aae9747 100644 --- a/build/docker/ubuntu-bionic/Dockerfile +++ b/build/docker/ubuntu-bionic/Dockerfile @@ -151,9 +151,9 @@ RUN apt-get install -y --no-install-recommends \ libglib2.0-dev # golang -ENV GOLANG_VERSION 1.11.4 +ENV GOLANG_VERSION 1.12.1 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 fb26c30e6a04ad937bbc657a1b5bba92f80096af1e8ee6da6430c045a8db3a5b +ENV GOLANG_DOWNLOAD_SHA256 2a3fdabf665496a0db5f41ec6af7a9b15a49fbe71a85a50ca38b1f13a103aeec RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ tar -C /usr/local -xzf golang.tar.gz && \ diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile index 5693a2c..e6069f8 100644 --- a/build/docker/ubuntu-xenial/Dockerfile +++ b/build/docker/ubuntu-xenial/Dockerfile @@ -16,7 +16,7 @@ # - d: does not come with Ubuntu so we're installing 2.075.1 for coverage # - dart: does not come with Ubuntu so we're installing 1.24.3 for coverage # - dotnet: does not come with Ubuntu -# - go: Xenial comes with 1.6, but we need 1.7 or later +# - go: Xenial comes with 1.6, but we need 1.10 or later # - nodejs: Xenial comes with 4.2.6 which exits LTS April 2018, so we're installing 6.x # - ocaml: causes stack overflow error, just started March 2018 not sure why # @@ -142,9 +142,9 @@ RUN apt-get install -y --no-install-recommends \ libglib2.0-dev # golang -ENV GOLANG_VERSION 1.7.6 +ENV GOLANG_VERSION 1.10.8 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 ad5808bf42b014c22dd7646458f631385003049ded0bb6af2efc7f1f79fa29ea +ENV GOLANG_DOWNLOAD_SHA256 d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ tar -C /usr/local -xzf golang.tar.gz && \
[thrift] branch master updated: THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 0c4e96f THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) 0c4e96f is described below commit 0c4e96f956cd7e3dc527ef215b14c0407148f46c Author: soroshsabz AuthorDate: Fri Mar 15 15:05:18 2019 +0330 THRIFT-4811: Add CMake config file and targets. (see #4752) (#1748) * Add CMake config file and targets. (see #4752) * Exclude cygwin Co-Authored-By: soroshsabz --- CMakeLists.txt| 3 +++ build/cmake/DefineInstallationPaths.cmake | 3 ++- build/cmake/GenerateConfigModule.cmake| 44 +++ build/cmake/ThriftConfig.cmake.in | 42 + build/cmake/ThriftMacros.cmake| 12 +++-- 5 files changed, 101 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c77a601..1880b79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,9 @@ include(StaticCodeAnalysis) # Generate the config.h file include(ConfigureChecks) +# Generate the ThriftConfig.cmake module +include(GenerateConfigModule) + # Packaging include(CPackConfig) diff --git a/build/cmake/DefineInstallationPaths.cmake b/build/cmake/DefineInstallationPaths.cmake index d9a7174..0c824cc 100644 --- a/build/cmake/DefineInstallationPaths.cmake +++ b/build/cmake/DefineInstallationPaths.cmake @@ -22,10 +22,11 @@ set(BIN_INSTALL_DIR "bin" CACHE PATH "The binary install dir (default: bin)") set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The library install dir (default: lib${LIB_SUFFIX})") set(INCLUDE_INSTALL_DIR "include" CACHE PATH "The library install dir (default: include)") -set(CMAKE_INSTALL_DIR "cmake" CACHE PATH "The subdirectory to install cmake config files (default: cmake)") +set(CMAKE_INSTALL_DIR "lib/cmake" CACHE PATH "The subdirectory to install cmake config files (default: cmake)") set(PKGCONFIG_INSTALL_DIR "lib/pkgconfig" CACHE PATH "The subdirectory to install pkgconfig config files (default: lib/pkgconfig)") set(DOC_INSTALL_DIR "share/doc" CACHE PATH "The subdirectory to install documentation files (default: share/doc)") set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix "${CMAKE_INSTALL_PREFIX}/bin") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") set(includedir "${CMAKE_INSTALL_PREFIX}/include") +set(cmakedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DIR}") diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake new file mode 100644 index 000..9533c82 --- /dev/null +++ b/build/cmake/GenerateConfigModule.cmake @@ -0,0 +1,44 @@ +# +# 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. +# + +include(CMakePackageConfigHelpers) +set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}/thrift") +set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}/thrift") +set(PACKAGE_BIN_INSTALL_DIR "${exec_prefix}") + +# In CYGWIN enviroment below commands does not work properly +if (NOT CYGWIN) + configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/ThriftConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/ThriftConfig.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_DIR}/thrift" + PATH_VARS + PACKAGE_INCLUDE_INSTALL_DIR + PACKAGE_CMAKE_INSTALL_DIR + PACKAGE_BIN_INSTALL_DIR + ) + + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/ThriftConfigVersion.cmake" + VERSION
[thrift] branch master updated: Add git gpg signing and public dev voting info [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new f26f4e1 Add git gpg signing and public dev voting info [ci skip] f26f4e1 is described below commit f26f4e1e6d7a56801ef676e503d9da93ad87f86a Author: James E. King III AuthorDate: Wed Mar 13 13:39:00 2019 -0400 Add git gpg signing and public dev voting info [ci skip] --- doc/ReleaseManagement.md | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/ReleaseManagement.md b/doc/ReleaseManagement.md index da944b8..3889dd1 100644 --- a/doc/ReleaseManagement.md +++ b/doc/ReleaseManagement.md @@ -267,6 +267,11 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p 1. If any issues are brought up with the release candidate, you will need to package another and reset the voting clock. +Voting on the development mailing list provides additional benefits (wisdom from [Christopher Tubbs](https://issues.apache.org/jira/browse/THRIFT-4506?focusedCommentId=16791902=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16791902)): +- It creates a public record for the vote, +- It allows for participation/evaluation from our wider user audience (more diversity in evaluators improves quality), and +- It provides more entry points for potential future committers/PMC members to earn merit through participation. + ### Official Release 1. Send a message to `d...@thrift.apache.org` with the voting results. Use this template as a guide: @@ -303,14 +308,18 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p **NOTE:** All new releases must have the "v" prefix to satisfy third party package managers (dlang dub, golang, etc..) +**NOTE:** You **should** [sign the release tag](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work). Since you already have a GPG signing key for publishing the Apache Release, you want to [upload that key to your GitHub account](https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account). Once the key is known by GitHub you can sign the tag. + ```bash ~/thrift$ # make sure you are on the release branch ~/thrift$ git checkout release/1.0.0 ~/thrift$ git pull -~/thrift$ git tag v1.0.0 +~/thrift$ git tag -s v1.0.0 -m "Version 1.0.0" ~/thrift$ git push --tags ``` +**NOTE:** If you get the error "gpg failed to sign the data" when tagging, try this fix: "export GPG_TTY=$(tty)" + 1. Create a new release from the [GitHub Tags Page](https://github.com/apache/thrift/tags). Attach the statically built Windows thrift compiler as a binary here. 1. Merge the release branch into master. This ensures all changes made to fix up the release are in master. @@ -361,7 +370,7 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p 1. **FIXME** Ask someone with admin access to Apache Jira to change the fixVersion in question from unreleased to released, for example: https://issues.apache.org/jira/browse/THRIFT-4686 -1. Ensure that the [Jira release page](https://issues.apache.org/jira/projects/THRIFT?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page=unreleased) for the version has the same number of issues in the version as issues done, and that there are no issues in progress and no issues to do, and no warnings. +1. Ensure that the [Jira release page](https://issues.apache.org/jira/projects/THRIFT?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page=unreleased) for the version has the same number of issues in the version as issues done, and that there are no issues in progress and no issues to do, and no warnings. Finally, mark it as released and set the date of the release. * [Report any CVEs](https://apache.org/security/committers.html) that were fixed. You can email `secur...@apache.org` if you are not sure if there are any CVEs to report. @@ -369,6 +378,8 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p See https://thrift.apache.org/lib/ for the current status of each external package manager's distribution. Information below is from the 0.12.0 release: + > This section needs to be updated with detailed instructions for each language, or pointers to the README.md files in each language directory with detailed release instructions for the given package management system. + * [dart] Releasing this requires a google account. * You will need to install the same version of dart that is used in the docker image. * Go into lib/dart and run "pub publish --dry-run" and resolve any warnings.
[thrift] tag hier deleted (was 790a388)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag hier in repository https://gitbox.apache.org/repos/asf/thrift.git. *** WARNING: tag hier was deleted! *** was 790a388 THRIFT-2621 Add basic default hash code method to python Client: Python Patch: Kishor Patil & Jens Geyer The revisions that were on this tag are still contained in other references; therefore, this change does not discard any commits from the repository.
[thrift] annotated tag 0.9.3.1 updated (a9b748b -> ed3db81)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to annotated tag 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. *** WARNING: tag 0.9.3.1 was modified! *** from a9b748b (commit) to ed3db81 (tag) tagging a9b748bb0e02a2b6aaa3f39d09ec7f1fa47a0cf4 (commit) replaces 0.9.3 by James E. King III on Sat Mar 9 10:25:29 2019 -0500 - Log - Version 0.9.3.1 -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEk0jwNpoggYQA+HFAxvKxG+3QJoMFAlyJAV4ACgkQxvKxG+3Q JoMl7w/9Edz77wKBy9Ig2V7/v6yJmJ9yOP/ze3gptQtN92DRTroBqCGkNol1Tca6 KTwXWW5jZict3MSguRqasMzwNVietUjZ4Xm6GZCalWSoy1i/BXkQJOFJH/QrqLAn eEvrTJvwlobWCD+NN2iFk5KfVpqPt3VSVxBjC7aVHLCmYgd+WWHoqWDHdVDq8Nxx UEVpjWg9Kuua45OEVe+g9b96UoyEGwDpoI9yra8VSKa/5+z3iGvig4EeFJlxTP2o 83wtjgfDd5/yiWQczTy9SSIhrewUxgdVpvFO3F4/I158tOCr3g6wkkDXRCRiEyLN WYcFHrMMVUffADbg2ED0UjYiHTfLNBQOhuRVYA6LdVfyp0XcVMt/bbgYUsMJg6lO aY996NsB7EMGq52iqomyVcqb1TPG9fCcYC0pfseQ8QDemtGSEmkVWgqmFzrmwtm4 OTtb1Mct9CFVhehC9dUWyzA9n5sl+QPQ1wcK0uYgwhlzuPU/x8akoXejh8l68kYG JS1a4R7PFdr6KEFKvD9T6fIK7yuAMpWFJ9AKZLErHKvaTiQ96uaFuYQ6xHDHtOaR RzSdSP4p8zcoN/apc0OxWUsoKvynON3h7nHVUnJKTc2+tj/azTENydhUhCGVtuFz HNewF4V2rKtkso2+gDArM3Ao/jBaSfbH0Dcy/7/vJsgHiJ8NYyI= =5E/g -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[thrift] tag hier created (now 790a388)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag hier in repository https://gitbox.apache.org/repos/asf/thrift.git. at 790a388 (commit) No new revisions were added by this update.
[thrift] tag 0.9.3.1 deleted (was a9b748b)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. *** WARNING: tag 0.9.3.1 was deleted! *** was a9b748b Updated CHANGES The revisions that were on this tag are still contained in other references; therefore, this change does not discard any commits from the repository.
[thrift] branch master updated (22c412e -> e6fa4aa)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from 22c412e THRIFT-4817 Add string CTOR to TTlsSocketTransport Client: netstd Patch: Jens Geyer new a9b748b Updated CHANGES new e6fa4aa Merge changelog from 0.9.3.1 release to master [ci skip] The 5642 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGES.md | 7 +++ 1 file changed, 7 insertions(+)
svn commit: r32907 - /dev/thrift/0.9.3.1-rc0/
Author: jking Date: Wed Mar 13 12:36:27 2019 New Revision: 32907 Log: Remove Apache Thrift 0.9.3.1-rc0 candidate due to release Removed: dev/thrift/0.9.3.1-rc0/
svn commit: r32906 - in /release/thrift/0.9.3.1: ./ README.txt thrift-0.9.3.1.tar.gz thrift-0.9.3.1.tar.gz.asc thrift-0.9.3.1.tar.gz.md5 thrift-0.9.3.1.tar.gz.sha1 thrift-0.9.3.1.tar.gz.sha256
Author: jking Date: Wed Mar 13 12:35:23 2019 New Revision: 32906 Log: Apache Thrift 0.9.3.1 Release Added: release/thrift/0.9.3.1/ release/thrift/0.9.3.1/README.txt release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz (with props) release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.asc release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.md5 release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha1 release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha256 Added: release/thrift/0.9.3.1/README.txt == --- release/thrift/0.9.3.1/README.txt (added) +++ release/thrift/0.9.3.1/README.txt Wed Mar 13 12:35:23 2019 @@ -0,0 +1,4 @@ +This patch of 0.9.3 fixes CVE-2018-1320 and is released to maven central +as libthrift 0.9.3-1. This CVE is fixed specifically in 0.9.3.1 and also +in 0.12.0 or later. There is no 0.9.3.1 windows compiler distributed here +so use the one from release 0.9.3 as it has not changed. Added: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz == Binary file - no diff available. Propchange: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz -- svn:mime-type = application/octet-stream Added: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.asc == --- release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.asc (added) +++ release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.asc Wed Mar 13 12:35:23 2019 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEk0jwNpoggYQA+HFAxvKxG+3QJoMFAlyD3AwACgkQxvKxG+3Q +JoNl6RAAqgTx9nOO0sblW1AfBhSsl9iBmJk/O8f6EKminu/Uk5pA83Jytqw9Ndq2 +GpUbhlLm75k5cxogVCVE7e21ZV4jZLpL+5GgUA54SWnbKJUTUpFdrC3/4hfQQ8pm +IXcTcOevOboBrfMPEdC2TQcCNHqZvKeTrk3wJiBmYlujXnphLsRViqmfHHWCV/2z +KYAD5hgAXRaYxLC3gsgF/5r9JOyI69cX5xrUsR/uASBe/cd2hY+jkAU8RMAFFcJc +Dh7wnvj9x+s8+oPNUQtoxZjeQZqIyIxAJpSwB8wNvU54KY8yryQ9SG1FXmE/FRYQ +SGdgwSKXRnnKeFtgrsvM9VYkWaJ5xBKrRVmXE2wFh3fSb65OzVizQA9CXDT8QHpT +WkNBiYGl7ful1e8szUcA24Lv6RJ2rW7nMZgWmm5sN3XQLj7eQHB38bQ0qdCaWHG/ +77ubZNa0XYo2OE6Nk6+oVFy22uPE+mrLxWop1t7PuK0MPzQsUGJvH0vHjArQD+9R +AVHt2iEhSftqHJPOrwoqn7nswyq096TIkXonZ78cyHsLuH9ioOMkkgZDdaKoiGjs +L+g+JnuJ0haj1q9gDaefVHSCFo/nKfre5dfm8Jegp7XPq6bOt84hpeACN2Jbu604 +HXMvcpcoL4Z8xG+5Iu3pmkTcNxVpsG+r5sEVZXc6YcsCzNi053E= +=vUgS +-END PGP SIGNATURE- Added: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.md5 == --- release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.md5 (added) +++ release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.md5 Wed Mar 13 12:35:23 2019 @@ -0,0 +1 @@ +8bb75fe80db2591c5e814ef377e2715b thrift-0.9.3.1.tar.gz Added: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha1 == --- release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha1 (added) +++ release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha1 Wed Mar 13 12:35:23 2019 @@ -0,0 +1 @@ +f787ceb100555eaa19cd20112ce5a703560efc5a thrift-0.9.3.1.tar.gz Added: release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha256 == --- release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha256 (added) +++ release/thrift/0.9.3.1/thrift-0.9.3.1.tar.gz.sha256 Wed Mar 13 12:35:23 2019 @@ -0,0 +1 @@ +8e5f59285f43bdbb30825e731d946dab49686b003f141b000539cd3eaa3f8aa2 thrift-0.9.3.1.tar.gz
[thrift] branch master updated: Fix svn commit command (publishing to apache dist) [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new dc1b301 Fix svn commit command (publishing to apache dist) [ci skip] dc1b301 is described below commit dc1b301b311d8865eff2a49fad6343f7302fd9a9 Author: James E. King III AuthorDate: Sat Mar 9 10:37:24 2019 -0500 Fix svn commit command (publishing to apache dist) [ci skip] --- doc/ReleaseManagement.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ReleaseManagement.md b/doc/ReleaseManagement.md index 9cf02da..da944b8 100644 --- a/doc/ReleaseManagement.md +++ b/doc/ReleaseManagement.md @@ -208,7 +208,7 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p ```bash ~/dist/dev/thrift$ svn status # verify everything is correct -~/dist/dev/thrift$ svn add 1.0.0-rc0 -m "apache thrift 1.0.0-rc0 in dist dev" \ +~/dist/dev/thrift$ svn commit -m "Apache Thrift 1.0.0-rc0 in dist dev" \ --username --password ``` @@ -293,7 +293,7 @@ All Apache Thrift releases go through a 72-hour final release candidate voting p ~/dist/release/thrift$ cp -p ../../dev/thrift/1.0.0-rc0/* 1.0.0/ ~/dist/release/thrift$ svn status # verify everything is correct -~/dist/release/thrift$ svn add 1.0.0 -m "Apache Thrift 1.0.0 official release" \ +~/dist/release/thrift$ svn commit -m "Apache Thrift 1.0.0 official release" \ --username --password ```
svn commit: r32836 - in /dev/thrift/0.9.3.1-rc0: ./ thrift-0.9.3.1.tar.gz thrift-0.9.3.1.tar.gz.asc thrift-0.9.3.1.tar.gz.md5 thrift-0.9.3.1.tar.gz.sha1 thrift-0.9.3.1.tar.gz.sha256
Author: jking Date: Sat Mar 9 15:35:12 2019 New Revision: 32836 Log: Apache Thrift 0.9.3.1-rc0 in dist dev Added: dev/thrift/0.9.3.1-rc0/ dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz (with props) dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.asc dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.md5 dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha1 dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha256 Added: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz == Binary file - no diff available. Propchange: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz -- svn:mime-type = application/octet-stream Added: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.asc == --- dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.asc (added) +++ dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.asc Sat Mar 9 15:35:12 2019 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEEk0jwNpoggYQA+HFAxvKxG+3QJoMFAlyD3AwACgkQxvKxG+3Q +JoNl6RAAqgTx9nOO0sblW1AfBhSsl9iBmJk/O8f6EKminu/Uk5pA83Jytqw9Ndq2 +GpUbhlLm75k5cxogVCVE7e21ZV4jZLpL+5GgUA54SWnbKJUTUpFdrC3/4hfQQ8pm +IXcTcOevOboBrfMPEdC2TQcCNHqZvKeTrk3wJiBmYlujXnphLsRViqmfHHWCV/2z +KYAD5hgAXRaYxLC3gsgF/5r9JOyI69cX5xrUsR/uASBe/cd2hY+jkAU8RMAFFcJc +Dh7wnvj9x+s8+oPNUQtoxZjeQZqIyIxAJpSwB8wNvU54KY8yryQ9SG1FXmE/FRYQ +SGdgwSKXRnnKeFtgrsvM9VYkWaJ5xBKrRVmXE2wFh3fSb65OzVizQA9CXDT8QHpT +WkNBiYGl7ful1e8szUcA24Lv6RJ2rW7nMZgWmm5sN3XQLj7eQHB38bQ0qdCaWHG/ +77ubZNa0XYo2OE6Nk6+oVFy22uPE+mrLxWop1t7PuK0MPzQsUGJvH0vHjArQD+9R +AVHt2iEhSftqHJPOrwoqn7nswyq096TIkXonZ78cyHsLuH9ioOMkkgZDdaKoiGjs +L+g+JnuJ0haj1q9gDaefVHSCFo/nKfre5dfm8Jegp7XPq6bOt84hpeACN2Jbu604 +HXMvcpcoL4Z8xG+5Iu3pmkTcNxVpsG+r5sEVZXc6YcsCzNi053E= +=vUgS +-END PGP SIGNATURE- Added: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.md5 == --- dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.md5 (added) +++ dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.md5 Sat Mar 9 15:35:12 2019 @@ -0,0 +1 @@ +8bb75fe80db2591c5e814ef377e2715b thrift-0.9.3.1.tar.gz Added: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha1 == --- dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha1 (added) +++ dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha1 Sat Mar 9 15:35:12 2019 @@ -0,0 +1 @@ +f787ceb100555eaa19cd20112ce5a703560efc5a thrift-0.9.3.1.tar.gz Added: dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha256 == --- dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha256 (added) +++ dev/thrift/0.9.3.1-rc0/thrift-0.9.3.1.tar.gz.sha256 Sat Mar 9 15:35:12 2019 @@ -0,0 +1 @@ +8e5f59285f43bdbb30825e731d946dab49686b003f141b000539cd3eaa3f8aa2 thrift-0.9.3.1.tar.gz
[thrift] tag 0.9.3.1 created (now a9b748b)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. at a9b748b (commit) No new revisions were added by this update.
[thrift] tag 0.9.3.1 deleted (was 7a51197)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. *** WARNING: tag 0.9.3.1 was deleted! *** was 7a51197 0.9.3.1 packaging fixups The revisions that were on this tag are still contained in other references; therefore, this change does not discard any commits from the repository.
[thrift] branch 0.9.3.1 updated: Updated CHANGES
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/0.9.3.1 by this push: new a9b748b Updated CHANGES a9b748b is described below commit a9b748bb0e02a2b6aaa3f39d09ec7f1fa47a0cf4 Author: James E. King III AuthorDate: Sat Mar 9 10:25:29 2019 -0500 Updated CHANGES --- CHANGES | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 8699261..db6841b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,11 @@ Apache Thrift Changelog +Thrift 0.9.3.1 + +## Bug +* [THRIFT-4506] - CVE-2018-1320 for Java SASL backported from 0.12.0 + + Thrift 0.9.3 ## Bug @@ -249,7 +255,7 @@ Thrift 0.9.3 * [THRIFT-3176] - Union incorrectly implements == * [THRIFT-3177] - Fails to run rake test * [THRIFT-3180] - lua plugin: framed transport do not work -* [THRIFT-3179] - lua plugin cant connect to remote server because function l_socket_create_and_connect always bind socket to localhost +* [THRIFT-3179] - lua plugin cant connect to remote server because function l_socket_create_and_connect always bind socket to localhost * [THRIFT-3248] - TypeScript: additional comma in method signature without parameters * [THRIFT-3302] - Go JSON protocol should encode Thrift byte type as signed integer string * [THRIFT-3297] - c_glib: an abstract base class is not generated
[thrift] tag 0.9.3.1 created (now 7a51197)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to tag 0.9.3.1 in repository https://gitbox.apache.org/repos/asf/thrift.git. at 7a51197 (commit) No new revisions were added by this update.
[thrift] branch 0.12.1 updated: fix java build issue
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch 0.12.1 in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/0.12.1 by this push: new 17fa32f fix java build issue 17fa32f is described below commit 17fa32f27556af3893beee9e1c364a4d997b3cbf Author: James E. King III AuthorDate: Sat Mar 9 09:19:54 2019 -0500 fix java build issue --- lib/java/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/java/build.gradle b/lib/java/build.gradle index 5b0541b..d03b273 100644 --- a/lib/java/build.gradle +++ b/lib/java/build.gradle @@ -45,11 +45,10 @@ defaultTasks 'build' // Version components for this project group = property('thrift.groupid') -// Drop the -dev suffix, we use the SNAPSHOT suffix for non-release versions if (Boolean.parseBoolean(project.release)) { -version = parsedVersion +version = property('thrift.version') } else { -version = parsedVersion + '-SNAPSHOT' +version = property('thrift.version') + '-SNAPSHOT' } // Keeping the rest of the build logic in functional named scripts for clarity
[thrift] branch master updated (a34f783 -> e60b33d)
This is an automated email from the ASF dual-hosted git repository. jking pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git. from a34f783 THRIFT-4812 haxelib readme still points to old ASF git repo Client: haxe Patch: Jens Geyer new 7489ed6 THRIFT-4506: fix use of assert for correctness in Java SASL negotiation Client: java new 7a51197 0.9.3.1 packaging fixups new e60b33d Merge branch '0.9.3.1' - empty merge [ci skip] The 5637 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
[thrift] branch master updated: Minor update to LANGUAGES.md [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 6e5c0f6 Minor update to LANGUAGES.md [ci skip] 6e5c0f6 is described below commit 6e5c0f6e315ea1cd8526789558bfd10d6cee2173 Author: James E. King III AuthorDate: Fri Feb 22 09:14:17 2019 -0500 Minor update to LANGUAGES.md [ci skip] --- LANGUAGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LANGUAGES.md b/LANGUAGES.md index 4602ded..3510138 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -154,7 +154,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr -https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22.NETCore%20-%20Compiler%22%2C%20%22.NETCore%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Core +https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22netcore%20-%20Compiler%22%2C%20%22netcore%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Core https://github.com/apache/thrift/blob/master/lib/netstd/README.md;>.NET Standard @@ -165,7 +165,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr -https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22.NETCore%20-%20Compiler%22%2C%20%22.NETCore%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Standard +https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22netstd%20-%20Compiler%22%2C%20%22netstd%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Standard https://github.com/apache/thrift/blob/master/lib/erl/README.md;>Erlang
[thrift] branch master updated: Minor fix to LANGUAGES.md [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new c63eacc Minor fix to LANGUAGES.md [ci skip] c63eacc is described below commit c63eacc684f4e4bada8381a9f8c06ea4644f6def Author: James E. King III AuthorDate: Fri Feb 22 09:11:35 2019 -0500 Minor fix to LANGUAGES.md [ci skip] --- LANGUAGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LANGUAGES.md b/LANGUAGES.md index e84fecb..4602ded 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -165,7 +165,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr -https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22.NETCore%20-%20Compiler%22%2C%20%22.NETCore%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Core +https://issues.apache.org/jira/issues/?jql=project%20%3D%20THRIFT%20AND%20component%20in%20(%22.NETCore%20-%20Compiler%22%2C%20%22.NETCore%20-%20Library%22)%20and%20status%20not%20in%20(fixed%2C%20resolved%2C%20closed)">.NET Standard https://github.com/apache/thrift/blob/master/lib/erl/README.md;>Erlang
[thrift] branch master updated: THRIFT-4808: Update LANGUAGES.md [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 36d4552 THRIFT-4808: Update LANGUAGES.md [ci skip] 36d4552 is described below commit 36d4552532f46128fcca12bb3fa0b72e6fcdd817 Author: James E. King III AuthorDate: Fri Feb 22 08:13:38 2019 -0500 THRIFT-4808: Update LANGUAGES.md [ci skip] --- LANGUAGES.md | 130 +++ 1 file changed, 77 insertions(+), 53 deletions(-) diff --git a/LANGUAGES.md b/LANGUAGES.md index b74fd3e..e84fecb 100644 --- a/LANGUAGES.md +++ b/LANGUAGES.md @@ -1,14 +1,38 @@ # Apache Thrift Language Support # -Last Modified: 2018-12-17 +Guidance For: 0.13.0 | +[0.12.0](https://github.com/apache/thrift/blob/v0.12.0/LANGUAGES.md) | +[0.11.0](https://github.com/apache/thrift/blob/0.11.0/LANGUAGES.md) -Guidance For: 0.12.0 or later +Thrift supports many programming languages and has an impressive test suite that +exercises most of the languages, protocols, and transports. Each build exercises +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. The information provided below will 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, or better yet, +[Edit on GitHub](https://github.com/apache/thrift/edit/master/LANGUAGES.md). -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 [...] +Apache Thrift currently uses two build systems. The `autoconf` build system is +the most complete and builds all supported languages, however it does not support +Windows.. The `cmake` build system works on Linux and Windows, and has been +designated by the project to replace `autoconf` however this transition will +take quite some time to complete. During that transition, the cmake build will +not support all languages. -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. Other language levels may be supported +for each language, however tested less thoroughly; check the README file inside +each lib directory for additional details. Note: 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. -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. Other language levels may be supported for each language, however tested less thoroughly; check the README file inside each lib directory for additional details. Note that while a language may contain support for protocols, transports, and servers, the extent to which each is tested as part of the [...] +Thrift's core transport (supported by all languages) is TSocket. +Thrift's core protocol is TBinary, supported by all languages except for JavaScript. @@ -18,7 +42,7 @@ The Language/Library Levels indicate the minimum and maximum versions that are u Build Systems Lang/Lib Levels (Tested) Low-Level Transports -Transport Wrappers +Transport Wrappers Protocols Servers Open Issues @@ -27,7 +51,7 @@ The Language/Library Levels indicate the minimum and maximum versions that are u autoconfcmake MinMax https://en.wikipedia.org/wiki/Unix_domain_socket;>DomainFileMemoryPipeSocketTLS -Framedhttpzlib +FramedHeaderhttpzlib BinaryCompactJSONMultiplex ForkingNonblockingSimpleThreadedThreadPool @@ -39,7 +63,7 @@ The Language/Library Levels indicate the minimum and maximum versions that are u
[thrift] branch master updated: [THRIFT-4771] add nodejs THeaderProtocol support (#1743)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new ddd2224 [THRIFT-4771] add nodejs THeaderProtocol support (#1743) ddd2224 is described below commit ddd2224e9c91207b1e90a3702278b17060a3dbb7 Author: David Mai AuthorDate: Fri Feb 22 03:37:49 2019 -0800 [THRIFT-4771] add nodejs THeaderProtocol support (#1743) Client: nodejs --- lib/nodejs/lib/thrift/binary_protocol.js| 4 + lib/nodejs/lib/thrift/buffered_transport.js | 3 + lib/nodejs/lib/thrift/framed_transport.js | 3 + lib/nodejs/lib/thrift/header_protocol.js| 256 + lib/nodejs/lib/thrift/header_transport.js | 339 lib/nodejs/lib/thrift/index.js | 1 + lib/nodejs/lib/thrift/server.js | 14 +- lib/nodejs/test/header.test.js | 78 +++ lib/nodejs/test/helpers.js | 3 +- lib/nodejs/test/test_header_payload | Bin 0 -> 76 bytes test/features/known_failures_Linux.json | 4 +- test/known_failures_Linux.json | 14 ++ test/tests.json | 3 +- 13 files changed, 717 insertions(+), 5 deletions(-) diff --git a/lib/nodejs/lib/thrift/binary_protocol.js b/lib/nodejs/lib/thrift/binary_protocol.js index 6ab9c05..af8836c 100644 --- a/lib/nodejs/lib/thrift/binary_protocol.js +++ b/lib/nodejs/lib/thrift/binary_protocol.js @@ -33,6 +33,10 @@ var VERSION_MASK = -65536, // 0x VERSION_1 = -2147418112, // 0x8001 TYPE_MASK = 0x00ff; +TBinaryProtocol.VERSION_MASK = VERSION_MASK; +TBinaryProtocol.VERSION_1 = VERSION_1; +TBinaryProtocol.TYPE_MASK = TYPE_MASK + function TBinaryProtocol(trans, strictRead, strictWrite) { this.trans = trans; this.strictRead = (strictRead !== undefined ? strictRead : false); diff --git a/lib/nodejs/lib/thrift/buffered_transport.js b/lib/nodejs/lib/thrift/buffered_transport.js index a9e006e..113e216 100644 --- a/lib/nodejs/lib/thrift/buffered_transport.js +++ b/lib/nodejs/lib/thrift/buffered_transport.js @@ -19,6 +19,7 @@ var binary = require('./binary'); var InputBufferUnderrunError = require('./input_buffer_underrun_error'); +var THeaderTransport = require('./header_transport'); module.exports = TBufferedTransport; @@ -33,6 +34,8 @@ function TBufferedTransport(buffer, callback) { this.onFlush = callback; }; +TBufferedTransport.prototype = new THeaderTransport(); + TBufferedTransport.prototype.reset = function() { this.inBuf = new Buffer(this.defaultReadBufferSize); this.readCursor = 0; diff --git a/lib/nodejs/lib/thrift/framed_transport.js b/lib/nodejs/lib/thrift/framed_transport.js index 6947925..f7daa3f 100644 --- a/lib/nodejs/lib/thrift/framed_transport.js +++ b/lib/nodejs/lib/thrift/framed_transport.js @@ -19,6 +19,7 @@ var binary = require('./binary'); var InputBufferUnderrunError = require('./input_buffer_underrun_error'); +var THeaderTransport = require('./header_transport'); module.exports = TFramedTransport; @@ -30,6 +31,8 @@ function TFramedTransport(buffer, callback) { this.onFlush = callback; }; +TFramedTransport.prototype = new THeaderTransport(); + TFramedTransport.receiver = function(callback, seqid) { var residual = null; diff --git a/lib/nodejs/lib/thrift/header_protocol.js b/lib/nodejs/lib/thrift/header_protocol.js new file mode 100644 index 000..0c3b0db --- /dev/null +++ b/lib/nodejs/lib/thrift/header_protocol.js @@ -0,0 +1,256 @@ +/* + * 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. + */ +var util = require('util'); +var TBinaryProtocol = require('./binary_protocol'); +var TCompactProtocol = require('./compact_protocol'); +var THeaderTransport = require('./header_transport'); + +var ProtocolMap = {}; +ProtocolMap[THeaderTransport.SubprotocolId.BINARY] = TBinaryProtocol; +ProtocolMap[THeaderTransport.SubprotocolId.COMPACT] = TCompactProtocol; + +module.exports = THeaderProtocol; + +function THeaderProtocolError(message) { + Error.call(this); + Error.captureStackTrace
[thrift] branch master updated: THRIFT-4807: Fix php segfault on reference pass
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new a4ee1f2 THRIFT-4807: Fix php segfault on reference pass a4ee1f2 is described below commit a4ee1f281bc4ec4b08efe3a5b3408738d7f9f516 Author: Josip Sokcevic AuthorDate: Wed Feb 20 23:15:08 2019 -0800 THRIFT-4807: Fix php segfault on reference pass Client: php (extension) When reference is passed to php extension, it's unreferenced (instead of derefrenced). The next time one tries to use the same variable PHP segaults. Even if not used again, php segfaults on user_shutdown_function_call. --- lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp index 63c8905..e152d08 100644 --- a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp +++ b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp @@ -1013,7 +1013,7 @@ void binary_serialize_spec(zval* zthis, PHPOutputTransport& transport, HashTable zval* prop = zend_read_property(Z_OBJCE_P(zthis), zthis, varname, strlen(varname), false, ); if (Z_TYPE_P(prop) == IS_REFERENCE){ - ZVAL_UNREF(prop); + ZVAL_DEREF(prop); } if (Z_TYPE_P(prop) != IS_NULL) { transport.writeI8(ttype);
[thrift] branch master updated: THRIFT-4768 Remove "nullable" option from the code base (netstd ONLY) Client: netstd Patch: Jens Geyer
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new c6b019a THRIFT-4768 Remove "nullable" option from the code base (netstd ONLY) Client: netstd Patch: Jens Geyer c6b019a is described below commit c6b019affd5f6b9598069e3d5d3f78dec035cb1a Author: Jens Geyer AuthorDate: Tue Jan 29 23:45:52 2019 +0100 THRIFT-4768 Remove "nullable" option from the code base (netstd ONLY) Client: netstd Patch: Jens Geyer --- .../cpp/src/thrift/generate/t_netstd_generator.cc | 212 ++--- .../cpp/src/thrift/generate/t_netstd_generator.h | 6 +- 2 files changed, 60 insertions(+), 158 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc index 593bb64..47a1dd1 100644 --- a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc @@ -140,8 +140,6 @@ static bool type_can_be_null(t_type* ttype) bool t_netstd_generator::is_wcf_enabled() const { return wcf_; } -bool t_netstd_generator::is_nullable_enabled() const { return false; } - bool t_netstd_generator::is_serialize_enabled() const { return serialize_; } bool t_netstd_generator::is_union_enabled() const { return union_; } @@ -186,8 +184,7 @@ void t_netstd_generator::init_generator() cleanup_member_name_mapping(member_mapping_scopes.back().scope_member); } -pverbose(".NET Core options:\n"); -//pverbose("- nullable ... %s\n", (is_nullable_enabled() ? "ON" : "off")); -- deprecated, removal candidate +pverbose(".NET Standard options:\n"); pverbose("- union .. %s\n", (is_union_enabled() ? "ON" : "off")); pverbose("- serialize .. %s\n", (is_serialize_enabled() ? "ON" : "off")); pverbose("- wcf %s\n", (is_wcf_enabled() ? "ON" : "off")); @@ -579,7 +576,7 @@ bool t_netstd_generator::print_const_value(ostream& out, string name, t_type* ty } else if (type->is_enum()) { -out << name << " = " << type_name(type, false, true) << "." << value->get_identifier_name() << ";" << endl; +out << name << " = " << type_name(type) << "." << value->get_identifier_name() << ";" << endl; need_static_construction = false; } else if (type->is_struct() || type->is_xception()) @@ -588,7 +585,7 @@ bool t_netstd_generator::print_const_value(ostream& out, string name, t_type* ty } else if (type->is_map()) { -out << name << " = new " << type_name(type, true, true) << "();" << endl; +out << name << " = new " << type_name(type) << "();" << endl; } else if (type->is_list() || type->is_set()) { @@ -727,7 +724,7 @@ void t_netstd_generator::generate_netstd_struct_definition(ostream& out, t_struc for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { // if the field is required, then we use auto-properties -if (!field_is_required((*m_iter)) && (!is_nullable_enabled() || field_has_default((*m_iter +if (!field_is_required((*m_iter))) { out << indent() << "private " << declare_field(*m_iter, false, "_") << endl; } @@ -735,29 +732,23 @@ void t_netstd_generator::generate_netstd_struct_definition(ostream& out, t_struc out << endl; bool has_non_required_fields = false; -bool has_non_required_default_value_fields = false; bool has_required_fields = false; for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { generate_netstd_doc(out, *m_iter); generate_property(out, *m_iter, true, true); bool is_required = field_is_required((*m_iter)); -bool has_default = field_has_default((*m_iter)); if (is_required) { has_required_fields = true; } else { -if (has_default) -{ -has_non_required_default_value_fields = true; -} has_non_required_fields = true; } } -bool generate_isset = (is_nullable_enabled() && has_non_required_default_value_fields) || (!is_nullable_enabled() && has_non_required_fields); +bool generate_isset = has_non_required_fields; if (generate_isset) {
[thrift] branch master updated: Fix spelling errors in TSSLSocket.py
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 6b3f7d9 Fix spelling errors in TSSLSocket.py 6b3f7d9 is described below commit 6b3f7d92f9dc231cb7ae1606dd15d8faad38be1a Author: Tim Armstrong AuthorDate: Thu Feb 14 14:59:22 2019 -0800 Fix spelling errors in TSSLSocket.py --- lib/py/src/transport/TSSLSocket.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/py/src/transport/TSSLSocket.py b/lib/py/src/transport/TSSLSocket.py index c87e81c..066d8da 100644 --- a/lib/py/src/transport/TSSLSocket.py +++ b/lib/py/src/transport/TSSLSocket.py @@ -79,8 +79,8 @@ class TSSLBase(object): SSL_VERSION = _default_protocol """ Default SSL version. - For backword compatibility, it can be modified. - Use __init__ keywoard argument "ssl_version" instead. + For backwards compatibility, it can be modified. + Use __init__ keyword argument "ssl_version" instead. """ def _deprecated_arg(self, args, kwargs, pos, key): @@ -89,12 +89,12 @@ class TSSLBase(object): real_pos = pos + 3 warnings.warn( '%dth positional argument is deprecated.' -'please use keyward argument insteand.' +'please use keyword argument instead.' % real_pos, DeprecationWarning, stacklevel=3) if key in kwargs: raise TypeError( -'Duplicate argument: %dth argument and %s keyward argument.' +'Duplicate argument: %dth argument and %s keyword argument.' % (real_pos, key)) kwargs[key] = args[pos] @@ -118,7 +118,7 @@ class TSSLBase(object): if TSSLBase.SSL_VERSION != self._default_protocol: warnings.warn( 'SSL_VERSION is deprecated.' -'please use ssl_version keyward argument instead.', +'please use ssl_version keyword argument instead.', DeprecationWarning, stacklevel=2) self._context = ssl_opts.pop('ssl_context', None) self._server_hostname = None
[thrift] branch master updated: Update the pull request template [ci skip]
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new b000bc0 Update the pull request template [ci skip] b000bc0 is described below commit b000bc02df16a16a21d0fe3467227c3bc6d62a0c Author: James E. King III AuthorDate: Thu Feb 14 17:58:04 2019 -0500 Update the pull request template [ci skip] --- .github/pull_request_template.md | 37 +++-- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a6b4382..edd7bef 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,43 +1,12 @@ - +- [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? (not required for trivial changes) +- [ ] Does your pull request title follow the pattern "THRIFT-: describe my issue"? (not required for trivial changes) - [ ] Did you squash your changes to a single commit? - -- [ ] Do you need an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?Expand for guidance... -- `Yes` if your change requires a release note. -- `Yes` if your change is a breaking change. -- `No` if you change is trivial, such as fixing a typo. - - -- [ ] Is this change worthy of a release note? Examples of Release Note-worthy examples... -- Breaking Changes -- New, Deprecated, or Removed Languages -- Security Fixes -- Significant Refactoring -- Changing how the product is built - - -- [ ] Breaking changes have additional requirements: Expand for instructions... -- Add or reference an existing Apache Jira THRIFT ticket. -- Add a `Breaking-Change` label to the Jira ticket. -- Add a note to the `lib//README.md` file. -- Add a line to the `CHANGES.md` file. - - -- [ ] Does this change require a build? Expand for guidance... -- `Yes` for any code change -- `Yes` for any build script change -- `Yes` for any docker build environment change -- `Yes` for any change affecting the cross test suite -- `No` for documentation-only changes -- `No` for trivial changes, for example fixing a typo. - -If your change does not require a build, you can add [ci skip] to the end of your commit message. -This will avoid costly and unnecessary builds in both the pull request and once it is merged. - +- [ ] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"
[thrift] branch master updated: THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742)
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new dbc1f8d THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742) dbc1f8d is described below commit dbc1f8def5018ce5d85d38b9875c6c6b6b424478 Author: James E. King III AuthorDate: Thu Feb 14 16:46:38 2019 -0500 THRIFT-4024, THRIFT-4783: throw when skipping invalid type (#1742) * THRIFT-4024: make c_glib throw on unsupported type when skipping * THRIFT-4783: throw on invalid skip (py) * THRIFT-4024: make cpp throw on unsupported type when skipping * THRIFT-4024: uniform skip behavior on unsupported type --- .../src/thrift/c_glib/protocol/thrift_protocol.c | 72 ++ lib/cpp/src/thrift/protocol/TProtocol.h| 12 ++-- lib/d/src/thrift/protocol/base.d | 8 +-- lib/dart/lib/src/protocol/t_protocol_util.dart | 2 +- lib/go/thrift/protocol.go | 2 - .../org/apache/thrift/protocol/TProtocolUtil.java | 3 +- lib/js/src/thrift.js | 3 - lib/lua/TProtocol.lua | 8 ++- lib/nodejs/lib/thrift/binary_protocol.js | 2 - lib/nodejs/lib/thrift/compact_protocol.js | 2 - lib/nodejs/lib/thrift/json_protocol.js | 2 - lib/ocaml/src/Thrift.ml| 3 +- lib/py/src/protocol/TProtocol.py | 8 ++- lib/rb/lib/thrift/protocol/base_protocol.rb| 4 +- lib/rb/spec/base_protocol_spec.rb | 1 - lib/swift/Sources/TProtocol.swift | 3 +- 16 files changed, 73 insertions(+), 62 deletions(-) diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c index 8296a8c..6e6ae4d 100644 --- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c +++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c @@ -419,6 +419,13 @@ thrift_protocol_read_binary (ThriftProtocol *protocol, gpointer *buf, len, error); } +#define THRIFT_SKIP_RESULT_OR_RETURN(_RES, _CALL) \ + { \ +gint32 _x = (_CALL); \ +if (_x < 0) { return _x; } \ +(_RES) += _x; \ + } + gint32 thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error) { @@ -469,24 +476,24 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error) gchar *name; gint16 fid; ThriftType ftype; -result += thrift_protocol_read_struct_begin (protocol, , error); - +THRIFT_SKIP_RESULT_OR_RETURN(result, + thrift_protocol_read_struct_begin (protocol, , error)) while (1) { - result += thrift_protocol_read_field_begin (protocol, , , - , error); - if (result < 0) - { -return result; - } + THRIFT_SKIP_RESULT_OR_RETURN(result, +thrift_protocol_read_field_begin (protocol, , , + , error)) if (ftype == T_STOP) { break; } - result += thrift_protocol_skip (protocol, ftype, error); - result += thrift_protocol_read_field_end (protocol, error); + THRIFT_SKIP_RESULT_OR_RETURN(result, +thrift_protocol_skip (protocol, ftype, error)) + THRIFT_SKIP_RESULT_OR_RETURN(result, +thrift_protocol_read_field_end (protocol, error)) } -result += thrift_protocol_read_struct_end (protocol, error); +THRIFT_SKIP_RESULT_OR_RETURN(result, + thrift_protocol_read_struct_end (protocol, error)) return result; } case T_SET: @@ -494,13 +501,16 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error) gint32 result = 0; ThriftType elem_type; guint32 i, size; -result += thrift_protocol_read_set_begin (protocol, _type, , - error); +THRIFT_SKIP_RESULT_OR_RETURN(result, + thrift_protocol_read_set_begin (protocol, _type, , + error)) for (i = 0; i < size; i++) { - result += thrift_protocol_skip (protocol, elem_type, error); + THRIFT_SKIP_RESULT_OR_RETURN(result, +thrift_protocol_skip (protocol, elem_type, error)) } -result += thrift_protocol_read_set_end (protocol, error); +THRIFT_SKIP_RESULT_OR_RETURN(result, + thrift_protocol_read_set_end (protocol, error)) return result; } case T_MAP: @@ -509,14 +519,18 @@ thrift_protocol_skip (ThriftProtocol
svn commit: r1853430 - /thrift/cms-site/trunk/lib/path.pm
Author: jking Date: Tue Feb 12 12:43:24 2019 New Revision: 1853430 URL: http://svn.apache.org/viewvc?rev=1853430=rev Log: Update libraries page. Modified: thrift/cms-site/trunk/lib/path.pm Modified: thrift/cms-site/trunk/lib/path.pm URL: http://svn.apache.org/viewvc/thrift/cms-site/trunk/lib/path.pm?rev=1853430=1853429=1853430=diff == --- thrift/cms-site/trunk/lib/path.pm (original) +++ thrift/cms-site/trunk/lib/path.pm Tue Feb 12 12:43:24 2019 @@ -79,7 +79,6 @@ __DATA__ # Thrift Site Variables title: "Apache Thrift" base_url: "http://thrift.apache.org; -# svn_repo: "https://svn.apache.org/repos/asf/thrift; git_repo: "https://github.com/apache/thrift; release_url: "https://www.apache.org/dist/thrift; mirror_url: "http://www.apache.org/dyn/closer.cgi?path=; @@ -158,10 +157,10 @@ oss_projects: [ external_packages: [ [ "(all)", "Docker", "https://hub.docker.com/_/thrift/;, "Dockerfile", "", "thrift compiler in /usr/local/bin/thrift" ], [ "ActionScript","Maven", "https://repository.apache.org/#nexus-search;quick~libthrift-as3;, "lib/as3/build.xml", "jking", "" ], -[ "C (glib)","", "", "", "", "no official ASF package available" ], -[ "C++", "", "", "", "", "no official ASF package available" ], +[ "C (glib)","", "", "", "", "language has no package manager" ], +[ "C++", "", "", "", "", "see THRIFT-4800" ], [ "C#", "NuGet", "https://www.nuget.org/packages/ApacheThrift;, "ApacheThrift.nuspec","jfarrell, codesf, jking", "multi-framework nupkg for csharp and netcore" ], -[ "Cocoa", "", "", "", "", "no official ASF package available" ], +[ "Cocoa", "", "", "", "", "deprecated on 0.12.0 - use swift" ], [ "Common LISP", "", "", "", "", "no official ASF package available" ], [ "D", "dub", "https://code.dlang.org/packages/apache-thrift;, "dub.json", "jking", "" ], [ "Dart","Pub", "https://pub.dartlang.org/packages/thrift;, "lib/dart/pubspec.yaml", "jking", "" ], @@ -173,7 +172,7 @@ external_packages: [ [ "Java","Maven", "https://repository.apache.org/#nexus-search;quick~org.apache.thrift;, "lib/java/gradle.properties", "jking", "" ], [ "JavaScript", "Bower", "https://libraries.io/bower/thrift;, "bower.json", "", "" ], [ "Lua", "LuaRocks", "https://luarocks.org/modules/drauschenbach/thrift;, "", "", "not official - stale at 0.10.0 - see THRIFT-4708" ], - [ "Node.js",
[thrift] branch master updated: THRIFT-3877: fix py/py3 server, java client with http transport
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 393f6c9 THRIFT-3877: fix py/py3 server, java client with http transport 393f6c9 is described below commit 393f6c93e1a65b7be74d79b5a6b00f878e88a630 Author: James E. King III AuthorDate: Sat Feb 9 10:35:44 2019 -0500 THRIFT-3877: fix py/py3 server, java client with http transport The java TestClient asks the server to runa oneway request that sleeps for 3 seconds. If the java TestClient sees the duration of the call exceed one second, it fails the test. This means the server did not participate in the "fire and forget" dynamics of ONEWAY requests. In this case the THttpServer was processing the RPC before sending the transport response. The fix was to enhance the TProcessor so that the THttpServer has an opportunity to inspect the message header before processing the RPC. This is partly due to the violation of the THttpServer in the layered architecture. It is essentially implementing a combined server and transport, whereas there should be a distinct server, protocol, and transport separation. Many languages seem to have this problem where HTTP was introduced. --- compiler/cpp/src/thrift/generate/t_py_generator.cc | 11 +++ .../test/org/apache/thrift/test/TestClient.java| 11 +-- lib/py/src/TMultiplexedProcessor.py| 4 +++ lib/py/src/Thrift.py | 12 +++ lib/py/src/server/THttpServer.py | 37 ++ test/known_failures_Linux.json | 32 +-- 6 files changed, 67 insertions(+), 40 deletions(-) diff --git a/compiler/cpp/src/thrift/generate/t_py_generator.cc b/compiler/cpp/src/thrift/generate/t_py_generator.cc index c16d6d3..83462f4 100644 --- a/compiler/cpp/src/thrift/generate/t_py_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_py_generator.cc @@ -1831,6 +1831,13 @@ void t_py_generator::generate_service_server(t_service* tservice) { f_service_ << indent() << "self._processMap[\"" << (*f_iter)->get_name() << "\"] = Processor.process_" << (*f_iter)->get_name() << endl; } + f_service_ << indent() << "self._on_message_begin = None" << endl; + indent_down(); + f_service_ << endl; + + f_service_ << indent() << "def on_message_begin(self, func):" << endl; + indent_up(); +f_service_ << indent() << "self._on_message_begin = func" << endl; indent_down(); f_service_ << endl; @@ -1839,6 +1846,10 @@ void t_py_generator::generate_service_server(t_service* tservice) { indent_up(); f_service_ << indent() << "(name, type, seqid) = iprot.readMessageBegin()" << endl; + f_service_ << indent() << "if self._on_message_begin:" << endl; + indent_up(); +f_service_ << indent() << "self._on_message_begin(name, type, seqid)" << endl; + indent_down(); // TODO(mcslee): validate message diff --git a/lib/java/test/org/apache/thrift/test/TestClient.java b/lib/java/test/org/apache/thrift/test/TestClient.java index feaa972..84410ce 100644 --- a/lib/java/test/org/apache/thrift/test/TestClient.java +++ b/lib/java/test/org/apache/thrift/test/TestClient.java @@ -752,13 +752,18 @@ public class TestClient { testClient.testOneway(3); long onewayElapsedMillis = (System.nanoTime() - startOneway) / 100; if (onewayElapsedMillis > 200) { - System.out.println("Oneway test failed: took " + + System.out.println("Oneway test took too long to execute failed: took " + Long.toString(onewayElapsedMillis) + "ms"); - System.out.printf("*** FAILURE ***\n"); + System.out.println("oneway calls are 'fire and forget' and therefore should not cause blocking."); + System.out.println("Some transports (HTTP) have a required response, and typically this failure"); + System.out.println("means the transport response was delayed until after the execution"); + System.out.println("of the RPC. The server should post the transport response immediately and"); + System.out.println("before executing the RPC."); + System.out.println("*** FAILURE ***"); returnCode |= ERR_BASETYPES; } else { - System.out.println("Success - took " + + System.out.println("Success - fire and forg
[thrift] branch master updated: THRIFT-4794: finish php json cross test
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new e53d23c THRIFT-4794: finish php json cross test e53d23c is described below commit e53d23c16c806c6da62ebaa7f205328cf710d9a5 Author: James E. King III AuthorDate: Sun Feb 10 11:13:23 2019 -0500 THRIFT-4794: finish php json cross test --- build/docker/ubuntu-bionic/Dockerfile | 1 + build/docker/ubuntu-xenial/Dockerfile | 1 + test/php/Makefile.am | 1 + test/php/test_php.ini | 1 + test/tests.json | 3 ++- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile index 3566199..a0ed317 100644 --- a/build/docker/ubuntu-bionic/Dockerfile +++ b/build/docker/ubuntu-bionic/Dockerfile @@ -217,6 +217,7 @@ RUN apt-get install -y --no-install-recommends \ php \ php-cli \ php-dev \ + php-json \ php-pear \ re2c \ composer diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile index 88895a0..5693a2c 100644 --- a/build/docker/ubuntu-xenial/Dockerfile +++ b/build/docker/ubuntu-xenial/Dockerfile @@ -218,6 +218,7 @@ RUN apt-get install -y --no-install-recommends \ php7.0 \ php7.0-cli \ php7.0-dev \ + php-json \ php-pear \ re2c \ composer diff --git a/test/php/Makefile.am b/test/php/Makefile.am index 5c42321..52765ee 100755 --- a/test/php/Makefile.am +++ b/test/php/Makefile.am @@ -26,6 +26,7 @@ stubs: ../ThriftTest.thrift php_ext_dir: mkdir -p php_ext_dir ln -s ../../../lib/php/src/ext/thrift_protocol/modules/thrift_protocol.so php_ext_dir/ + ln -s "$$(php-config --extension-dir)/json.so" php_ext_dir/ ln -s "$$(php-config --extension-dir)/sockets.so" php_ext_dir/ precross: stubs php_ext_dir diff --git a/test/php/test_php.ini b/test/php/test_php.ini index 3f9bb21..aeb67cb 100644 --- a/test/php/test_php.ini +++ b/test/php/test_php.ini @@ -1,2 +1,3 @@ extension=thrift_protocol.so +extension=json.so extension=sockets.so diff --git a/test/tests.json b/test/tests.json index 02ae28a..acede24 100644 --- a/test/tests.json +++ b/test/tests.json @@ -545,8 +545,9 @@ ], "protocols": [ "binary", +"binary:accel", "compact", -"binary:accel" +"json" ], "command": [ "php",
[thrift] branch master updated: THRIFT-4784 Thrift should throw when skipping over unexpected data Client: as3 Patch: Jens Geyer
This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git The following commit(s) were added to refs/heads/master by this push: new 2b70c1d THRIFT-4784 Thrift should throw when skipping over unexpected data Client: as3 Patch: Jens Geyer 2b70c1d is described below commit 2b70c1df2bb2c1667f30dff6d4b263459fabe91a Author: Jens Geyer AuthorDate: Sat Feb 9 11:50:03 2019 +0100 THRIFT-4784 Thrift should throw when skipping over unexpected data Client: as3 Patch: Jens Geyer --- lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as index 513df95..22877b7 100644 --- a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as +++ b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as @@ -141,7 +141,7 @@ package org.apache.thrift.protocol { break; } default: - break; + throw new TProtocolError(TProtocolError.INVALID_DATA, "invalid data"); } } }