* [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file
2020-10-06 9:59 [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
@ 2020-10-06 9:59 ` Kirill Yukhin
2020-10-06 10:36 ` Cyrill Gorcunov
2020-10-06 9:59 ` [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11 Kirill Yukhin
2020-10-06 14:50 ` [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
2 siblings, 1 reply; 7+ messages in thread
From: Kirill Yukhin @ 2020-10-06 9:59 UTC (permalink / raw)
To: gorcunov, avtikhon; +Cc: tarantool-patches
File mp_error.cc was using a C99 feature called "designated
initializers" which was catched by Clang v12.
Remove this usage.
---
src/box/mp_error.cc | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/box/mp_error.cc b/src/box/mp_error.cc
index 61cf5e1..36fbcef 100644
--- a/src/box/mp_error.cc
+++ b/src/box/mp_error.cc
@@ -97,6 +97,16 @@ enum {
MP_ERROR_MAX,
};
+static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = {
+ "\"type\": ",
+ "\"file\": ",
+ "\"line\": ",
+ "\"message\": ",
+ "\"errno\": ",
+ "\"code\": ",
+ "\"fields\": ",
+};
+
/**
* The structure is used for storing parameters
* during decoding MP_ERROR.
@@ -561,16 +571,6 @@ error_unpack_unsafe(const char **data)
return err;
}
-static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = {
- [MP_ERROR_TYPE] = "\"type\": ",
- [MP_ERROR_FILE] = "\"file\": ",
- [MP_ERROR_LINE] = "\"line\": ",
- [MP_ERROR_MESSAGE] = "\"message\": ",
- [MP_ERROR_ERRNO] = "\"errno\": ",
- [MP_ERROR_CODE] = "\"code\": ",
- [MP_ERROR_FIELDS] = "\"fields\": ",
-};
-
/**
* Include this file into self with a few template parameters
* to create mp_snprint_error() and mp_fprint_error() functions
--
1.8.3.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11
2020-10-06 9:59 [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
2020-10-06 9:59 ` [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file Kirill Yukhin
@ 2020-10-06 9:59 ` Kirill Yukhin
2020-10-06 11:21 ` Kirill Yukhin
2020-10-06 14:50 ` [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
2 siblings, 1 reply; 7+ messages in thread
From: Kirill Yukhin @ 2020-10-06 9:59 UTC (permalink / raw)
To: gorcunov, avtikhon; +Cc: tarantool-patches
Update Clang 8 testing with most recent version of
Clang: 11.
Closes #5386
---
.gitlab-ci.yml | 10 +++++-----
.gitlab.mk | 2 +-
.travis.mk | 18 +++++++++---------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7a75edb..d40dc74 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -78,7 +78,7 @@ before_script:
tags:
- docker_test
-.docker_test_clang8_template: &docker_test_clang8_definition
+.docker_test_clang11_template: &docker_test_clang8_definition
<<: *artifacts_files_definition
image: "${CI_REGISTRY}/${CI_PROJECT_PATH}/testing/debian-buster:latest"
stage: test
@@ -199,16 +199,16 @@ release_lto:
script:
- ${GITLAB_MAKE} test_debian_no_deps
-release_lto_clang8:
+release_lto_clang11:
<<: *docker_test_clang8_definition
variables:
- CC: clang-8
- CXX: clang++-8
+ CC: clang-11
+ CXX: clang++-11
CMAKE_EXTRA_PARAMS: -DENABLE_LTO=ON
script:
- ${GITLAB_MAKE} test_debian_no_deps
-release_asan_clang8:
+release_asan_clang11:
<<: *docker_test_clang8_definition
script:
- ${GITLAB_MAKE} test_asan_debian_no_deps
diff --git a/.gitlab.mk b/.gitlab.mk
index 0ab8966..6e260dc 100644
--- a/.gitlab.mk
+++ b/.gitlab.mk
@@ -40,7 +40,7 @@ export DEBIAN_STRETCH_DOCKERFILE
define DEBIAN_BUSTER_DOCKERFILE
FROM packpack/packpack:debian-buster
COPY .travis.mk .
-RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_8
+RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_11
endef
export DEBIAN_BUSTER_DOCKERFILE
diff --git a/.travis.mk b/.travis.mk
index 6777abd..88ddbe4 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -28,7 +28,7 @@ test: test_$(TRAVIS_OS_NAME)
test_linux: docker_test_debian
coverage: docker_coverage_debian
lto: docker_test_debian
-lto_clang8: docker_test_debian_clang8
+lto_clang11: docker_test_debian_clang11
asan: docker_test_asan_debian
docker_%:
@@ -55,7 +55,7 @@ docker_%:
# Depends
-# When dependencies in 'deps_debian' or 'deps_buster_clang_8' goal
+# When dependencies in 'deps_debian' or 'deps_buster_clang_11' goal
# are changed, push a new docker image into GitLab Registry using
# the following command:
#
@@ -76,12 +76,12 @@ deps_debian:
python-msgpack python-yaml python-argparse python-six python-gevent \
lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool
-deps_buster_clang_8: deps_debian
- echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list
- echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/clang_8.list
+deps_buster_clang_11: deps_debian
+ echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" > /etc/apt/sources.list.d/clang_11.list
+ echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" >> /etc/apt/sources.list.d/clang_11.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-get update
- apt-get install -y clang-8 llvm-8-dev
+ apt-get install -y clang-11 llvm-11-dev
deps_debian_jepsen: $(BIN_DIR)/clojure $(BIN_DIR)/lein $(BIN_DIR)/terraform
apt-get update ${APT_EXTRA_FLAGS} && apt-get install -y -f \
@@ -115,7 +115,7 @@ test_debian_no_deps: build_debian
test_debian: deps_debian test_debian_no_deps
-test_debian_clang8: deps_debian deps_buster_clang_8 test_debian_no_deps
+test_debian_clang11: deps_debian deps_buster_clang_11 test_debian_no_deps
# Debug with coverage
@@ -143,7 +143,7 @@ coverage_debian: deps_debian test_coverage_debian_no_deps
# ASAN
build_asan_debian:
- CC=clang-8 CXX=clang++-8 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ CC=clang-11 CXX=clang++-11 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_WERROR=ON -DENABLE_ASAN=ON -DENABLE_UB_SANITIZER=ON \
${CMAKE_EXTRA_PARAMS}
make -j
@@ -159,7 +159,7 @@ test_asan_debian_no_deps: build_asan_debian
ASAN_OPTIONS=heap_profile=0:unmap_shadow_on_exit=1:detect_invalid_pointer_pairs=1:symbolize=1:detect_leaks=1:dump_instruction_bytes=1:print_suppressions=0 \
./test-run.py --force $(TEST_RUN_EXTRA_PARAMS)
-test_asan_debian: deps_debian deps_buster_clang_8 test_asan_debian_no_deps
+test_asan_debian: deps_debian deps_buster_clang_11 test_asan_debian_no_deps
# Static build
--
1.8.3.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11
2020-10-06 9:59 ` [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11 Kirill Yukhin
@ 2020-10-06 11:21 ` Kirill Yukhin
2020-10-06 12:46 ` Alexander V. Tikhonov
0 siblings, 1 reply; 7+ messages in thread
From: Kirill Yukhin @ 2020-10-06 11:21 UTC (permalink / raw)
To: avtikhon; +Cc: tarantool-patches
Hello,
On 06 окт 12:59, Kirill Yukhin wrote:
> Update Clang 8 testing with most recent version of
> Clang: 11.
>
> Closes #5386
It was decided to keep clang8 as well. Iterative patch
in the bottom. Docker pre-built image updated. Branch
force-pushed.
--
Regards, Kirill Yukhin
diff --git a/.gitlab.mk b/.gitlab.mk
index 6e260dc..e1a83ac 100644
--- a/.gitlab.mk
+++ b/.gitlab.mk
@@ -40,7 +40,7 @@ export DEBIAN_STRETCH_DOCKERFILE
define DEBIAN_BUSTER_DOCKERFILE
FROM packpack/packpack:debian-buster
COPY .travis.mk .
-RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_11
+RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_8 deps_buster_clang_11
endef
export DEBIAN_BUSTER_DOCKERFILE
diff --git a/.travis.mk b/.travis.mk
index 88ddbe4..d797472 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -76,6 +76,13 @@ deps_debian:
python-msgpack python-yaml python-argparse python-six python-gevent \
lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool
+deps_buster_clang_8: deps_debian
+ echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list
+ echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/clang_8.list
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+ apt-get update
+ apt-get install -y clang-8 llvm-8-dev
+
deps_buster_clang_11: deps_debian
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" > /etc/apt/sources.list.d/clang_11.list
echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" >> /etc/apt/sources.list.d/clang_11.list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11
2020-10-06 11:21 ` Kirill Yukhin
@ 2020-10-06 12:46 ` Alexander V. Tikhonov
0 siblings, 0 replies; 7+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-06 12:46 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: tarantool-patches
Hi Kirill, thanks for the patch, it LGTM.
On Tue, Oct 06, 2020 at 02:21:23PM +0300, Kirill Yukhin wrote:
> Hello,
>
> On 06 окт 12:59, Kirill Yukhin wrote:
> > Update Clang 8 testing with most recent version of
> > Clang: 11.
> >
> > Closes #5386
>
> It was decided to keep clang8 as well. Iterative patch
> in the bottom. Docker pre-built image updated. Branch
> force-pushed.
>
> --
> Regards, Kirill Yukhin
>
> diff --git a/.gitlab.mk b/.gitlab.mk
> index 6e260dc..e1a83ac 100644
> --- a/.gitlab.mk
> +++ b/.gitlab.mk
> @@ -40,7 +40,7 @@ export DEBIAN_STRETCH_DOCKERFILE
> define DEBIAN_BUSTER_DOCKERFILE
> FROM packpack/packpack:debian-buster
> COPY .travis.mk .
> -RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_11
> +RUN make APT_EXTRA_FLAGS="--allow-releaseinfo-change-version --allow-releaseinfo-change-suite" -f .travis.mk deps_buster_clang_8 deps_buster_clang_11
> endef
> export DEBIAN_BUSTER_DOCKERFILE
>
> diff --git a/.travis.mk b/.travis.mk
> index 88ddbe4..d797472 100644
> --- a/.travis.mk
> +++ b/.travis.mk
> @@ -76,6 +76,13 @@ deps_debian:
> python-msgpack python-yaml python-argparse python-six python-gevent \
> lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool
>
> +deps_buster_clang_8: deps_debian
> + echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list
> + echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/clang_8.list
> + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
> + apt-get update
> + apt-get install -y clang-8 llvm-8-dev
> +
> deps_buster_clang_11: deps_debian
> echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" > /etc/apt/sources.list.d/clang_11.list
> echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main" >> /etc/apt/sources.list.d/clang_11.list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI
2020-10-06 9:59 [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
2020-10-06 9:59 ` [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file Kirill Yukhin
2020-10-06 9:59 ` [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11 Kirill Yukhin
@ 2020-10-06 14:50 ` Kirill Yukhin
2 siblings, 0 replies; 7+ messages in thread
From: Kirill Yukhin @ 2020-10-06 14:50 UTC (permalink / raw)
To: gorcunov, avtikhon; +Cc: tarantool-patches
Hello,
On 06 окт 12:59, Kirill Yukhin wrote:
> Hello,
>
> This patchset removes C99 extension, which was used in
> C++ file and catched by Clang 11.
> It also updates version for CI testing with most recent
> Clang: 8 to 11.
>
>
> Branch: https://github.com/tarantool/tarantool/tree/kyukhin/gh-5386-enable-clang-11
> Issue: https://github.com/tarantool/tarantool/issues/5386
> CI: https://gitlab.com/tarantool/tarantool/-/pipelines/198532146
>
I've checked the patchset into 2.5 and master.
I've also cherry-picked top patch onto 2.4 and 1.10.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 7+ messages in thread