Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoformatting for Bazel files #2577

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

# Apply ruff format to the project
d6d0607a845e6f71084ce272a1c1e8c50e244bdd

# Apply buildifier to the project
f457f19039b82536b35659c1f9cb898a198e6cd1
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y --no-install-recommends clang-format-18
# buildifier won't install properly if specifying a particular version
go install github.com/bazelbuild/buildtools/buildifier@latest
echo "BUILDIFIER=$HOME/go/bin/buildifier" >> $GITHUB_ENV
- name: Install pnpm
uses: pnpm/action-setup@v4
# The pnpm version will be determined by the `packageManager` field in `.npmrc`
Expand Down
15 changes: 11 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ load("@npm//:defs.bzl", "npm_link_all_packages")
cc_capnp_library(
name = "icudata-embed",
srcs = ["icudata-embed.capnp"],
data = ["@com_googlesource_chromium_icu//:icudata"],
defines = ["WORKERD_ICU_DATA_EMBED"],
include_prefix = ".",
visibility = ["//visibility:public"],
data = ["@com_googlesource_chromium_icu//:icudata"],
defines = [ "WORKERD_ICU_DATA_EMBED" ],
)

npm_link_all_packages(name = "node_modules")
Expand Down Expand Up @@ -75,10 +75,17 @@ config_setting(
# Workaround for bazel not supporting negated conditions (https://github.com/bazelbuild/bazel-skylib/issues/272)
selects.config_setting_group(
name = "not_dbg_build",
match_any = [":fast_build", ":opt_build"],
match_any = [
":fast_build",
":opt_build",
],
)

selects.config_setting_group(
name = "use_dead_strip",
match_all = ["@platforms//os:macos", ":set_dead_strip", ":not_dbg_build"],
match_all = [
"@platforms//os:macos",
":set_dead_strip",
":not_dbg_build",
],
)
6 changes: 3 additions & 3 deletions build/BUILD.dawn
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ genrule(
outs = [
"include/dawn/dawn_proc_table.h",
"include/dawn/webgpu.h",
"include/dawn/wire/client/webgpu.h"
"include/dawn/wire/client/webgpu.h",
],
cmd = "$(location :dawn_json_generator) " +
"--dawn-json $(location src/dawn/dawn.json) " +
Expand Down Expand Up @@ -1101,12 +1101,12 @@ cc_library(
"src",
"src/dawn/partition_alloc",
],
visibility = ["//visibility:public"],
deps = [
"@dawn//src/tint/lang/wgsl/features",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@dawn//src/tint/lang/wgsl/features",
],
visibility = ["//visibility:public"],
)

cc_library(
Expand Down
2 changes: 1 addition & 1 deletion build/BUILD.simdutf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ cc_library(
name = "simdutf",
srcs = ["simdutf.cpp"],
hdrs = ["simdutf.h"],
visibility = ["//visibility:public"],
copts = ["-w"],
visibility = ["//visibility:public"],
)
Loading
Loading