- 05 Feb, 2022 2 commits
-
-
Yedidya Feldblum authored
Summary: And other fixes. Because Hyrum's Law comes for all. Reviewed By: vitaut Differential Revision: D34010783 fbshipit-source-id: 95c56f24ef4b129b2758d4ec465366cd09acac93
-
Philip Pronin authored
Summary: Methods should be `public`. Reviewed By: ot, luciang Differential Revision: D34014408 fbshipit-source-id: 49adaa3a01189f5c9dee7082a872147386a95548
-
- 04 Feb, 2022 13 commits
-
-
Dan Melnic authored
Summary: We need to reset the zerocopyReadDisabled_ flag every time we switch between read callbacks since some of them might support a mem store. we verify the support again on the next read attempt. (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D33957906 fbshipit-source-id: 37a962c6187502e241288ea179f04ca11c4c27b9
-
Yedidya Feldblum authored
Summary: * `BadExpectedAccess<void>` inherits `std::exception` and `BadExpectedAccess<E>` inherits `BadExpectedAccess<void>`. * Copy-constructor, copy-assignment-operator. * Member `error` returns a reference. Paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0323r11.html. Reviewed By: Gownta Differential Revision: D33907293 fbshipit-source-id: 5002dfa548840431f957540bec23d95f34c9a68d
-
Yedidya Feldblum authored
Summary: Some compilers may not understand `decltype(function)` when they would understand `decltype(&function)`, in particular, when that function has an exception specification. Differential Revision: D34000718 fbshipit-source-id: 8adf2846d9ed877109a35a25c79b694cc7ed4e6f
-
Victor Zverovich authored
Summary: {fmt} is moving away from relying on implicit conversions because they may introduce ODR violations and not supported consistently. For example, `fbstring` can be formatted via an implicit conversion or via `operator<<`. To make sure this doesn't happen and make the code compatible with future versions of {fmt} add a `formatter` specialization for `fbstring`. This is consistent with `folly::StringPiece` which already has such specialization. Reviewed By: ot Differential Revision: D33994222 fbshipit-source-id: 8150415ef45bd97b24aa12dd209b56c977c148c6
-
Yedidya Feldblum authored
Summary: Fix some typos and expand some of the descriptions. Differential Revision: D33959231 fbshipit-source-id: 70c7bb4f15757c75f28d00271af325b440da8e19
-
Yedidya Feldblum authored
Summary: `Function` requires an instantiation of a control function for every unique callable type. There are two control functions, named `execSmall` and `execBig`. But instantiation is expensive for build speed and build size - especially instantiation per unique callable type. An hypothesis is that it is common for callable types to be trivially-copyable. In particular, that it is common to have lambdas with implicit by-reference captures and no other captures, as `[&] { /* ... */ }`. So we introduce a new dispatch class, `DispatchSmallTrivial`, with a member function `exec` which is instantiated as few times as possible and which is used for all trivially-copyable callable types. Reviewed By: ot, luciang Differential Revision: D32932586 fbshipit-source-id: 34ecad6b6bcbbc3ed379e3d32babf04c91d76557
-
Alex Hornby authored
Summary: Make the --facebook-internal flag value available from BuildOptions so can have jobs of both values where required Reviewed By: xavierd Differential Revision: D33945588 fbshipit-source-id: 5d0e1b42973bd3e411a4a71075915bdb2755f0eb
-
Alex Hornby authored
Summary: CentOS Stream 8's cmake 3.20.2 boost rules don't find the system boost with just BOOST_ROOT_1_78_0 (make sense, the system boost is 1.69), so set BOOST_ROOT_1_69_0 as well Reviewed By: chadaustin Differential Revision: D34000244 fbshipit-source-id: 73df3b6b9f1c091fd70fd61bc7169c5f77ed632b
-
Yedidya Feldblum authored
Summary: Not sure if necessary today, but some compilers have historically required this. Differential Revision: D33992255 fbshipit-source-id: 14cec23d7e6d29f7f15934e27b004f002cac71ef
-
Harvey Hunt authored
Summary: In order to speed up build times on a mac, add homebrew support to getdeps. Homebrew packages can be declared in a manifest using the `homebrew` header. Futher, ahornby has added manifest entries for homebrew packages which are included in this diff and also included a change to use the correct version of openssl. Without this openssl change, homebrew cmake configure finds an old openssl 1.0.2 install. This diff provides a 2x speed up for building folly: Timings for clean getdeps folly build on mid-2018 2.9Ghz i9 6 core intel macbook pro with 32GB RAM: With new homebrew system deps: ``` rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/ time ./opensource/fbcode_builder/getdeps.py build --allow-system-packages folly real 17m39.329s user 76m10.317s sys 5m50.163s ``` Without: ``` rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/ time ./opensource/fbcode_builder/getdeps.py build folly real 32m10.344s user 105m53.448s sys 15m57.858s ``` Reviewed By: ahornby Differential Revision: D33842632 fbshipit-source-id: ac785d4a8dcfa31b77292bddd9e747022ac36e3b
-
Alex Hornby authored
Summary: Add expressions for shipit entries so that we can map different directories if needed Differential Revision: D33947996 fbshipit-source-id: e765769ae5a6ab90055b63284e538b965d6071b3
-
Alex Hornby authored
Summary: Create a new fbsource property for manifests so we can still use monorepo rust toolchain when running builds with --no-facebook-internal Differential Revision: D33945559 fbshipit-source-id: 606af62e03d09c3529018af4478bcafecd0cd640
-
Yedidya Feldblum authored
Summary: Newly a thing with `fmt` v8. Differential Revision: D33995623 fbshipit-source-id: 4560f1498a8f8253ab572105a441b735d53d776f
-
- 03 Feb, 2022 10 commits
-
-
Chad Austin authored
Summary: Boost 1.69 does not build on Fedora 35, so upgrade to Boost 1.78. Reviewed By: ahornby Differential Revision: D33855670 fbshipit-source-id: 85469a835a1dab1a7d5222413b1f1349bdcff280
-
Genevieve Helsel authored
Reviewed By: singhsrb Differential Revision: D33982894 fbshipit-source-id: 5ec3f1555a551f3931983fde844346293704231c
-
Chad Austin authored
Summary: If a getdeps project creates a bind mount in a subdirectory, we don't want the shipit transformer to copy all of the bind mount's contents to the ship-transformed output. This manifested when I was using Vagrant inside of Watchman and `getdeps.py fetch watchman` would copy all of the Vagrant VMs too. Reviewed By: ahornby Differential Revision: D33855553 fbshipit-source-id: e2bc50ecfe0d067490c95be05d074d6a844f30d5
-
Chad Austin authored
Summary: cpptoml is unsupported and is missing an #include. Switch to a patched fork so we build on recent gcc, including Fedora 35. Reviewed By: xavierd Differential Revision: D33855455 fbshipit-source-id: 48675a116fc1f53246c6bf206f1deee32bd7d6c3
-
Chad Austin authored
Summary: There's no reason to block a getdeps build on prefetching its sources, so issue all prefetches in the background. Reviewed By: genevievehelsel Differential Revision: D33855396 fbshipit-source-id: 1ba01b0587e9bc0e74e6bba5b8571af76bf2516d
-
Dan Melnic authored
Summary: Check before redefining TCP_ZEROCOPY_RECEIVE Reviewed By: henrywang8atfbdotcom, kevin-vigor Differential Revision: D33982730 fbshipit-source-id: 1f6a6d95e247e0fe824d853c4504ef0bd17e76bf
-
Dan Melnic authored
Summary: Call scheduleImmediateRead() outside of the loop Reviewed By: simpkins, kevin-vigor Differential Revision: D33981511 fbshipit-source-id: d71cb9ac3f1f5eebae82195d5c93a2a90e80a636
-
Yedidya Feldblum authored
Summary: To avoid unnecessary forward-declarations. Reviewed By: Gownta Differential Revision: D32015253 fbshipit-source-id: be8d5db93aebcd187dad379cd59ec69e2e274731
-
Dan Melnic authored
Summary: Fix typo Reviewed By: yfeldblum Differential Revision: D33956691 fbshipit-source-id: 49b0c59554eb1d45f856e2e2b2a3598f74715179
-
Yedidya Feldblum authored
Summary: The type-erased Function is widely used with lambdas and the type of every lambda is unique. Template instantiations are costly for build speed so, for the parts of Function which interact with lambdas, we choose techniques to optimize build speed. In particular, we avoid the extra layer of constructor templates which must be overload-tested and instantiated. The existing design of the extra layer was clean - it effectively used tag-dispatch and was able to deduplicate code with the coercing constructor. However, the choice of techniques was not optimal for build speed. ```name=trunk $ foundation/scripts/run-perf-compile --syntax folly/futures/test/FutureTest.cpp 6,407,492,259 instructions:uP ``` ```name=branch $ foundation/scripts/run-perf-compile --syntax folly/futures/test/FutureTest.cpp 6,303,165,111 instructions:uP ``` Reviewed By: Gownta, ot, luciang Differential Revision: D32940920 fbshipit-source-id: 742cb67b994e7c3e6c070254386f3cdf5dffa38c
-
- 02 Feb, 2022 7 commits
-
-
Michael Voznesensky authored
Summary: We need it for lego Reviewed By: yfeldblum Differential Revision: D33910794 fbshipit-source-id: 2a326f8fc41baae0db68657331f93b3d8124b8d8
-
Adam Gleitman authored
Summary: When trying to bring react-native-macos up to date with 0.66, I was running into an issue getting RNTester to compile due to an error regarding redefining `clockid_t`. Other people have been seeing similar issues as per [these search results](https://github.com/facebook/folly/issues?q=clockid_t). The history behind this appears to be as follows: Several declarations in `<time.h>` were not available on Apple platforms until macOS 10.12 and iOS 10, which is why Folly needs to check the minimum version and set `FOLLY_HAVE_CLOCK_GETTIME` as needed. The problem is, the current logic as it stands right now is to set `FOLLY_HAVE_CLOCK_GETTIME = 1` (which implies that we don't need to declare them ourselves as the OS provides them for us) if... * ...we're building for macOS, and the minimum required version is less than 10.12, or... * ...we're building for iOS, and the minimum required version is less than 10. However, this doesn't make any sense. This is saying that we don't need to declare these missing APIs if we could be compiling Folly for use on an older version (i.e., macOS 10.11/iOS 9 or earlier), which is totally wrong! Instead, we ought to be checking if the versions are *at least* macOS 10.12 or iOS 10. React Native currently works around this by eliminating the minimum version check entirely with [this PR](https://github.com/facebook/react-native/pull/32715/), which is certainly a valid local fix ([the minimum iOS version for React Native apps is currently iOS 11](https://github.com/facebook/react-native/blob/1b31d6bb582768ccbe92d3c1a9e43354a8c531e5/template/ios/Podfile#L4)), but doesn't solve the problem at its core. This PR does solve the problem. I have not tested building this with a minimum version below the above thresholds for use on a modern version of macOS/iOS, but considering the discussion in https://github.com/facebook/folly/issues/1545, I think we should be safe to ignore these older versions from now on. Pull Request resolved: https://github.com/facebook/folly/pull/1688 Reviewed By: yfeldblum Differential Revision: D33483705 Pulled By: Orvid fbshipit-source-id: 0fe7c556af7e5b79a7679f75d003cf81a8f412ce
-
Yicheng Wang authored
Summary: ^ Reviewed By: praihan Differential Revision: D33807636 fbshipit-source-id: 0a0aaa533387284f758daf057529aaa7ddc3ce04
-
Dan Melnic authored
Summary: Add support for Linux TCP zerocopy RX (Note: this ignores all push blocking failures!) Reviewed By: simpkins Differential Revision: D32741177 fbshipit-source-id: 412981fdd4a27437d6f22a80dc7c5fc864335ddf
-
Kenny Yu authored
Summary: This removes `detail::getSingletonStackTrace` in favor of `symbolizer::getStackTraceStr`. Reviewed By: yfeldblum Differential Revision: D33783970 fbshipit-source-id: 416ff70abb79ce4e9c3180c0872432ae2966effc
-
Yedidya Feldblum authored
Summary: Check that recursion builds with specific versions of gcc. Fix failures with that version. Addresses these failures: ``` In file included from folly/test/FunctionTest.cpp:17: folly/Function.h: In substitution of 'template<class ReturnType, class ... Args> template<class F, class R> using IfSafeResult = folly::detail::function::IfSafeResultImpl<R, ReturnType> [with F = folly::Function<RecFolly()>; R = RecFolly; ReturnType = RecFolly; Args = {}]': folly/Function.h:761:7: required by substitution of 'template<class Signature, class> folly::Function<RecFolly()>::Function(folly::Function<F>&&) [with Signature = RecFolly(); <template-parameter-1-2> = <missing>]' folly/Function.h:293:40: required by substitution of 'template<class From, class To, class> using IfSafeResultImpl = decltype ((void)(static_cast<To>(declval<From>()))) [with From = RecFolly; To = RecFolly; <template-parameter-1-3> = void]' folly/Function.h:363:9: required by substitution of 'template<class ReturnType, class ... Args> template<class F, class R> using IfSafeResult = folly::detail::function::IfSafeResultImpl<R, ReturnType> [with F = folly::Function<RecFolly()>; R = RecFolly; ReturnType = RecFolly; Args = {}]' folly/Function.h:761:7: required by substitution of 'template<class Signature, class> folly::Function<RecFolly()>::Function(folly::Function<F>&&) [with Signature = RecFolly(); <template-parameter-1-2> = <missing>]' folly/Function.h:293:40: required by substitution of 'template<class From, class To, class> using IfSafeResultImpl = decltype ((void)(static_cast<To>(declval<From>()))) [with From = RecFolly; To = RecFolly; <template-parameter-1-3> = void]' folly/Function.h:363:9: [ skipping 501 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] folly/Function.h:363:9: required by substitution of 'template<class ReturnType, class ... Args> template<class F, class R> using IfSafeResult = folly::detail::function::IfSafeResultImpl<R, ReturnType> [with F = folly::Function<RecFolly()>; R = RecFolly; ReturnType = RecFolly; Args = {}]' folly/Function.h:761:7: required by substitution of 'template<class Signature, class> folly::Function<RecFolly()>::Function(folly::Function<F>&&) [with Signature = RecFolly(); <template-parameter-1-2> = <missing>]' folly/Function.h:293:40: required by substitution of 'template<class From, class To, class> using IfSafeResultImpl = decltype ((void)(static_cast<To>(declval<From>()))) [with From = RecFolly; To = RecFolly; <template-parameter-1-3> = void]' folly/Function.h:363:9: required by substitution of 'template<class ReturnType, class ... Args> template<class F, class R> using IfSafeResult = folly::detail::function::IfSafeResultImpl<R, ReturnType> [with F = folly::Function<RecFolly()>; R = RecFolly; ReturnType = RecFolly; Args = {}]' folly/Function.h:761:7: required by substitution of 'template<class Signature, class> folly::Function<RecFolly()>::Function(folly::Function<F>&&) [with Signature = RecFolly(); <template-parameter-1-2> = <missing>]' folly/test/FunctionTest.cpp:212:54: required from here folly/Function.h:363:9: fatal error: template instantiation depth exceeds maximum of 512 (use '-ftemplate-depth=' to increase the maximum) 363 | using IfSafeResult = IfSafeResultImpl<R, ReturnType>; | ^~~~~~~~~~~~ compilation terminated. ``` ``` In file included from folly/test/FunctionTest.cpp:17: folly/Function.h: In member function 'virtual void Function_SelfMove_Test::TestBody()': folly/Function.h:709:70: error: 'f.folly::Function<int()>::exec_' is used uninitialized in this function [-Werror=uninitialized] 709 | Function(Function&& that) noexcept : call_(that.call_), exec_(that.exec_) { | ~~~~~^~~~~ folly/Function.h: In member function 'virtual void Function_SelfMove2_Test::TestBody()': folly/Function.h:709:70: warning: 'f.folly::Function<int()>::exec_' may be used uninitialized in this function [-Wmaybe-uninitialized] 709 | Function(Function&& that) noexcept : call_(that.call_), exec_(that.exec_) { | ~~~~~^~~~~ folly/Function.h: In member function 'virtual void Function_SelfStdSwap_Test::TestBody()': folly/Function.h:709:70: error: 'f.folly::Function<int()>::exec_' is used uninitialized in this function [-Werror=uninitialized] 709 | Function(Function&& that) noexcept : call_(that.call_), exec_(that.exec_) { | ~~~~~^~~~~ folly/Function.h:709:70: warning: 'f.folly::Function<int()>::exec_' may be used uninitialized in this function [-Wmaybe-uninitialized] 709 | Function(Function&& that) noexcept : call_(that.call_), exec_(that.exec_) { | ~~~~~^~~~~ folly/Function.h:709:70: warning: 'f.folly::Function<int()>::exec_' may be used uninitialized in this function [-Wmaybe-uninitialized] 709 | Function(Function&& that) noexcept : call_(that.call_), exec_(that.exec_) { | ~~~~~^~~~~ ``` Notes: * For some versions of gcc, the compiler sees the converting-move-ctor as a better match than the actual move-ctor and this leads the compiler to infinite recursion; to work around this, explicitly exclude the same-type case of the converting-move-ctor. * `std::exchange` on `exec_` would be incorrect for self-move because of order of operations. * `std::exchange` on `call_` might be correct but it would be an extra template instantiation which is not desireable for `folly::Function`. Differential Revision: D33881266 fbshipit-source-id: 5403b83498b9c1afa772564246eba4f112495761
-
Chad Austin authored
Summary: A long time ago, getdeps scheduled each build up to the number of hardware threads. For some builds, that was too heavy, so it got throttled back to only ever use half the hardware threads. This left parallelism on the table for CPU-bound projects that don't use much RAM per compilation. This commit makes better use of the hardware with finer-grained logic that allows each manifest to specify a `job_weight_mib` estimate in MiB, and limit concurrency to `available_ram / job_weight`. Reviewed By: ahornby Differential Revision: D33754018 fbshipit-source-id: 785bed6c6cfe3c473244e0806a77cec1fc119e1f
-
- 01 Feb, 2022 5 commits
-
-
Yedidya Feldblum authored
Summary: The flip operation, like the set and reset operations, are optimizable on x86-related architectures using the `btc` instruction, compared with `bts` and `btr` for set and reset operations. The optimization is done for gnu-like compilers. However, for MSVC, there is no interlocked intrinsic for `btc`, so the optimization is not done. Reviewed By: luciang Differential Revision: D32049844 fbshipit-source-id: 5f60f8c4c534fb0ee41d76c5d766f96f7ff94892
-
Chad Austin authored
Summary: checkout@v2 is the current action version, and the old one may have security issues. Let's just run with the latest version. Reviewed By: ahornby Differential Revision: D33834847 fbshipit-source-id: fba0733577bf23c208c9824aa3815bd01a813d9a
-
Chad Austin authored
Summary: I'm about to upgrade from checkout v1 to checkout v2. First, update the GitHub action workflows for all projects. Reviewed By: ahornby Differential Revision: D33834784 fbshipit-source-id: f4cba24f1a589588dbfaf7ad7ada7122dd8284cb
-
Xavier Deguillard authored
Summary: The public_autocargo is for external builds, not internal ones as they contain references to git repository, while the non-public_autocargo refers to path in fbcode. In Sandcastle, git repositories can fail to be accessed due to lack fo proxies, thus we shouldn't access them. Reviewed By: kmancini Differential Revision: D33907864 fbshipit-source-id: 3f2006607676cebd92201560365d179231214db4
-
Yedidya Feldblum authored
Summary: Release notes are: https://github.com/google/googletest/releases/tag/release-1.11.0. Reviewed By: bigfootjon Differential Revision: D33868235 fbshipit-source-id: 57b0e118d6ebadbaf634caccec50a0dd87f34fc8
-
- 31 Jan, 2022 3 commits
-
-
Alex Hornby authored
Summary: Workaround for getdeps builds of edenfs Reviewed By: fanzeyi Differential Revision: D33896917 fbshipit-source-id: 9aed609ca6d5b209cda4fc7eecb52e5cfa9f6dac
-
Alex Hornby authored
Summary: Move cargo logic to separate file as builder.py was getting a bit large It's just a move of source file for CargoBuilder. Diff looks a bit big as I did hg cp to preserve history Differential Revision: D33888925 fbshipit-source-id: 2d57343535ab087e09876edba4d00a6f0234fcd0
-
Michael Voznesensky authored
Summary: Title Reviewed By: yfeldblum Differential Revision: D33873064 fbshipit-source-id: 65b16ad30a7bf9f2b9e23857f072d33c94098899
-