4 of 6 standards met
make cmake compile ok and cmake generate config.cmake ok which is used by find_package(cachelib)
Describe the bug Build Error with Thrift.h:36:21: error: static assertion failed on ubuntu24.04 To Reproduce Steps to reproduce the behavior: 1. ./contrib/build.sh -d -v -S Expected behavior expect build successfully. Desktop (please complete the following information): OS: ubuntu24.04 Browser [e.g. chrome, safari] Version : Release Stable 20240320 Additional context* [ 5%] Built target thrift_generated_files make -f common/CMakeFiles/cachelib_common.dir/build.make common/CMakeFiles/cachelib_common.dir/depend make[2]: Entering directory '/home/sv/Documents/CacheLib/build-cachelib' cd /home/sv/Documents/CacheLib/build-cachelib && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/sv/Documents/CacheLib/cachelib /home/sv/Documents/CacheLib/cachelib/common /home/sv/Documents/CacheLib/build-cachelib /home/sv/Documents/CacheLib/build-cachelib/common /home/sv/Documents/CacheLib/build-cachelib/common/CMakeFiles/cachelib_common.dir/DependInfo.cmake "--color=" Dependencies file "common/CMakeFiles/cachelib_common.dir/BloomFilter.cpp.o.d" is newer than depends file "/home/sv/Documents/CacheLib/build-cachelib/common/CMakeFiles/cachelib_common.dir/compiler_depend.internal". Consolidate compiler generated dependencies of target cachelib_common make[2]: Leaving directory '/home/sv/Documents/CacheLib/build-cachelib' make -f common/CMakeFiles/cachelib_common.dir/build.make common/CMakeFiles/cachelib_common.dir/build make[2]: Entering directory '/home/sv/Documents/CacheLib/build-cachelib' [ 6%] Building CXX object common/CMakeFiles/cachelib_common.dir/BloomFilter.cpp.o cd /home/sv/Documents/CacheLib/build-cachelib/common && /usr/bin/c++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -I/home/sv/Documents/CacheLib/cachelib/.. -I/home/sv/Documents/CacheLib/build-cachelib/.. -I/home/sv/Documents/CacheLib/build-cachelib -isystem /home/sv/Documents/CacheLib/opt/cachelib/include -isystem /usr/include/libdwarf -isystem /usr/include/libiberty -g -std=gnu++17 -fPIC -fsized-deallocation -MD -MT common/CMakeFiles/cachelib_common.dir/BloomFilter.cpp.o -MF CMakeFiles/cachelib_common.dir/BloomFilter.cpp.o.d -o CMakeFiles/cachelib_common.dir/BloomFilter.cpp.o -c /home/sv/Documents/CacheLib/cachelib/common/BloomFilter.cpp In file included from /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Serializer.h:24, from /home/sv/Documents/CacheLib/cachelib/../cachelib/common/Serialization.h:27, from /home/sv/Documents/CacheLib/cachelib/../cachelib/common/BloomFilter.h:24, from /home/sv/Documents/CacheLib/cachelib/common/BloomFilter.cpp:17: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:36:21: error: static assertion failed: Thrift must be built with C++20 or later. 36 | FOLLY_CPLUSPLUS >= 202002L, "Thrift must be built with C++20 or later."); | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:36:21: note: the comparison reduces to ‘(201703 >= 202002)’ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:227:53: error: ‘requires’ was not declared in this scope 227 | static constexpr bool is_deprecated_terse_field = requires { | ^~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h: In static member function ‘static constexpr bool apache::thrift::detail::st::struct_private_access::__fbthrift_has_struct_annotation()’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:147:19: error: ‘requires’ was not declared in this scope 147 | if constexpr (requires { typename T::__fbthrift_struct_annotations; }) { | ^~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:147:28: error: expected ‘)’ before ‘{’ token 147 | if constexpr (requires { typename T::__fbthrift_struct_annotations; }) { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:147:18: note: to match this ‘(’ 147 | if constexpr (requires { typename T::__fbthrift_struct_annotations; }) { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h: In static member function ‘static constexpr bool apache::thrift::detail::st::struct_private_access::__fbthrift_has_field_annotation()’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:155:19: error: ‘requires’ was not declared in this scope 155 | if constexpr (requires { | ^~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:155:28: error: expected ‘)’ before ‘{’ token 155 | if constexpr (requires { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:155:18: note: to match this ‘(’ 155 | if constexpr (requires { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h: In static member function ‘static constexpr const int16_t apache::thrift::detail::st::struct_private_access::field_ids_in_serialization_order()’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:203:19: error: ‘requires’ was not declared in this scope 203 | if constexpr (requires { | ^~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:203:28: error: expected ‘)’ before ‘{’ token 203 | if constexpr (requires { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:203:18: note: to match this ‘(’ 203 | if constexpr (requires { | ^ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h: At global scope: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:309:1: error: ‘concept’ does not name a type; did you mean ‘const’? 309 | concept ThriftClass = is_thrift_class_v; | ^~~~~~~ | const /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:309:1: note: ‘concept’ only available with ‘-std=c++20’ or ‘-fconcepts’ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:326:1: error: ‘concept’ does not name a type; did you mean ‘const’? 326 | concept ThriftEnum = is_thrift_enum_v; | ^~~~~~~ | const /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/Thrift.h:326:1: note: ‘concept’ only available with ‘-std=c++20’ or ‘-fconcepts’ In file included from /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:26, from /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Serializer.h:25: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h: In function ‘constexpr bool apache::thrift::usesFieldNames()’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:446:17: error: ‘requires’ was not declared in this scope 446 | if constexpr (requires { typename Protocol::ProtocolReader; }) { | ^~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:446:25: error: expected ‘)’ before ‘{’ token 446 | if constexpr (requires { typename Protocol::ProtocolReader; }) { | ~ ^~ | ) /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:448:33: error: expected ‘)’ before ‘{’ token 448 | } else if constexpr (!requires { Protocol::kUsesFieldNames(); }) { | ~ ^~ | ) /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h: In instantiation of ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolReader]’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:377:52: required from here /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:447:12: error: no type named ‘ProtocolReader’ in ‘class apache::thrift::BinaryProtocolReader’ 447 | return usesFieldNames(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h: At global scope: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:377:15: error: non-constant condition for static assertion 377 | static_assert(!usesFieldNames()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:377:52: error: ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolReader]’ called in a constant expression 377 | static_assert(!usesFieldNames()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:445:16: note: ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolReader]’ is not usable as a ‘constexpr’ function because: 445 | constexpr bool usesFieldNames() { | ^~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h: In instantiation of ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolWriter]’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:378:52: required from here /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:451:37: error: ‘kUsesFieldNames’ is not a member of ‘apache::thrift::BinaryProtocolWriter’ 451 | return Protocol::kUsesFieldNames(); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:378:15: error: non-constant condition for static assertion 378 | static_assert(!usesFieldNames()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/BinaryProtocol.h:378:52: error: ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolWriter]’ called in a constant expression 378 | static_assert(!usesFieldNames()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:445:16: note: ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = BinaryProtocolWriter]’ is not usable as a ‘constexpr’ function because: 445 | constexpr bool usesFieldNames() { | ^~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h: In instantiation of ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = CompactProtocolReader]’: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/CompactProtocol.h:446:53: required from here /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Protocol.h:447:12: error: no type named ‘ProtocolReader’ in ‘class apache::thrift::CompactProtocolReader’ 447 | return usesFieldNames(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/Serializer.h:26: /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/CompactProtocol.h:446:15: error: non-constant condition for static assertion 446 | static_assert(!usesFieldNames()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/sv/Documents/CacheLib/opt/cachelib/include/thrift/lib/cpp2/protocol/CompactProtocol.h:446:53: error: ‘constexpr bool apache::thrift::usesFieldNames() [with Protocol = CompactProtocolReader]’ called in a constant expression 446 | static_assert(!usesFieldNames()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
Repository: facebook/CacheLib. Description: Pluggable in-process caching engine to build and scale high performance services Stars: 1499, Forks: 315. Primary language: C++. Languages: C++ (88.1%), Python (6.1%), CMake (3%), Rust (1.2%), Shell (0.6%). License: Apache-2.0. Homepage: https://www.cachelib.org Topics: cache, cache-engine, concurrency, cpp, performance, ssd. Latest release: v20240320_stable (1y ago). Open PRs: 29, open issues: 15. Last activity: 6h ago. Community health: 87%. Top contributors: jiayuebao, pbhandar2, haowu14, agordon, byahn0996, AlnisM, r-barnes, therealgymmy, leozzx, ahornby and others.
C++
Last 12 weeks · 266 commits
Summary This pull request significantly enhances the README.md and CONTRIBUTING.md files to improve the developer experience for new users and contributors. Key Improvements to README.md Added Quick Start Section: A minimal, self-contained C++ code example has been added to help new users get started with CacheLib quickly. Added Key Features Section: A clear, concise list of CacheLib's main features has been included to highlight its capabilities. Added "Why Use CacheLib?" Section: This new section explains the ideal use cases for CacheLib and helps users understand when it is the right choice. Added Architecture Overview: A high-level overview of CacheLib's architecture has been added to provide context for new contributors. Improved Build Instructions: The build and installation steps have been consolidated and clarified for a smoother setup process. Added Community Section: Links to GitHub Issues, Discussions, and Stack Overflow have been added to help users find support. Key Improvements to CONTRIBUTING.md Added Documentation Contributions Section: Clear instructions have been added for contributors who wish to improve the documentation. Added Code Style Guidelines: A reference to the .clang-format file and code formatting expectations has been included. Added PR Template Information: The pull request process and template are now described to guide contributors. Improved Overall Clarity: The document has been reorganized for better readability. These changes aim to make CacheLib more accessible and welcoming to both new users and potential contributors. Test Plan This is a documentation-only change. All code examples have been reviewed for correctness. [x] Verified that the Quick Start code example is correct and compiles. [x] Reviewed all new sections for clarity and accuracy. [x] Checked all links to ensure they are valid.
1.for cache lib FDP compare, have write only !image 2.For kv cache trace replay, How to modify write only, shall i modify the trace csv all op to 'SET' ? looks like add parameter in json test config not work "getRatio": 0.05, "setRatio": 0.9, "delRatio": 0.05, !image 3.json test config cache_lib_test_config_FDP_True_2024-09-15_02_00_32.json