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

bazel: upgrade to c++23 #24444

Merged
merged 7 commits into from
Dec 9, 2024
Merged

bazel: upgrade to c++23 #24444

merged 7 commits into from
Dec 9, 2024

Conversation

rockwotj
Copy link
Contributor

@rockwotj rockwotj commented Dec 5, 2024

🎉

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • none

dotnwat
dotnwat previously approved these changes Dec 5, 2024
@vbotbuildovich
Copy link
Collaborator

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/59311#019398dd-57c3-4843-a055-8d4b3e9c4031:

"rptest.tests.random_node_operations_test.RandomNodeOperationsTest.test_node_operations.enable_failures=False.mixed_versions=False.with_tiered_storage=True.with_iceberg=True.cloud_storage_type=CloudStorageType.S3"

@vbotbuildovich
Copy link
Collaborator

Retry command for Build#59311

please wait until all jobs are finished before running the slash command

/ci-repeat 1
tests/rptest/tests/random_node_operations_test.py::RandomNodeOperationsTest.test_node_operations@{"cloud_storage_type":1,"enable_failures":false,"mixed_versions":false,"with_iceberg":true,"with_tiered_storage":true}

dotnwat
dotnwat previously approved these changes Dec 6, 2024
@@ -12,7 +12,7 @@ project(redpanda LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to do this in vtools, this is for the public build which isn't maintained.

@rockwotj
Copy link
Contributor Author

rockwotj commented Dec 6, 2024

This is only for Bazel, once this lands I can upgrade vtools build as well

@rockwotj rockwotj changed the title build: upgrade to c++23 bazel: upgrade to c++23 Dec 6, 2024
@rockwotj rockwotj enabled auto-merge December 6, 2024 08:30
@rockwotj rockwotj requested a review from dotnwat December 6, 2024 08:30
@michael-redpanda
Copy link
Contributor

This will probably conflict: #24473

It pulls a ref that includes your changes

@rockwotj
Copy link
Contributor Author

rockwotj commented Dec 6, 2024

thanks a bazel test is broken anyway

dotnwat
dotnwat previously approved these changes Dec 6, 2024
In C++23 we check for scoped enums in serde, we need to make this enum
a class enum.
Fixes a compilation error in c++23 where we declare the deleter for a
class that hasn't yet been defined.
When this macro is actually defined, you get an error. Fix the check to
use defined instead
There was a new allocate_at_least method added
@rockwotj
Copy link
Contributor Author

rockwotj commented Dec 8, 2024

Fixed an allocator change in cpp23 and rebased to fix conflicts

@rockwotj rockwotj requested a review from dotnwat December 9, 2024 03:24
src/v/serde/serde_is_enum.h Show resolved Hide resolved
Comment on lines +124 to +130
#if __cplusplus >= 202302L
[[nodiscard]] std::allocation_result<T*> allocate_at_least(std::size_t n) {
auto result = allocator::allocate_at_least(n);
_tracker->allocate(result.count * sizeof(T));
return result;
}
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rockwotj rockwotj merged commit e28496c into redpanda-data:dev Dec 9, 2024
16 checks passed
@rockwotj rockwotj deleted the cpp23 branch December 9, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants