Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang-13 to the CI build #300

Open
gregmedd opened this issue Aug 16, 2024 · 1 comment
Open

Add clang-13 to the CI build #300

gregmedd opened this issue Aug 16, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed quality Code quality and linter issues

Comments

@gregmedd
Copy link
Contributor

Clang has different checks and can be more pedantic than gcc. We should be including clang-13 in our CI process to make sure we actually support the versions we claim in our documentation.

@gregmedd
Copy link
Contributor Author

gregmedd commented Aug 16, 2024

Just as a quick check, I tried compiling up-cpp with clang++-18 and got several errors:

/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/datamodel/serializer/Uuid.cpp:109:20: error: implicit conversion changes signedness: 'int' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
  108 |         uuid.set_msb((unix_ts_ms << UUID_TIMESTAMP_SHIFT) |
      |                                                           ~
  109 |                      (ver << UUID_VERSION_SHIFT) | rand_a);
      |                       ~~~~^~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/up-cpp.dir/build.make:216: CMakeFiles/up-cpp.dir/src/datamodel/serializer/Uuid.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:135:18: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
  135 |         auto wrapper = [callable, reqid = std::move(reqid),
      |                         ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:127:25: note: 'callable' declared here
  127 |         auto [callback_handle, callable] =
      |                                ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:140:38: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
  140 |                                 std::call_once(*callback_once, [&callable, &m]() {
      |                                                                  ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:127:25: note: 'callable' declared here
  127 |         auto [callback_handle, callable] =
      |                                ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:148:38: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
  148 |                                 std::call_once(*callback_once, [&callable,
      |                                                                  ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:127:25: note: 'callable' declared here
  127 |         auto [callback_handle, callable] =
      |                                ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:160:17: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
  160 |         auto expire = [callable, callback_once](v1::UStatus&& reason) mutable {
      |                        ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:127:25: note: 'callable' declared here
  127 |         auto [callback_handle, callable] =
      |                                ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:162:25: error: captured structured bindings are a C++20 extension [-Werror,-Wc++20-extensions]
  162 |                     *callback_once, [&callable, reason = std::move(reason)]() {
      |                                       ^
/home/user/.conan2/p/b/up-cp85320fffd98f5/b/src/communication/RpcClient.cpp:127:25: note: 'callable' declared here
  127 |         auto [callback_handle, callable] =
      |                                ^
5 errors generated.
gmake[2]: *** [CMakeFiles/up-cpp.dir/build.make:118: CMakeFiles/up-cpp.dir/src/communication/RpcClient.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/up-cpp.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

It is possible that some of our strange false-positives with clang-tidy (#298) trace back to unreported clang compilation errors.

@gregmedd gregmedd added enhancement New feature or request help wanted Extra attention is needed quality Code quality and linter issues labels Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed quality Code quality and linter issues
Projects
Status: Backlog
Development

No branches or pull requests

1 participant