Last 12 weeks · 521 commits
4 of 6 standards met
The previous fix (f2dfdc4a) guarded the CountingAllocator::allocate_at_least override behind #ifdef __cpp_lib_allocate_at_least, a C++23 feature-test macro. But folly's CMake build defaults to C++20 (CMakeLists.txt), so that macro is undefined and the override was compiled out entirely -- it never took effect. Homebrew LLVM 22's libc++ provides std::allocator::allocate_at_least and routes std::vector growth through it even in C++20 mode, bypassing the counting allocate() and leaving nAllocations at 0. This is exactly the Mac CI failure at heap_vector_types_test.cpp:863/871 ("Which is: 0"). Detect the base member directly with a requires-clause instead of the C++23 macro, so the override compiles whenever std::allocator actually provides allocate_at_least, regardless of language mode. Verified counting works in both C++20 and C++23.
I'm trying to build git master 5aeae0d3e1c4b93b301e37c484328e9b0e55906b with which leads to folly seems to do wrong to my liburing 2.14. I could not completely override it: Less important because already fixed is a jemalloc build issue: which is similar to https://github.com/facebook/folly/issues/943 !
The Mac workflow pinned DEVELOPER_DIR to /Applications/Xcode_16.2.app, which GitHub has since rotated off the macOS runner image, so xcrun fails ("missing DEVELOPER_DIR path") before any build starts. The job also uses Homebrew LLVM, which always pulls the newest clang, so pinning an old SDK against an ever-newer compiler is the fragile combination that caused the earlier libc++ header mismatches; a newer default SDK pairs better. Point DEVELOPER_DIR at /Applications/Xcode.app/Contents/Developer (the runner's default-selected Xcode symlink), which survives image rotations. Updated in the generated workflow, the getdeps workflow_generator that emits it, and the golden-file test fixture so they stay consistent.
Summary Added size validation to constructor to ensure minimum allocation size of Updated documentation in to clarify that allocations smaller than are rounded up Added test case to verify correct behavior for small allocations Test plan [x] Added new test that verifies 1-byte, 4-byte, and 8-byte allocations work correctly [ ] Run existing suite to ensure no regressions
detect_promise_return_object_eager_conversion() inferred "eager" from whether the promise was still alive at return-object conversion time (!!o.promise). clang >= 22 reordered the conversion to run before the promise destructor instead of after, so the promise is still alive at conversion even when conversion is deferred. The detector then wrongly reported eager, causing Expected/Optional coroutines to yield empty results (bad expected access / empty Optional unwrapped) on Mac CI, which builds with Homebrew LLVM. Detect the actual signal instead: whether the coroutine body already ran before the conversion, via a body_ran flag set in return_void. This is robust to the promise-dtor/conversion ordering and stays correct for genuinely-eager compilers (in eager mode the conversion precedes the body, and the return-object destructor nulls so the later return_void is a safe no-op). Verified on clang 22 and AppleClang 17 at -O0..-O3 with the real eager/deferred branches. Fixes the shared detector used by Expected.h, Optional.h, and result/detail/result_promise.h, and satisfies the existing CoroutineTest contract (clang >= 17 => eager == false). Co-Authored-By: Claude Opus 4.8 (1M context)
Repository: facebook/folly. Description: An open-source C++ library developed and used at Facebook. Stars: 30442, Forks: 5859. Primary language: C++. Languages: C++ (90.2%), Starlark (3.4%), Python (2.6%), CMake (2.1%), Rust (0.8%). License: Apache-2.0. Latest release: v2026.06.29.00 (2d ago). Open PRs: 100, open issues: 354. Last activity: 1h ago. Community health: 75%. Top contributors: yfeldblum, Orvid, ot, simpkins, andriigrynenko, snarkmaster, Gownta, dmm-fb, r-barnes, mzlee and others.