Skip to content

Commit

Permalink
Merge pull request #2577 from cloudflare/npaun/add-bazel-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
npaun authored Aug 21, 2024
2 parents 03859f5 + 86b225a commit beb8566
Show file tree
Hide file tree
Showing 31 changed files with 535 additions and 458 deletions.
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

0 comments on commit beb8566

Please sign in to comment.