From 701b884fbb99c9cd7faebbbd4a0626f99ed39343 Mon Sep 17 00:00:00 2001 From: StarlarkFmtRollout Bot Date: Fri, 22 May 2026 02:23:58 -0700 Subject: [PATCH] Apply formatting [B] [B] (#777) Summary: Pull Request resolved: https://github.com/facebook/openzl/pull/777 Reviewed By: d16r Differential Revision: D106046569 --- BUCK | 120 +++++++++++++++++++---------------- benchmark/BUCK | 25 ++++---- cli/tests/BUCK | 3 +- cpp/BUCK | 16 +++-- cpp/tests/BUCK | 8 ++- doc/mkdocs/BUCK | 21 +++--- tests/BUCK | 9 ++- tests/registry/BUCK | 3 +- tools/training/BUCK | 21 +++--- tools/visualization_app/BUCK | 36 ++++++----- 10 files changed, 148 insertions(+), 114 deletions(-) diff --git a/BUCK b/BUCK index e0fb75540..d0ef4e2f8 100644 --- a/BUCK +++ b/BUCK @@ -8,29 +8,33 @@ oncall("data_compression") zs_library( name = "config", - headers = public_headers(glob([ - "include/openzl/zl_config.h", - "include/zstrong/zs2_config.h", - ])), + headers = public_headers( + glob([ + "include/openzl/zl_config.h", + "include/zstrong/zs2_config.h", + ]) + ), header_namespace = "", ) zs_library( name = "public_headers", - headers = public_headers(glob( - [ - "include/openzl/*.h", - "include/openzl/codecs/**/*.h", - "include/openzl/detail/**/*.h", - "include/zstrong/*.h", - "include/zstrong/codecs/**/*.h", - "include/zstrong/detail/**/*.h", - ], - exclude = [ - "include/openzl/zl_config.h", - "include/zstrong/zs2_config.h", - ], - )), + headers = public_headers( + glob( + [ + "include/openzl/*.h", + "include/openzl/codecs/**/*.h", + "include/openzl/detail/**/*.h", + "include/zstrong/*.h", + "include/zstrong/codecs/**/*.h", + "include/zstrong/detail/**/*.h", + ], + exclude = [ + "include/openzl/zl_config.h", + "include/zstrong/zs2_config.h", + ], + ) + ), header_namespace = "", propagated_pp_flags = [ zl_fbcode_is_release_pp_flag(), @@ -55,18 +59,20 @@ zs_library( "src/zstrong/transforms/**/graph_*.c", "src/zstrong/shared/**/*.c", ]), - headers = private_headers(glob([ - "src/openzl/common/**/*.h", - "src/openzl/codecs/common/**/*.h", - "src/openzl/codecs/**/common_*.h", - "src/openzl/codecs/**/graph_*.h", - "src/openzl/shared/**/*.h", - "src/zstrong/common/**/*.h", - "src/zstrong/transforms/common/**/*.h", - "src/zstrong/transforms/**/common_*.h", - "src/zstrong/transforms/**/graph_*.h", - "src/zstrong/shared/**/*.h", - ])), + headers = private_headers( + glob([ + "src/openzl/common/**/*.h", + "src/openzl/codecs/common/**/*.h", + "src/openzl/codecs/**/common_*.h", + "src/openzl/codecs/**/graph_*.h", + "src/openzl/shared/**/*.h", + "src/zstrong/common/**/*.h", + "src/zstrong/transforms/common/**/*.h", + "src/zstrong/transforms/**/common_*.h", + "src/zstrong/transforms/**/graph_*.h", + "src/zstrong/shared/**/*.h", + ]) + ), header_namespace = "", exported_deps = [ ":config", @@ -88,14 +94,16 @@ zs_library( "src/zstrong/transforms/**/encode_*.c", "src/zstrong/transforms/encoder_registry.c", ]), - headers = private_headers(glob([ - "src/openzl/compress/**/*.h", - "src/openzl/codecs/**/encode_*.h", - "src/openzl/codecs/encoder_registry.h", - "src/zstrong/compress/**/*.h", - "src/zstrong/transforms/**/encode_*.h", - "src/zstrong/transforms/encoder_registry.h", - ])), + headers = private_headers( + glob([ + "src/openzl/compress/**/*.h", + "src/openzl/codecs/**/encode_*.h", + "src/openzl/codecs/encoder_registry.h", + "src/zstrong/compress/**/*.h", + "src/zstrong/transforms/**/encode_*.h", + "src/zstrong/transforms/encoder_registry.h", + ]) + ), header_namespace = "", compiler_flags = [ # "-mavx2", @@ -124,14 +132,16 @@ zs_library( "src/zstrong/transforms/**/decode_*.c", "src/zstrong/transforms/decoder_registry.c", ]), - headers = private_headers(glob([ - "src/openzl/decompress/**/*.h", - "src/openzl/codecs/**/decode_*.h", - "src/openzl/codecs/decoder_registry.h", - "src/zstrong/decompress/**/*.h", - "src/zstrong/transforms/**/decode_*.h", - "src/zstrong/transforms/decoder_registry.h", - ])), + headers = private_headers( + glob([ + "src/openzl/decompress/**/*.h", + "src/openzl/codecs/**/decode_*.h", + "src/openzl/codecs/decoder_registry.h", + "src/zstrong/decompress/**/*.h", + "src/zstrong/transforms/**/decode_*.h", + "src/zstrong/transforms/decoder_registry.h", + ]) + ), header_namespace = "", deps = [ "fbsource//third-party/lz4:lz4", @@ -151,9 +161,11 @@ zs_library( srcs = glob([ "src/openzl/dict/**/*.c", ]), - headers = private_headers(glob([ - "src/openzl/dict/**/*.h", - ])), + headers = private_headers( + glob([ + "src/openzl/dict/**/*.h", + ]) + ), header_namespace = "", deps = [ ":common", @@ -203,10 +215,12 @@ zs_library( "ovr_config//compiler:msvc": [], }), }), - headers = private_headers(glob([ - "src/openzl/fse/**/*.h", - "src/zstrong/fse/**/*.h", - ])), + headers = private_headers( + glob([ + "src/openzl/fse/**/*.h", + "src/zstrong/fse/**/*.h", + ]) + ), header_namespace = "", exported_deps = [ "fbsource//xplat/secure_lib:secure_string", diff --git a/benchmark/BUCK b/benchmark/BUCK index fa2c530fe..f3eb3bc3a 100644 --- a/benchmark/BUCK +++ b/benchmark/BUCK @@ -26,17 +26,20 @@ SRC_FILE_FLAGS = { zs_cxxbinary( name = "benchmark", - srcs = [( - src_file, - SRC_FILE_FLAGS.get(src_file, []), - ) for src_file in glob( - [ - "**/*.cpp", - ], - exclude = [ - "BenchmarkComponents.cpp", - ], - )], + srcs = [ + ( + src_file, + SRC_FILE_FLAGS.get(src_file, []), + ) + for src_file in glob( + [ + "**/*.cpp", + ], + exclude = [ + "BenchmarkComponents.cpp", + ], + ) + ], headers = glob([ "**/*.h", ]), diff --git a/cli/tests/BUCK b/cli/tests/BUCK index dab7fe78a..e891ac432 100644 --- a/cli/tests/BUCK +++ b/cli/tests/BUCK @@ -419,8 +419,7 @@ python_library( base_module = "", resources = glob(["sample_files/**/*"]) + glob(["profile_files/**/*"]), typing = True, - deps = [ - ], + deps = [], ) custom_unittest( diff --git a/cpp/BUCK b/cpp/BUCK index cbd628551..a41dfee7c 100644 --- a/cpp/BUCK +++ b/cpp/BUCK @@ -12,13 +12,17 @@ cpp_library( srcs = glob([ "src/**/*.cpp", ]), - headers = public_headers(glob([ - "include/**/*.hpp", - ])), + headers = public_headers( + glob([ + "include/**/*.hpp", + ]) + ), header_namespace = "", - private_headers = private_headers(glob([ - "src/**/*.hpp", - ])), + private_headers = private_headers( + glob([ + "src/**/*.hpp", + ]) + ), exported_deps = [ "..:zstronglib", ], diff --git a/cpp/tests/BUCK b/cpp/tests/BUCK index 7b08861e7..8b4e4cb23 100644 --- a/cpp/tests/BUCK +++ b/cpp/tests/BUCK @@ -11,9 +11,11 @@ cpp_unittest( srcs = glob([ "**/*.cpp", ]), - headers = relative_headers(glob([ - "**/*.hpp", - ])), + headers = relative_headers( + glob([ + "**/*.hpp", + ]) + ), header_namespace = "", labels = cross_platform_labels(), deps = [ diff --git a/doc/mkdocs/BUCK b/doc/mkdocs/BUCK index 33e635303..6db9431b7 100644 --- a/doc/mkdocs/BUCK +++ b/doc/mkdocs/BUCK @@ -28,14 +28,19 @@ buck_genrule( name = "static_docs", out = "static_docs.sh", cmd = ( - "echo -e {0} > $OUT && chmod +x $OUT" - .format(shell.quote("\n".join([ - "#!/bin/bash", - "SCRIPT=\\$(readlink -f $0)", - "SCRIPTPATH=\\$(dirname $SCRIPT)", - "cd $SCRIPTPATH", - "$(location :static_docs_build_script) --pwd \\$(hg root)/fbcode/openzl/{}/doc/mkdocs --use-system-python-extension --test".format(BRANCH_NAME), - ]))) + "echo -e {0} > $OUT && chmod +x $OUT".format( + shell.quote( + "\n".join([ + "#!/bin/bash", + "SCRIPT=\\$(readlink -f $0)", + "SCRIPTPATH=\\$(dirname $SCRIPT)", + "cd $SCRIPTPATH", + "$(location :static_docs_build_script) --pwd \\$(hg root)/fbcode/openzl/{}/doc/mkdocs --use-system-python-extension --test".format( + BRANCH_NAME + ), + ]) + ) + ) ), ) diff --git a/tests/BUCK b/tests/BUCK index d6f08ca85..987804169 100644 --- a/tests/BUCK +++ b/tests/BUCK @@ -82,7 +82,8 @@ zs_unittest( ["round_trip/**/*.cpp"], exclude = ["round_trip/test_mlselector.cpp"], ), - headers = glob(["round_trip/**/*.h"]) + [ + headers = glob(["round_trip/**/*.h"]) + + [ "compress/graphs/sddl2/utils.h", ], labels = cross_platform_labels(), @@ -300,7 +301,8 @@ zs_fuzzers( ("LargeInputTest", "FuzzSerialTransform"), ("LargeInputTest", "FuzzSerialGraph"), ], - deps = FUZZER_DEPS + [ + deps = FUZZER_DEPS + + [ "datagen:custom_nodes", ], ) @@ -361,7 +363,8 @@ zs_fuzzers( ("MultiInputTest", "FuzzClusterRoundTrip"), ("MLSelectorMultiInputTest", "FuzzMLSelectorRoundTrip"), ], - deps = FUZZER_DEPS + [ + deps = FUZZER_DEPS + + [ ":ml_selector_utils", ], ) diff --git a/tests/registry/BUCK b/tests/registry/BUCK index 4becd1b24..97b2cd7aa 100644 --- a/tests/registry/BUCK +++ b/tests/registry/BUCK @@ -28,7 +28,8 @@ zs_cxxlibrary( name = "openzl_components", srcs = [ "OpenZLComponents.cpp", - ] + glob([ + ] + + glob([ "components/*.cpp", ]), headers = ["OpenZLComponents.h"], diff --git a/tools/training/BUCK b/tools/training/BUCK index 29821515d..54eefbac6 100644 --- a/tools/training/BUCK +++ b/tools/training/BUCK @@ -6,14 +6,12 @@ oncall("data_compression") zs_cxxlibrary( name = "train", - srcs = - [ - "train.cpp", - ], - headers = - [ - "train.h", - ], + srcs = [ + "train.cpp", + ], + headers = [ + "train.h", + ], deps = [ "../../custom_parsers:custom_parsers", "../ml_selector:ml_selector_trainer", @@ -31,10 +29,9 @@ zs_cxxlibrary( # TODO: Clean up the BUCK rules in this directory zs_cxxlibrary( name = "train_common", - headers = - [ - "train_params.h", - ], + headers = [ + "train_params.h", + ], deps = [ "../../cpp:openzl_cpp", ], diff --git a/tools/visualization_app/BUCK b/tools/visualization_app/BUCK index 5da069e36..34797af46 100644 --- a/tools/visualization_app/BUCK +++ b/tools/visualization_app/BUCK @@ -16,13 +16,16 @@ buck_genrule( name = "yarn-build", out = "yarn-build.sh", cmd = ( - "echo -e {0} > $OUT && chmod +x $OUT" - .format(shell.quote("\n".join([ - "#!/bin/sh", - "pushd \\$(hg root)/fbcode/openzl/{}/tools/visualization_app".format(BRANCH_NAME), - "yarn build", - "popd", - ]))) + "echo -e {0} > $OUT && chmod +x $OUT".format( + shell.quote( + "\n".join([ + "#!/bin/sh", + "pushd \\$(hg root)/fbcode/openzl/{}/tools/visualization_app".format(BRANCH_NAME), + "yarn build", + "popd", + ]) + ) + ) ), ) @@ -35,14 +38,17 @@ buck_genrule( name = "yarn-test", out = "yarn-test.sh", cmd = ( - "echo -e {0} > $OUT && chmod +x $OUT" - .format(shell.quote("\n".join([ - "#!/bin/sh", - "cd \\$(dirname \\$0)", - "cd \\$(hg root)/fbcode/openzl/{}/tools/visualization_app".format(BRANCH_NAME), - "yarn install", - "yarn test:run", - ]))) + "echo -e {0} > $OUT && chmod +x $OUT".format( + shell.quote( + "\n".join([ + "#!/bin/sh", + "cd \\$(dirname \\$0)", + "cd \\$(hg root)/fbcode/openzl/{}/tools/visualization_app".format(BRANCH_NAME), + "yarn install", + "yarn test:run", + ]) + ) + ) ), )