- 24 Sep, 2020 9 commits
-
-
Yang Chi authored
Reviewed By: yfeldblum Differential Revision: D23847355 fbshipit-source-id: b5fbf5bea515111d34962100af0f44ae11e0845f
-
Nicholas Ormrod authored
Summary: - Changed namespace from facebook::memory to folly - Changed include paths - Left a stub file in common/memory/not_null.h Differential Revision: D23740776 fbshipit-source-id: 6eff6823017e3a5d20a540fde10b99aa0381d4b0
-
Yedidya Feldblum authored
Summary: [Folly] Internally rename `await` in `folly/fibers/` since some versions of MSVC effectively `#define await co_await` breaking the build - except it's not really a `#define` and there is no reliable way to detect it. Reviewed By: Orvid Differential Revision: D23882811 fbshipit-source-id: 836bebcbcfe01ce39c873202b67796efafa1c366
-
Kevin Vigor authored
Summary: folly::Function is non-copyable. This means it can be used with lambdas that capture a unique_ptr, whereas std::function can not. See https://www.internalfb.com/intern/wiki/Folly/Function/ Differential Revision: D23883275 fbshipit-source-id: a26cda0d3833e3ea822beef99c6a28a6dd90fa83
-
Curtis Li authored
Summary: Fixes a few documentation errors that get surfaced when compiling with the -Wdocumentation flag. Full explanation of errors with examples here: https://clang.llvm.org/docs/DiagnosticsReference.html#wdocumentation Reviewed By: yfeldblum Differential Revision: D23872718 fbshipit-source-id: 0bb803c6e9412e72985c17415b424be08b51a693
-
Yedidya Feldblum authored
Summary: [Folly] Rename private `find` member in `sorted_vector_set`, `sorted_vector_map` to avoid confusing conflicts with derived-class `using` statements when the derived class privately inherits the base. Reviewed By: ha1dfo Differential Revision: D23863338 fbshipit-source-id: 43e67da9683fb4c0af3fa1c86ade7735935e5e0c
-
Yedidya Feldblum authored
Summary: [Folly] Suppress is-constexpr-default-constructible test for types with non-trivial user-provided (until C++20) or non-constexpr (since C++20) destructors under Clang 10. Responsible llvm commit: https://github.com/llvm/llvm-project/commit/457226e02a6e. Related llvm bug report: https://bugs.llvm.org/show_bug.cgi?id=47620. This bug report documents a crash in the compiler, but fails to document deviation from the language spec. Reviewed By: Mizuchi Differential Revision: D23862920 fbshipit-source-id: 855db4773ffc062ad9d361feac3709922db7b42d
-
Xavier Deguillard authored
Summary: This shows up when compiling with mode/win. Reviewed By: yfeldblum Differential Revision: D23871729 fbshipit-source-id: 1d52f41f425cd542bae1ac2c3bfe9893fffefdf4
-
Maged Michael authored
Summary: Change WARNING to INFO because there are cases where not using a dedicated thread pool is the right choice. INFO still provides the debugging benefit if the lack of dedicated thread pool indeed leads to deadlock. Clarify that the likely cause for the message about the reclamation executor is that the program did not call folly::enable_hazptr_thread_pool_executor which is called by folly::init. Reviewed By: yfeldblum, joshkehn Differential Revision: D23826463 fbshipit-source-id: a5906ee974b5fe87c2d38dcff9a0f2717afb2a5c
-
- 23 Sep, 2020 4 commits
-
-
Rahul Tekawade authored
Summary: Fix document typo for `folly::IsOneOf` (see diff) Reviewed By: yfeldblum Differential Revision: D23863254 fbshipit-source-id: 02f64a72decab028be832f71e1132dfce7fe5fa9
-
Chad Austin authored
Summary: Now that symbolizer has precise feature flags, enable FOLLY_USE_SYMBOLIZER on any platform that has backtrace(3), which is all that's needed to get a useful stack trace printed in the signal handler. Reviewed By: yfeldblum, luciang Differential Revision: D23361609 fbshipit-source-id: b124f7fd01e94f90d8f8586555a64bd6e412040c
-
Dan Melnic authored
Summary: Allow changing the Sleeper sleep interval Reviewed By: yfeldblum Differential Revision: D23591682 fbshipit-source-id: 81b55fa699362d62e436c599c38046d15fecee37
-
Zhaodong Wang authored
Summary: To have parity with C++20 `std::erase_if`: https://en.cppreference.com/w/cpp/container/unordered_set/erase_if Added a return value for `folly::erase_if` for the number of the removed elements. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D23779631 fbshipit-source-id: cea42b90557dd570db8e010d68c2b9ecf0bcc515
-
- 22 Sep, 2020 5 commits
-
-
Nick Terrell authored
Summary: Fix 1-byte buffer overrun when parsing the string "\t". Reviewed By: mhlakhani Differential Revision: D22931605 fbshipit-source-id: a90d0a64b882ed8fef96285d47e11fa082178449
-
Andrii Grynenko authored
Summary: Move ContextPrimaryPtr definition outside of the function. Rename MasterPtr to PrimaryPtr. Reviewed By: Orvid Differential Revision: D23836006 fbshipit-source-id: d2ad229809fb260c485a7349eca7378e22dc66c4
-
Andrii Grynenko authored
Differential Revision: D23829791 fbshipit-source-id: 4a13cd70f20de487ece11a1eada94467e1700b6e
-
Michael Lee (Engineering) authored
Summary: To be able to override this feature, we should check that `FOLLY_USE_JEMALLOC` is set to 1 rather than just set. Reviewed By: yfeldblum Differential Revision: D22681072 fbshipit-source-id: 18b35910217fd1869cc23107a50241c4ed2ed1b7
-
Chad Austin authored
Summary: FOLLY_USE_SYMBOLIZER is too coarse of a flag to determine whether ExceptionTracer is available. Instead, use FOLLY_HAVE_ELF and FOLLY_HAVE_DWARF. Reviewed By: yfeldblum, luciang Differential Revision: D23361407 fbshipit-source-id: 2326f185c98f58e7afb007befc9121a365c22e77
-
- 21 Sep, 2020 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Revise SFINAE in `Padded`. Reviewed By: iahs Differential Revision: D23799751 fbshipit-source-id: 1bf08c5f61f14e95c33077dd690a550fb49fe776
-
Evgeny Fiksman authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1447 The operation is performed with StringPiece, and avoids temporary strings. Reviewed By: yfeldblum Differential Revision: D23479603 fbshipit-source-id: 4718fa062b1eb1910b96f3b0c3ae40af8c05f2e3
-
- 19 Sep, 2020 1 commit
-
-
Philip Pronin authored
Reviewed By: ot Differential Revision: D23802800 fbshipit-source-id: 993060123790058b44d13c0b38eb4a04a28462a2
-
- 18 Sep, 2020 7 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut old memrchr port in global namespace since it is excessively difficult to make it portable across all platforms. Fixes: https://github.com/facebook/folly/issues/817. Fixes: https://github.com/facebook/folly/issues/1391. Reviewed By: Orvid Differential Revision: D22130039 fbshipit-source-id: 43511aa95c749d5f603ff8043c438ba63d44f6c1
-
Wez Furlong authored
Summary: D23695665 (https://github.com/facebook/folly/commit/5c3b9d59a815b94df1afed0b7e0050bb75e09178) calls functions defined by this module, but doesn't ensure that it has been imported. I believe this to be the reason behind this build failure: https://github.com/facebook/watchman/pull/856/checks?check_run_id=1135919864#step:52:217 Reviewed By: chadaustin Differential Revision: D23794292 fbshipit-source-id: 897cfac862fda7420d1c53b0976492231b53dcf8
-
Chad Austin authored
Summary: Refine some guards to be more precise. Reviewed By: yfeldblum, luciang Differential Revision: D23361317 fbshipit-source-id: 806d899890c990a840c4275fb1180e45a944715d
-
Chad Austin authored
Summary: Instead of assuming every posix-y system has ucontext.h, detect swapcontext's existence at build time. Android NDK provides ucontext.h but not its corresponding functions. Reviewed By: yfeldblum Differential Revision: D23695665 fbshipit-source-id: 9e49c6fbf553abff6249d55c780c09cc19d0bb48
-
Lukas Piatkowski authored
eden/edenapi and mononoke integration tests: add edenapi/tools to getdeps and use them in tests (#51) Summary: Pull Request resolved: https://github.com/facebookexperimental/eden/pull/51 This diff extends capabilities of CargoBuilder in getdeps so that individual manifests can be build even without workspaces. Thanks to that a build for edenapi/tools can be made and its artifacts can be used in mononoke integration tests. Reviewed By: StanislavGlebik Differential Revision: D23574887 fbshipit-source-id: 8a974a6b5235d36a44fe082aad55cd380d84dd09
-
Maged Michael authored
Summary: Use folly::get_cached_pid(), a faster getpid() replacement, in NotificationQueue. Outline CHECK_EQ from checkPid(). Reviewed By: yfeldblum Differential Revision: D23433868 fbshipit-source-id: 66ef0e243d74aa176a496e1ae15aeae5e67e4f5c
-
Alexander Sklar authored
Summary: Constant from: http://eel.is/c++draft/cpp.predefined#1.1 Fixes https://github.com/facebook/folly/issues/1454 Pull Request resolved: https://github.com/facebook/folly/pull/1455 Reviewed By: yfeldblum Differential Revision: D23702274 Pulled By: Orvid fbshipit-source-id: a08f922cc11c086362b91c93922b59c9a5c62e51
-
- 17 Sep, 2020 5 commits
-
-
Lukas Piatkowski authored
Reviewed By: krallin Differential Revision: D23757084 fbshipit-source-id: 7e49228805e272064ad52d43141b5815eba4190a
-
Yedidya Feldblum authored
Summary: [Folly] Always enable fiber support in futures. (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D19229519 fbshipit-source-id: f0a034e9387c5ccad676a911213fab74364ca340
-
Lewis Baker authored
Summary: Add the ability for an AsyncGenerator to yield an error without needing to throw an exception and for consumers to retrieve the error without rethrowing the exception. Added a new `folly::coro::co_error` type that acts as a simple wrapper around a `folly::exception_wrapper` that can be used to indicate that this value is an error. This allows `AsyncGenerator` bodies to now `co_yield` a `co_error` as a way of completing with an error without needing to throw the exception. For example: ``` class SomeError : public std::exception { ... }; folly::coro::AsyncGenerator<int> example() { co_yield 42; co_yield folly::coro::co_error(SomeError{}); } ``` This diff also adds support for `folly::coro::co_awaitTry()` to the `AsyncGenerator::next()` method. For example: ``` folly::coro::Task<void> consumer() { folly::coro::AsyncGenerator<int> gen = example(); folly::Try<int> result = co_await folly::coro::co_awaitTry(gen.next()); // use result } ``` Added a benchmark to compare performance of the new interfaces vs the existing throwing-based error handling. Reviewed By: yfeldblum Differential Revision: D18015926 fbshipit-source-id: 27d2e16e7dde9b4c871846f5d17b40ec3737330a
-
Lee Howes authored
Summary: getVia is destructive like other forms of get. This change r-value qualifies it to highlight that in code. Reviewed By: yfeldblum Differential Revision: D23603722 fbshipit-source-id: d2aecac3c6eb09e0fcf55a07e310114ebc13b932
-
Dan Melnic authored
Summary: Add support for polling the io_uring submission/completion queues Reviewed By: kevin-vigor Differential Revision: D23566444 fbshipit-source-id: 7f8331d1f34db78dc4bca4aea3e5f5a1c8f00023
-
- 16 Sep, 2020 3 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Tweak `partial` to avoid a poorly-understood build failure on macos with clang++ and libc++. ``` In file included from folly/functional/test/PartialTest.cpp:19: In file included from folly/folly/Function.h:230: folly/functional/Invoke.h:65:25: error: attempt to use a deleted function noexcept(noexcept(std::mem_fn(f)(static_cast<A&&>(a)...))) ^ folly/functional/Partial.h:41:19: note: in instantiation of exception specification for 'operator()<int (int &, int &, int &), Foo, const Foo &, const int &, const int &, int &>' requested here -> decltype(invoke( ^ folly/functional/Partial.h:65:56: note: while substituting deduced template arguments into function template 'invokeForward' [with Self = const folly::detail::partial::Partial<int (Foo::*)(int &, int &, int &), std::__1::tuple<Foo, int, int> > &, I = <0, 1, 2>, Args = <int &>] auto operator()(CArgs&&... cargs) const& -> decltype(invokeForward( ^ folly/functional/test/PartialTest.cpp:59:21: note: while substituting deduced template arguments into function template 'operator()' [with CArgs = <int &>] EXPECT_EQ(1234, p0(four)); ^ type_traits:1743:5: note: '~__nat' has been explicitly marked deleted here ~__nat() = delete; ^ ``` Reviewed By: chadaustin Differential Revision: D23722804 fbshipit-source-id: 7b3d6307a46fa12eadea13db327f10aafb89691c
-
Xavier Deguillard authored
Summary: The getuid and getgid are defined as returning uid_t and gid_t. Defining these types here will prevent downstream consumer from having to redefine these types for Windows. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum, Orvid Differential Revision: D23693492 fbshipit-source-id: 1ec9221509bffdd5f6d241c4bc08d7809cdb6162
-
Luca Niccolini authored
Summary: no need to install when not building tests Reviewed By: wez Differential Revision: D23714375 fbshipit-source-id: 6f34ab59ed2155df5646ad279d1347e904f393c4
-
- 15 Sep, 2020 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cache python-import in `getExecutor` so that it happens only once overall rather than once per call. Reviewed By: nanshu Differential Revision: D23657508 fbshipit-source-id: 06d3bd53303cac9c10fff74f4e6daaeccdc59471
-
Luca Niccolini authored
Summary: required. not installed with CMake ExternalProject anymore Reviewed By: xttjsn Differential Revision: D23700095 fbshipit-source-id: 807105a1e3d4bd837a35e39c6dced53744edd8de
-
Luca Niccolini authored
Summary: in getdeps we currently don't build and run the tests There are a few issues: 1. we need to also build tests for fizz, wangle, mvfst since proxygen tests include headers only exported if building tests in dependencies 2. we use `ExternalProject_add` for gtest/gmock. but doesn't seem to be playing nicely with getdeps Reviewed By: dddmello, mjoras Differential Revision: D16934955 fbshipit-source-id: fb1c52237f9f0c71da86643409972c94d16e6a71
-
Luca Niccolini authored
Summary: properly find the required GMock version (1.8.0) and allow building tests in getdeps Reviewed By: mjoras Differential Revision: D16935741 fbshipit-source-id: 46f62511e2feaf553d028e286a862aa5b30393c6
-