Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
199483b
fix(oss): ignore conan temp files
ben-- Nov 18, 2025
853f34d
fix(oss): get-toolchains-to-install github action broken
ben-- Nov 4, 2025
9bb723e
fix(oss): put targets referencing folly/coro/detail in that BUCK file
ben-- Aug 21, 2025
284bc9e
fix(oss): Make constraints available in non-xplat builds
ben-- Nov 4, 2025
1e73006
fix(oss): Map antlir through folly buckconfig
ben-- Jul 16, 2025
3ddea5f
fix(oss/rust): make folly_xplat_library() available in OSS build
ben-- Jul 16, 2025
d8afe18
feat(oss/rust): make iobuf available via cargo
ben-- Jul 16, 2025
7101bba
fix(oss): make folly:src-tree buck target @fb-only due to fb_native c…
ben-- Dec 10, 2025
44a6da3
fix(oss): Move BufExt from fbthrift to folly to resolve circular depe…
ben-- Jul 16, 2025
cc57449
fix(oss): split folly/rust/string into string & string_sys
ben-- Nov 12, 2025
786afcd
fix(oss): install dotslash to enable the folly/buck2 to run
ben-- Nov 12, 2025
795eb33
fix(oss): fix dependency install; uses conan for all libraries
ben-- Nov 12, 2025
6205a51
fix(oss): properly include tdigest bindings
ben-- Nov 12, 2025
e4a3852
feat(oss): Enable iobuf/bufext now that they work in OSS
ben-- Dec 12, 2025
2a50db2
fix(oss): Refer to the folly-local copy of rust/string
ben-- Nov 12, 2025
7b7c054
fix: add missing noexcept to folly cython files
ben-- Nov 12, 2025
d2e4c9e
fix: Remove unused types from iobuf/bufext
ben-- Nov 12, 2025
64896e9
fix(oss): Properly wrap linker flags with -Wl,
ben-- Nov 12, 2025
48ab6c7
fix(oss): remove broken-in-oss for stuff that is no longer broken
ben-- Nov 12, 2025
2c9d8b5
fix(oss): fix URL in bad_targets so they actually match OSS paths
ben-- Nov 18, 2025
c6b14c8
fix(oss): force use of clang to ensure folly-config.h gets built
ben-- Nov 12, 2025
2c85795
feat(oss): do/build runs the "standard" OSS build
ben-- Nov 12, 2025
0a9b339
fix(oss): fix macos buck build
ben-- Dec 13, 2025
73512f3
wip: add os:linux constraint to transitive dependencies of liburing
ben-- Dec 13, 2025
0bed9be
fix(oss): Only attempt to build configured targets for platform builds
ben-- Dec 17, 2025
66ffaa9
fix: add missing #include <numeric> for std::iota
ben-- Dec 17, 2025
935f618
fix(cmake): Windows and Conan build fixes
ben-- Dec 17, 2025
2919dc2
fix(buck): skip .S assembly files on MSVC
ben-- Dec 17, 2025
df85322
fix(oss): correct macOS linker flags
ben-- Dec 17, 2025
43287e6
fix: use throw/catch for make_exception_ptr
ben-- Dec 17, 2025
bff1623
fix(test): Ignore tests that don't work on windows or apple
ben-- Dec 17, 2025
c8e4266
fix(test): make multipleWait test deterministic
ben-- Dec 23, 2025
a3b8661
fix(test): make CancelTimeout test deterministic
ben-- Dec 23, 2025
34c453a
fix(test): avoid random collision in SimpleSetTest
ben-- Dec 23, 2025
705b224
fix(oss): make all internal defs.bzl references relative
ben-- Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buckconfig.d/common.buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ prelude = prelude
none = none

[cell_aliases]
antlir = gh_facebookincubator_antlir
config = prelude
ovr_config = prelude
bazel_skylib = gh_facebook_buck2_shims_meta
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[cells]
gh_facebookincubator_antlir = gh_facebookincubator_antlir

[external_cells]
gh_facebookincubator_antlir = git

[external_cell_gh_facebookincubator_antlir]
git_origin = https://github.com/facebookincubator/antlir.git
commit_hash = de5b0f6e8b434a72a03f5868fd62533629004a44
90 changes: 45 additions & 45 deletions .github/scripts/bad_targets
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
# This is a list of bad targets that do not build in OSS. Ideally this list goes away
# with time.
root//folly/debugging/exception_tracer:exception_counter
root//folly/debugging/exception_tracer:exception_tracer
root//folly/debugging/exception_tracer:exception_tracer_callbacks
root//folly/debugging/exception_tracer:smart_exception_stack_trace_hooks
root//folly/debugging/exception_tracer:smart_exception_tracer
root//folly/debugging/symbolizer/tool:folly-addr2line
root//folly/debugging/symbolizer/tool:libFollySegFault.so
root//folly/docs/examples/folly:baton_demo
root//folly/docs/examples/folly:cancellation_callback_demo
root//folly/docs/examples/folly:cancellation_source_demo
root//folly/docs/examples/folly:cancellation_token_demo
root//folly/docs/examples/folly:dynamic_converter_demo
root//folly/docs/examples/folly:dynamic_demo
root//folly/docs/examples/folly:executor_guide
root//folly/docs/examples/folly:file_demo
root//folly/docs/examples/folly:format_demo
root//folly/docs/examples/folly:function_demo
root//folly/docs/examples/folly:ipaddress_demo
root//folly/docs/examples/folly:likely_demo
root//folly/docs/examples/folly:map_util_demo
root//folly/docs/examples/folly:scope_guard_demo
root//folly/docs/examples/folly:scope_guard2_demo
root//folly/docs/examples/folly:scoped_event_base_thread_demo
root//folly/docs/examples/folly:scoped_event_base_thread2_demo
root//folly/docs/examples/folly:synchronized_demo
root//folly/docs/examples/folly/container:array_demo
root//folly/docs/examples/folly/dynamic:array_demo
root//folly/docs/examples/folly/dynamic:object_demo
root//folly/docs/examples/folly/coro:async_scope_demo
root//folly/docs/examples/folly/coro:cancellable_async_scope_demo
root//folly/docs/examples/folly/coro:detach_on_cancel_demo
root//folly/docs/examples/folly/coro:promise_demo
root//folly/docs/examples/folly/coro:retry_demo
root//folly/docs/examples/folly/coro:task_demo
root//folly/docs/examples/folly/coro:with_cancellation_demo
root//folly/docs/examples/folly/hash:hash_demo
root//folly/docs/examples/folly/io:i_o_buf_demo
root//folly/experimental/io:async_io
root//folly/experimental/io:simple_async_io
root//folly/logging/example:example
root//folly/python:executor_lib
root//folly/python:fibers_lib
root//folly/python:iobuf_lib
root//folly/tool:benchmark_compare
# with time. Note: Use //folly (not root//folly) so grep -F matches any cell prefix.
//folly/debugging/exception_tracer:exception_counter
//folly/debugging/exception_tracer:exception_tracer
//folly/debugging/exception_tracer:exception_tracer_callbacks
//folly/debugging/exception_tracer:smart_exception_stack_trace_hooks
//folly/debugging/exception_tracer:smart_exception_tracer
//folly/debugging/symbolizer/tool:folly-addr2line
//folly/debugging/symbolizer/tool:libFollySegFault.so
//folly/docs/examples/folly:baton_demo
//folly/docs/examples/folly:cancellation_callback_demo
//folly/docs/examples/folly:cancellation_source_demo
//folly/docs/examples/folly:cancellation_token_demo
//folly/docs/examples/folly:dynamic_converter_demo
//folly/docs/examples/folly:dynamic_demo
//folly/docs/examples/folly:executor_guide
//folly/docs/examples/folly:file_demo
//folly/docs/examples/folly:format_demo
//folly/docs/examples/folly:function_demo
//folly/docs/examples/folly:ipaddress_demo
//folly/docs/examples/folly:likely_demo
//folly/docs/examples/folly:map_util_demo
//folly/docs/examples/folly:scope_guard_demo
//folly/docs/examples/folly:scope_guard2_demo
//folly/docs/examples/folly:scoped_event_base_thread_demo
//folly/docs/examples/folly:scoped_event_base_thread2_demo
//folly/docs/examples/folly:synchronized_demo
//folly/docs/examples/folly/container:array_demo
//folly/docs/examples/folly/dynamic:array_demo
//folly/docs/examples/folly/dynamic:object_demo
//folly/docs/examples/folly/coro:async_scope_demo
//folly/docs/examples/folly/coro:cancellable_async_scope_demo
//folly/docs/examples/folly/coro:detach_on_cancel_demo
//folly/docs/examples/folly/coro:promise_demo
//folly/docs/examples/folly/coro:retry_demo
//folly/docs/examples/folly/coro:task_demo
//folly/docs/examples/folly/coro:with_cancellation_demo
//folly/docs/examples/folly/hash:hash_demo
//folly/docs/examples/folly/io:i_o_buf_demo
//folly/experimental/io:async_io
//folly/experimental/io:simple_async_io
//folly/logging/example:example
//folly/python:executor_lib
//folly/python:fibers_lib
//folly/python:iobuf_lib
//folly/tool:benchmark_compare
2 changes: 1 addition & 1 deletion .github/scripts/buck_build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

TARGETS_FILE=$(mktemp)
./buck2 targets //... | grep -F -v -f .github/scripts/bad_targets | grep -v test >"$TARGETS_FILE"
./buck2 ctargets //... | sed 's/ ([^)]*)$//' | grep -F -v -f .github/scripts/bad_targets | grep -v test >"$TARGETS_FILE"

./buck2 build @"$TARGETS_FILE"
# ./buck2 test @"$TARGETS_FILE"
184 changes: 163 additions & 21 deletions .github/workflows/oss-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
with:
submodules: 'true'
- uses: facebook/install-dotslash@latest
- name: Set PATH for dotslash
run: |
echo "PATH=$PATH:/tmp/install-dotslash/bin" >> $GITHUB_ENV
shell: bash
- name: get_buck_graph
run: |
BUCK_GRAPH=$(./buck2 cquery ... --output-attribute '^buck.type$|^name$')
Expand Down Expand Up @@ -61,25 +65,83 @@ jobs:
- run: sudo apt-get update
shell: bash
- uses: facebook/install-dotslash@latest
- name: Install Rust toolchain
if: needs.get-toolchains-to-install.outputs.uses_rust == 'true'
uses: dtolnay/rust-toolchain@stable

- name: Install C++ toolchain
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
sudo apt-get install cmake llvm cppcheck python3-pip
sudo pip3 install conan==1.*
sudo apt-get install -y \
clang \
cmake \
cppcheck \
git \
lld \
llvm \
pkg-config
shell: bash

- name: Install OCaml toolchain
if: needs.get-toolchains-to-install.outputs.uses_ocaml == 'true'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "5.1"
- name: Install Python toolchain
if: needs.get-toolchains-to-install.outputs.uses_python == 'true'
if: needs.get-toolchains-to-install.outputs.uses_python == 'true' || needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Cython
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: pip install cython
shell: bash
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Install Conan (C/C++ package manager)
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: conan-io/setup-conan@v1
with:
version: "2.23"
- name: Install dependencies via Conan
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
case $(uname -m) in
x86_64) CONAN_ARCH="x86_64" ;;
aarch64) CONAN_ARCH="armv8" ;;
*) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
esac
conan install . \
--build=missing \
--output-folder=conan-build \
--profile=conan-profile-linux-clang \
-s arch=$CONAN_ARCH \
-c tools.system.package_manager:mode=install \
-c tools.system.package_manager:sudo=True

# Required by Conan's CMakeDeps-generated config files
echo "CMAKE_BUILD_TYPE=Release" >> $GITHUB_ENV
CONAN_INCLUDE_DIRS=$(
for pc in $PWD/conan-build/*.pc; do
pkg-config --variable=includedir "$pc" 2>/dev/null
done | sort -u | tr '\n' ':' | sed 's/:$//'
)
if [ -n "$CONAN_INCLUDE_DIRS" ]; then
echo "CMAKE_INCLUDE_PATH=$CONAN_INCLUDE_DIRS" >> $GITHUB_ENV
fi
echo "CMAKE_PREFIX_PATH=$PWD/conan-build:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV

echo "PKG_CONFIG_PATH=$PWD/conan-build:$PKG_CONFIG_PATH" >> $GITHUB_ENV
shell: bash

- name: Install cxx bridge tools
run: cargo install cxxbridge-cmd
shell: bash
- name: Install cxx headers
run: |
sudo mkdir -p /usr/local/include/rust
cxxbridge --header > /tmp/cxx.h
sudo mv /tmp/cxx.h /usr/local/include/rust/cxx.h
shell: bash

- name: buck2 build and test
run: bash ./.github/scripts/buck_build_and_test.sh
windows-os-buck-build-and-test:
Expand All @@ -90,25 +152,60 @@ jobs:
with:
submodules: 'true'
- uses: facebook/install-dotslash@latest
- name: Install Rust toolchain
if: needs.get-toolchains-to-install.outputs.uses_rust == 'true'
uses: dtolnay/rust-toolchain@stable

- name: Install C++ toolchain
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
choco install llvm cmake conan cppcheck -y
choco install cmake cppcheck llvm -y
if ($LASTEXITCODE -eq 3010) { $LASTEXITCODE = 0 }
shell: pwsh

- name: Install OCaml toolchain
if: needs.get-toolchains-to-install.outputs.uses_ocaml == 'true'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "4.12.0"
- name: Install Python toolchain
if: needs.get-toolchains-to-install.outputs.uses_python == 'true'
if: needs.get-toolchains-to-install.outputs.uses_python == 'true' || needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Cython
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: pip install cython
shell: bash
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Install Conan (C/C++ package manager)
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: conan-io/setup-conan@v1
with:
version: "2.23"
- name: Install dependencies via Conan
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
conan install . `
--build=missing `
--output-folder=conan-build `
--profile=conan-profile-windows-msvc `
-s arch=x86_64 `
-c tools.system.package_manager:mode=install

echo "CMAKE_BUILD_TYPE=Release" >> $env:GITHUB_ENV
echo "CMAKE_PREFIX_PATH=$PWD/conan-build;$env:CMAKE_PREFIX_PATH" >> $env:GITHUB_ENV
echo "PKG_CONFIG_PATH=$PWD/conan-build;$env:PKG_CONFIG_PATH" >> $env:GITHUB_ENV
shell: pwsh

- name: Install cxx bridge tools
run: cargo install cxxbridge-cmd
shell: bash
- name: Install cxx headers
run: |
mkdir -p "C:/Program Files/rust/include"
cxxbridge --header > "C:/Program Files/rust/include/cxx.h"
shell: bash

- name: buck2 build and test
run: bash ./.github/scripts/buck_build_and_test.sh
mac-os-buck-build-and-test:
Expand All @@ -119,29 +216,74 @@ jobs:
with:
submodules: 'true'
- uses: facebook/install-dotslash@latest
- name: Install Rust toolchain
if: needs.get-toolchains-to-install.outputs.uses_rust == 'true'
uses: dtolnay/rust-toolchain@stable

- name: Install C++ toolchain
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
brew install cmake llvm cppcheck python3 conan@1
brew install cmake cppcheck llvm pkg-config
shell: bash

- name: Install OCaml toolchain
if: needs.get-toolchains-to-install.outputs.uses_ocaml == 'true'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "5.1"
- name: Install Python toolchain
if: needs.get-toolchains-to-install.outputs.uses_python == 'true'
if: needs.get-toolchains-to-install.outputs.uses_python == 'true' || needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install homebrew deps
- name: Install Cython
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: pip install cython
shell: bash
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Install Conan (C/C++ package manager)
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
uses: conan-io/setup-conan@v1
with:
version: "2.23"
- name: Install dependencies via Conan
if: needs.get-toolchains-to-install.outputs.uses_cxx == 'true'
run: |
case $(uname -m) in
x86_64) CONAN_ARCH="x86_64" ;;
arm64) CONAN_ARCH="armv8" ;;
*) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
esac
conan install . \
--build=missing \
--output-folder=conan-build \
--profile=conan-profile-macos-clang \
-s arch=$CONAN_ARCH \
-c tools.system.package_manager:mode=install

# Required by Conan's CMakeDeps-generated config files
echo "CMAKE_BUILD_TYPE=Release" >> $GITHUB_ENV
CONAN_INCLUDE_DIRS=$(
for pc in $PWD/conan-build/*.pc; do
pkg-config --variable=includedir "$pc" 2>/dev/null
done | sort -u | tr '\n' ':' | sed 's/:$//'
)
if [ -n "$CONAN_INCLUDE_DIRS" ]; then
echo "CMAKE_INCLUDE_PATH=$CONAN_INCLUDE_DIRS" >> $GITHUB_ENV
fi
echo "CMAKE_PREFIX_PATH=$PWD/conan-build:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV

echo "PKG_CONFIG_PATH=$PWD/conan-build:$PKG_CONFIG_PATH" >> $GITHUB_ENV
shell: bash

- name: Install cxx bridge tools
run: cargo install cxxbridge-cmd
shell: bash
- name: Install cxx headers
run: |
BUCK_GRAPH=$(./buck2 cquery "attrregexfilter(labels, 'third-party:homebrew:', deps(//...))" --json --output-attribute=labels)
HOMEBREW_PACKAGES=$(echo $BUCK_GRAPH | jq '[.[] | .labels] | flatten | unique | map(select(contains("third-party:homebrew:")) | sub("third-party:homebrew:"; "")) | .[] | @text')
echo $HOMEBREW_PACKAGES
echo $HOMEBREW_PACKAGES | xargs brew install pkg-config
sudo mkdir -p /usr/local/include/rust
cxxbridge --header > /tmp/cxx.h
sudo mv /tmp/cxx.h /usr/local/include/rust/cxx.h
shell: bash

- name: buck2 build and test
run: bash ./.github/scripts/buck_build_and_test.sh
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ folly/FingerprintTables.cpp
_build
# Ignore all files generated by Buck2
buck-out/
# Conan creations
conan-build/
CMakeUserPresets.json
buck_graph_results.json
2 changes: 1 addition & 1 deletion BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buck_genrule(
])} |
{"CMakeLists.txt": "CMakeListsForBuck2.txt"},
out = "folly-config.h",
cmd = "cmake . && mv folly/folly-config.h $OUT",
cmd = "cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS='-stdlib=libc++' . && mv folly/folly-config.h $OUT",
default_target_platform = "prelude//platforms:default",
labels = [
"third-party:fedora:cmake",
Expand Down
Loading
Loading