- 23 Mar, 2020 4 commits
-
-
Stepan Palamarchuk authored
Summary: This allows to avoid unnecessary copy of `shared_ptr`. (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D20596972 fbshipit-source-id: 6411ee2f735c1db1984bcd83ceddf80e4ec6f22b
-
Lee Howes authored
Summary: Add sampled logging of blocking operations made on folly::Baton from within an executor task. Relies on thread_local state recording whether we are in a context where blocking is disallowed, which means within a task running on an executor with support for the functionality. Functionality is currently limited to certain executors, and to blocking operations on Baton, but this covers common user-facing APIs like Future. Reviewed By: andriigrynenko Differential Revision: D20010963 fbshipit-source-id: c0598e1a3a9c4e3641581e561b678a2b241998ff
-
Adam Simpkins authored
Summary: If you have built the `eden/scm` subdirectory with `make local` in your repository it will have left a bunch of build output artifacts in the source tree. Update the getdeps shipit path map for eden to explicitly exclude many of these build artifacts. In particular: - Exclude `eden/scm/build/` since this directory can contains a lot of files. - Exclude all `*.pyc` files since there may be a reasonable number of these. - Exclude several Cargo-related files since these will cause problems when trying to build Rust code. Reviewed By: chadaustin Differential Revision: D20570720 fbshipit-source-id: a60dec4854ae470fdb58e9651fd8a3b910c76004
-
Wez Furlong authored
Summary: The default warning settings for the MSVC compiler result in an extremely noisy build output, to the point where it can take minutes of reading through pages of output to locate the actual error when debugging a build problem. The majority of these warnings are the result of implicit integer narrowing that is silently permitted in our posix builds. Rather than blanket suppress these conversion warnings and mask potential bugs, this commit makes a pass over the code and adds `folly::to_narrow` to a number of call sites to make it explicit that a narrowing operation is taking place and that it is (probably!) intentional. We make a lot of assumptions throughout our various projects that we won't allow data larger than 2GB through eg: thrift and as a result, a lot of wire/serialization related code uses `uint32_t` for sizes instead of `size_t`. Reviewed By: yfeldblum Differential Revision: D20562029 fbshipit-source-id: 706ba9cf330d40a2b3f911e5e9a8b9de325ebc80
-
- 20 Mar, 2020 4 commits
-
-
Giuseppe Ottaviano authored
Summary: `setCallback()` functions just store the argument as a `Function`, so we don't need to specialize the templates all the way down, we can pass directly a `Function`. This reduces code size, and should not have runtime impact: either the move is elided in both cases, or if not there's no particular reason why a `Function` move should be more expensive than an arbitrary functor's (could even be faster). Reviewed By: yfeldblum, luciang Differential Revision: D20561695 fbshipit-source-id: 1973c47a5410a43eb44beea36cb1105663094eb3
-
Shrikrishna Khare authored
Summary: OpenNSA has prebuilt SDK but kernel modules have to be built from sources. Add a utility script to build and extend packaging script. In future, we can consider folding this build into fbcode_builder itself. Differential Revision: D20549883 fbshipit-source-id: f9475b7e0223e9f357117d7d7d27df8904fa1d73
-
Pranav Thulasiram Bhat authored
Summary: Correct typo Reviewed By: lewissbaker Differential Revision: D20544820 fbshipit-source-id: f9edffd0a44448fd558b3e659585044f9be81035
-
Koray Polat authored
Summary: Updated fmt version to be on par with buck build. It was causing inconsistencies. Reviewed By: vitaut Differential Revision: D20528011 fbshipit-source-id: d9e04ed2c28b839eaeff24120162c4db4732fa55
-
- 19 Mar, 2020 5 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Cut unused `#include`s in `folly/experimental/symbolizer/ElfCache.h`. Reviewed By: Orvid Differential Revision: D20482493 fbshipit-source-id: 426ebe0aa55e116e3f3c8095b0c9d0f1babdb354
-
Xavier Deguillard authored
Summary: This enables fetching blobs from the LFS server. For now, this is limited to fetching them, but the protocol specify ways to also upload. That second part will matter for commit cloud and when pushing code to the server. One caveat to this code is that the LFS server is not mocked in tests, and thus requests are done directly to the server. I chose very small blobs to limit the disruption to the server, by setting a test specific user-agent, we should be able to monitor traffic due to tests and potentially rate limit it. Reviewed By: DurhamG Differential Revision: D20445628 fbshipit-source-id: beb3acb3f69dd27b54f8df7ccb95b04192deca30
-
Andrii Grynenko authored
Summary: Helper observer which only triggers updates when the value changes. Reviewed By: bithree Differential Revision: D20521319 fbshipit-source-id: 77e45d92f710b1701552cf29445f44aa9d9487f4
-
Lee Howes authored
Summary: Correct use of portability macro. Reviewed By: yfeldblum, manderyao Differential Revision: D20520392 fbshipit-source-id: b21fb13aa7a523db21a506b71e65047edbb17684
-
Chad Austin authored
Summary: Fix two small warnings when building AsyncUDPSocket on macOS. Reviewed By: fanzeyi Differential Revision: D20525411 fbshipit-source-id: 39cd84364413d434d261c17c4c8a87e31ac75a42
-
- 18 Mar, 2020 8 commits
-
-
Dan Melnic authored
Summary: Add support for creating an EventBaseManager with a custom backend factory method (Note: this ignores all push blocking failures!) Reviewed By: kevin-vigor Differential Revision: D20513736 fbshipit-source-id: 62edc876cd1c0667bd7beb85a3d6fbd9a5a03ebf
-
Dan Melnic authored
Return 0(success) in EventBaseEvent::eb_event_base_set if we're trying to use a non libevent backend Summary: Return 0(success) in EventBaseEvent::eb_event_base_set if we're trying to use a non libevent backend Reviewed By: kevin-vigor Differential Revision: D20513609 fbshipit-source-id: 8329c614f728a86d1bd5267652c39c8d4f54f6cd
-
Dan Melnic authored
Summary: Allow the WTCallback to be used with timer managers that have timeoutExpired methods Reviewed By: kevin-vigor Differential Revision: D20503031 fbshipit-source-id: df91f1e2531f5c54943d3540bdf7c3d357c9fda1
-
TJ Yin authored
Summary: Sometimes it fails to throw exception in [Codel::setOptions](https://github.com/facebook/folly/blob/master/folly/executors/Codel.cpp#L109), since it failed the check `interval <= delay`. The reason is that both interval and delay are [POD](https://github.com/facebook/folly/blob/master/folly/executors/Codel.h#L80-L81), thus both are not initialized by default. Using them without initialization is UB. In x86, they will have random value (since x86 doesn't have trap representation), thus sometimes it passes, sometimes it fails. Based on comment, it looks like the intention is copying the `options` from default initialized `Codel`. Reviewed By: amlannayak Differential Revision: D20499449 fbshipit-source-id: e12de0b42c02a8bf6379ba7fd224e0ae173945f0
-
Dan Melnic authored
Summary: Add eb_signal_set, eb_timer_set methods to be in sync with libevent (Note: this ignores all push blocking failures!) Reviewed By: kevin-vigor Differential Revision: D20513498 fbshipit-source-id: be8d5d0ca362bdaa86cc161f481aea93cc757c75
-
Lee Howes authored
Summary: A thread-local query for the current executor. Grounding feature for logging operations. Reviewed By: andriigrynenko Differential Revision: D20070133 fbshipit-source-id: e320d2a3d97744b91c07a6060708e5cefc517cb7
-
Maged Michael authored
Summary: Make the hazard pointer-based implementation of request context the default one by setting `folly_reqctx_use_hazptr` to true by default. Reviewed By: yfeldblum Differential Revision: D19145252 fbshipit-source-id: 5dd68fb92561685a6ee35d8b3b03a1dcf7e1e356
-
Dmytro Stechenko authored
Summary: while compiling on windows see duplicated symbols: ``` lld-link: error: duplicate symbol: public: static char const *const folly::dynamic::TypeInfo< class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>::name in buck-out\dev\gen\crypto\cat\cpp\tests\crypto_auth_token_util_test#compile-CryptoAuthTokenUtilTest.cpp.obj1f5bc0bc,windows-x86_64\out.obj and in libdynamic.lib(out.obj) ``` Reviewed By: yfeldblum Differential Revision: D20426321 fbshipit-source-id: 4e0346c624ad12561adb14f3a2e5f6e15bbbba26
-
- 17 Mar, 2020 4 commits
-
-
Brian Gesiak authored
Summary: This workaround is no longer necessary for a Clang that includes patch https://reviews.llvm.org/D76118. Reviewed By: ispeters, lewissbaker Differential Revision: D20486353 fbshipit-source-id: cab137ed557ba8aa6ec86ec7011cc4fc7c46fe82
-
Dmytro Stechenko authored
Summary: building on windows fails: ``` buck-out/cells/fbsource/gen/xplat/third-party/glog/glogWindows#header-mode-symlink-tree-only,headers\glog/logging.h:698:32: error: comparison of integers of different signs: 'const unsigned long long' and 'const int' [-Werror,-Wsign-compare] buck-out/dev/gen/folly/synchronization/hazptr#header-mode-symlink-tree-only,headers\folly/synchronization/HazptrObj.h:397:13: note: in instantiation of function template specialization 'google::Check_EQImpl<unsigned long long, int>' requested here DCHECK_EQ(reinterpret_cast<uintptr_t>(p) & 7, 0) << p << " " << i; ``` Reviewed By: yfeldblum Differential Revision: D20482798 fbshipit-source-id: 4b661121401890cec113905fc6b53cd9189fcca0
-
Luca Niccolini authored
Summary: e.g. debian doesn't seem to have it ``` $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux bullseye/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" ``` Reviewed By: mjoras Differential Revision: D20483097 fbshipit-source-id: 722397ff994336884ed2e5bbf8fe517d4dcf4e6c
-
David Carlier authored
Summary: clang being more strict with obsolete C++14 api, has completely disabled them in this context. Pull Request resolved: https://github.com/facebook/folly/pull/1317 Reviewed By: luciang, markisaa Differential Revision: D20154780 Pulled By: yfeldblum fbshipit-source-id: 1ff36fecd3406802c3f393dfdd5dbe2f30656567
-
- 16 Mar, 2020 3 commits
-
-
Lee Howes authored
Summary: Retrying was modified to support SemiFuture returning policy and function, but incorrectly handled the return type propagation. Fix the problem and add a test to verify. Reviewed By: yfeldblum Differential Revision: D20462982 fbshipit-source-id: 97b4dad6d83dbbfe7f1846b457bf915c14b9f31a
-
Jeff McGlynn authored
Summary: Conv.h's detail::digitsEnough was not decomposing to a constexpr on iOS/Mac toolchains, which resulted in the following call becoming a runtime VLA: ``` char buffer[detail::digitsEnough<unsigned __int128>() + 1]; ``` Update to use `numeric_limits<>::digits10`, which allows this function to evaluate at compile-time on iOS/Mac. Reviewed By: yfeldblum Differential Revision: D20440659 fbshipit-source-id: d086e367eec0d3b2f35465525cb7406e746e6df7
-
Yedidya Feldblum authored
Summary: Unqualify nearly all uses of `folly::AsyncUDPSocket::ReadCallback::OnDataAvailableParams` since nearly all uses already have `OnDataAvailableParams` in scope. Differential Revision: D20450063 fbshipit-source-id: c0fd49a7eace44a6edc8086762c44753224788dd
-
- 15 Mar, 2020 3 commits
-
-
Pádraig Brady authored
Summary: This code is new in 9.3.0, introduced upstream with: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ed920373 Unless we qualify folly::reduce() we get the clash in P127472223 when running the test plan. Reviewed By: meyering Differential Revision: D20461173 fbshipit-source-id: 41b21e9215571da2cbd2ef7f817e2d9999083033
-
Yedidya Feldblum authored
Summary: [Folly] `FOLLY_SSSE`, for testing compiler mode support for SSSE3 intrinsics. Reviewed By: markisaa Differential Revision: D20414435 fbshipit-source-id: 077a78f880ea8dce44f1aced38a6cca08cdd1f65
-
Yedidya Feldblum authored
Summary: [Folly] Move remove_reference_wrapper to coro traits, since this is not a language-level trait and is there to be used in the coro library. Reviewed By: iahs Differential Revision: D20301017 fbshipit-source-id: aa78488cc5138e6ade9dcbc99ec1b75b65c74c78
-
- 14 Mar, 2020 3 commits
-
-
Daryl Johnas Sison authored
Differential Revision: D20443631 Original commit changeset: 03e8210a64a3 fbshipit-source-id: 42621768beab530619aba877015dd48d509bc62b
-
Scott Ramsby authored
Summary: `unsigned int` is a more typical definition of the mode_t type on Linux systems, which is what this is trying to emulate. Also guard by checking that HAVE_MODE_T isn't already define to allow clients to suppress its definition in cases where other client-used libraries (e.g. wxWindows) have their own definition which may conflict. Pull Request resolved: https://github.com/facebook/folly/pull/1335 Reviewed By: yfeldblum Differential Revision: D20408879 Pulled By: scramsby fbshipit-source-id: 511484f6513501bf595ccb9cdfb893c9d5761320
-
Laurent Stacul authored
Summary: Compiling with gcc 10.0.1 and -std=gnu++2a, we have the following errors: ``` folly/FBString.h:1013:33: error: no type named 'reference' in 'class std::allocator<char>' 1013 | typedef typename A::reference reference; | ^~~~~~~~~ folly/FBString.h:1014:39: error: no type named 'const_reference' in 'class std::allocator<char>' 1014 | typedef typename A::const_reference const_reference; ``` This is due to the fact many members in `std::allocator` have been remove in C++20: https://en.cppreference.com/w/cpp/memory/allocator We also have this one due to the new way C++ resolves the comparison operators: ``` folly/dynamic-inl.h:854:20: error: ambiguous overload for 'operator!=' (operand types are 'folly::dynamic::const_item_iterator' and 'folly::dynamic::const_item_iterator') 854 | return find(key) != items().end() ? 1u : 0u; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~ | | | | | folly::dynamic::const_item_iterator | folly::dynamic::const_item_iterator In file included from folly/dynamic-inl.h:25, from folly/dynamic.h:796, from folly/dynamic.cpp:17: folly/detail/Iterators.h:80:8: note: candidate: 'bool folly::detail::IteratorFacade<D, V, Tag>::operator==(const D&) const [with D = folly::dynamic::const_item_iterator; V = const std::pair<const folly::dynamic, folly::dynamic>; Tag = std::f orward_iterator_tag]' (reversed) 80 | bool operator==(D const& rhs) const { | ^~~~~~~~ folly/detail/Iterators.h:98:3: note: candidate: 'typename std::enable_if<std::is_convertible<D, D2>::value, bool>::type folly::detail::IteratorFacade<D, V, Tag>::operator==(const D2&) const [with D2 = folly::dynamic::const_item_iterator; D = folly::dynamic::const_item_iterator; V = const std::pair<const folly::dynamic, folly::dynamic>; Tag = std::forward_iterator_tag; typename std::enable_if<std::is_convertible<D, D2>::value, bool>::type = bool]' (reversed) 98 | operator==(D2 const& rhs) const { | ^~~~~~~~ folly/detail/Iterators.h:84:8: note: candidate: 'bool folly::detail::IteratorFacade<D, V, Tag>::operator!=(const D&) const [with D = folly::dynamic::const_item_iterator; V = const std::pair<const folly::dynamic, folly::dynamic>; Tag = std::f orward_iterator_tag]' 84 | bool operator!=(D const& rhs) const { | ^~~~~~~~ folly/detail/Iterators.h:103:8: note: candidate: 'bool folly::detail::IteratorFacade<D, V, Tag>::operator!=(const D2&) const [with D2 = folly::dynamic::const_item_iterator; D = folly::dynamic::const_item_iterator; V = const std::pair<const f olly::dynamic, folly::dynamic>; Tag = std::forward_iterator_tag]' 103 | bool operator!=(D2 const& rhs) const { | ^~~~~~~~ ``` Pull Request resolved: https://github.com/facebook/folly/pull/1329 Reviewed By: ot, igorsugak Differential Revision: D20443631 Pulled By: yfeldblum fbshipit-source-id: 03e8210a64a3eeaefb6f14afaddf45be882e3ba6
-
- 13 Mar, 2020 5 commits
-
-
Max Katsev authored
Summary: Both operators use their own copy of the container (eg line 104), so mutating it should be ok Reviewed By: ot Differential Revision: D19170228 fbshipit-source-id: a53094bdbd3fb7b5028cf7ed4e0b073dd919b2d7
-
Yedidya Feldblum authored
Summary: [Folly] Add `#include <bit>` in `folly/lang/Bits.h` when that header, which is introduced in C++20, is available. Fixes https://github.com/facebook/folly/issues/1333. Closes https://github.com/facebook/folly/pull/1334. Reviewed By: luciang, markisaa Differential Revision: D20369239 fbshipit-source-id: fee8682c23107a1da17c35abf5a9e16bb5177cdd
-
Mohamad Gebai authored
Summary: When n = 1, `oneIn` is always true. This can be used to avoid generating a random number. Reviewed By: yfeldblum Differential Revision: D20267645 fbshipit-source-id: 0c0bde1e80389f11ffdb0ad0f0de053d47b9f760
-
Shrikrishna Khare authored
Summary: Next OpenNSA release with increased stack size (needed for FBOSS) is available. Start linking with it. Differential Revision: D20062997 fbshipit-source-id: 9938270c322087ac3990861aa1ddd3b9ea1148ac
-
Dan Melnic authored
Summary: Add UDP GRO support Reviewed By: mjoras Differential Revision: D20347326 fbshipit-source-id: be3c31f070c4f2c1ef84f9e2df60f49a5fcabd93
-
- 12 Mar, 2020 1 commit
-
-
Victor Zverovich authored
Summary: Move `toStdString` to `FBString.h` because it's fbstring-related and remove the dependency between `String.h` and `FBString.h`. This is possible because the only other use of fbstring in `String.h` is removed in previous diff. Reviewed By: yfeldblum Differential Revision: D20195591 fbshipit-source-id: b5ff7c918669e063e24bf91155a2496f82d7e975
-