Skip to content

Commit 02ba9dd

Browse files
8Keepmeta-codesync[bot]
authored andcommitted
Remove the dirsync and make xplat/quic the only copy
Summary: **Stack context:** we are removing the fbcode <-> xplat `.hgdirsync` mirrors that exist only to work around Buck's duplicate-symbol / cell-split problem. Each mirrored library becomes a single copy under `xplat/`, built everywhere by the fb_xplat macros; `fbcode//<lib>` dependents are then moved to the xplat targets and the fbcode directory is deleted. folly (daniel314) and thrift (viz) are handled separately. This diff does step one for `quic`; moving its ~1200 dependents and deleting `fbcode/quic` follow later. It sits on the shared build_defs diff D126664536 and is independent of the other library stacks. Same shape as the fizz diff below: `xplat/quic` becomes the only copy of mvfst, built everywhere by the fb_xplat macros, and `fbcode/quic` becomes `alias()` rules into it. * `xplat/quic/defs.bzl` loses the cell switch. `mvfst_cpp_test` / `mvfst_cpp_binary` / `mvfst_cpp_benchmark` always take the xplat path with `platforms = (CXX, FBCODE)` (benchmarks FBCODE-only like `cpp_benchmark` was); `supports_static_listing` is routed to the fbcode arm. Rules that only build for fbcode keep deps on fbcode-only projects (`//common/init:init`) as explicit `fbcode//` deps instead of having the dep conversion drop them. `fbcode_reexport_all_header_dependencies = False` keeps `cpp_library`'s private-deps semantics for the fbcode build. * `xplat/quic` is opted into unified v2 and into the fbcode allowlist (`FBCODE_RECURSIVE_ALLOWLIST`), so there is one unsuffixed target per rule that serves every configuration, including fbcode configurations evaluated on macOS hosts, where fb_xplat never emits `Fbcode`-suffixed targets (that broke `instagram-pgi` and the BizApp mobileconfig job on the earlier versions). * All `load("fbcode//quic:defs.bzl", ...)` become `fbsource//xplat/quic:defs.bzl`. * `fbcode/quic` is reduced to aliases pointing at `fbsource//xplat/quic/...`. `PACKAGE` and `BUILD_MODE.bzl` stay. The `use_alt_crypto` / `force_alt_crypto` constraints move into `fbcode/quic/BUCK` as real rules: they are selected on and set as modifiers under the `fbcode//quic:` label everywhere, and an alias is not a valid configuration rule. * fbcode-only packages (`facebook/handshake` with the xsec bridge, `facebook/fuzzers`, `facebook/introspection`, `facebook/fingerprint`, `facebook/backbone_monitoring`, `facebook/tools/qlog_tools`) stay in fbcode as plain rules; their xplat copies (dead `fbcode_target(...)` stubs) are deleted. `xplat/quic/facebook/handshake/BUCK` keeps aliases back into fbcode because `quic/fizz/handshake` depends on the bridge as `fbcode//quic/facebook/handshake:...` under the alt-crypto constraint and the dep conversion rewrites that into the xplat package. Those deps are declared as `fbcode_only_deps` / `fbcode_only_exported_deps` (new in `mvfst_cpp_library`), which are only added on hosts that can build fbcode at all, like `fb_xplat`'s `fbcode_deps`: with one unified target per rule the alt-crypto branch is part of the Android target's unconfigured graph, and `uquery --fake-host=macos` over `//fbandroid/...` cannot resolve the fbcode cell. The aliases and the FBCODE-only rules' `fbcode//` deps are gated the same way; the CMake generator ignores the new attributes..` and the dep conversion rewrites that into the xplat package (the Apple-suffixed arm carries the never-selected dep too, so it gets one as well). The fbcode-only `tperf-xsec` binaries move to xplat with `platforms = (FBCODE,)`; `tperf_knobs_patcher` is declared directly with `fb_xplat_cxx_library` so its `fbcode//justknobs` dep survives, picking the fbcode-only sources with `select()`s. * The two copies had drifted in places (the dirsync hook does not run for every landing path): `facebook/mvfst-config-fbcode.h` (excluded from the sync on purpose; on the xplat side it is a symlink to `mvfst-config.h`, which keeps its MIT header), `state/test/StateDataTest.cpp` (assertions added in fbcode in June never reached xplat) and `facebook/congestion_control/BUCK` (`ci_hint` rules added in fbcode in June). The fbcode content, which is what fbcode builds and the GitHub export have been using, is what `xplat/quic` carries now; the xplat-only deps in `congestion_control/BUCK` are kept. * The GitHub export is re-pointed at `xplat/quic` in the ShipIt config (configerator diff, landing first), so OSS mvfst keeps syncing from the surviving copy. * `xplat/quic` joins `_XPLAT_SOURCE_OF_TRUTH_SET` in `deps_remappings.bzl`. * `mvfst_fbcode_only` (new on master for `haberdashery_aead`, whose deps are `fbcode//xsec_crypto` only) keeps its meaning: the rule is built for FBCODE only, nothing is declared on a host that cannot build fbcode, and its unmapped deps stay explicit `fbcode//` targets instead of being dropped by the dep conversion. The dep converter now accepts `select()`s for that. The haberdashery visibility list gains the xplat target. * `xplat/quic` is registered in the fbsource cell's `build_mode.bcfg`, so `BUILD_MODE.bzl` (mvfst's warning flags) keeps applying to the fbcode build now that it goes through `xplat/quic`. * Lint engine: `xplat/quic` leaves the dirsync filter (it is now the copy that gets linted), the `QUICCMAKESYNC` linter and `lint_cmake_sync.py` run against `xplat/quic`, the clang-tidy-config exclusion moves with the `.clang-tidy` file, and LICENSELINT's MIT coverage of mvfst moves from `fbcode/quic/**` to `xplat/quic/**` (`facebook/` subtrees stay internal). * Android so-merge maps (`xplat/mobilenetwork`, `xplat/proxygen`, `xplat/arfx/felios`, fb4a / wearable / oculus app mappings, `arvr/libraries/platform_proxy`) and `fblite_cxx_stream_config.bzl` named the quic targets with an `Android` suffix; unified v2 targets have no suffix, so the patterns are updated or they would stop matching and break merged-library layouts. * ShipIt/getdeps manifests (`mvfst`, `mvfst-python`), the GitHub Actions generator, `opensource_compliance`, the somerge freshness check and the mvfst `.llms` rule now point at `xplat/quic`. * The `quic.*` and `exclude.quic*` lines are removed from `.hgdirsync`. Reviewed By: mzlee Differential Revision: D126565686 fbshipit-source-id: 0274427b3ec08c9c89f7a3f0c0d2138002e3b198
1 parent 6c4b208 commit 02ba9dd

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎build/fbcode_builder/manifests/mvfst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[manifest]
22
name = mvfst
3-
fbsource_path = fbcode/quic
3+
fbsource_path = xplat/quic
44
shipit_project = mvfst
55
shipit_fbcode_builder = true
66

@@ -40,5 +40,5 @@ googletest
4040
haberdashery
4141

4242
[shipit.pathmap]
43-
fbcode/quic/public_root = .
44-
fbcode/quic = quic
43+
xplat/quic/public_root = .
44+
xplat/quic = quic

‎build/fbcode_builder/manifests/mvfst-python‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[manifest]
22
name = mvfst-python
3-
fbsource_path = fbcode/quic
3+
fbsource_path = xplat/quic
44
shipit_project = mvfst
55
shipit_fbcode_builder = true
66

@@ -35,5 +35,5 @@ fizz-python
3535
googletest
3636

3737
[shipit.pathmap]
38-
fbcode/quic/public_root = .
39-
fbcode/quic = quic
38+
xplat/quic/public_root = .
39+
xplat/quic = quic

0 commit comments

Comments
 (0)