Skip to content

Commit

Permalink
Update Bazel to 7.1.1, slight cleanup and compatibility improvements
Browse files Browse the repository at this point in the history
7.1 (https://github.com/bazelbuild/bazel/releases/tag/7.1.0) introduces
a number of bug fixes and performance improvements, 7.1.1 has some
additional bug fixes.

- Pass all parameters in kj_test to ensure tags will actually be
  applied, avoiding a considerable footgun.
- Clean up a few globs, allowing us to enable incompatible_disallow_empty_glob
- Flip --legacy_external_runfiles early to avoid generating superfluous
  runfile trees.
- Update wd_ts_bundle to fix --legacy_external_runfiles=false for
  dependents.
  • Loading branch information
fhanau committed Mar 21, 2024
1 parent 46edd48 commit 534d854
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ build --remote_download_all
# Enable webgpu
build --//src/workerd/io:enable_experimental_webgpu=True

# Avoid generating duplicate runfile trees. This will become the default in a future bazel version.
build --legacy_external_runfiles=false

# Flip this early to avoid breaking compatibility once it becomes the default.
build --incompatible_disallow_empty_glob

# Dawn tint build flags
build --@dawn//src/tint:tint_build_glsl_writer=False
build --@dawn//src/tint:tint_build_glsl_validator=False
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.2
7.1.1
2 changes: 2 additions & 0 deletions build/kj_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ def kj_test(
"@//:use_dead_strip": ["-Wl,-dead_strip", "-Wl,-no_exported_symbols"],
"//conditions:default": [""],
}),
data = data,
tags = tags,
)
4 changes: 2 additions & 2 deletions build/wd_ts_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def wd_ts_bundle(
eslint_bin.eslint_test(
name = name + "@eslint",
args = [
"--config $(execpath {})".format(eslintrc_json),
"--parser-options project:$(execpath {})".format(tsconfig_json),
"--config $(location {})".format(eslintrc_json),
"--parser-options project:$(location {})".format(tsconfig_json),
"-f stylish",
"--report-unused-disable-directives",
] + ["$(location " + src + ")" for src in ts_srcs],
Expand Down
13 changes: 7 additions & 6 deletions src/cloudflare/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ wd_ts_bundle(
"internal/*.ts",
"internal/*.js",
],
exclude = [
"internal/test/*",
allow_empty = True,
),
modules = glob(
[
"*.ts",
"*.js",
],
allow_empty = True,
),
modules = glob([
"*.ts",
"*.js",
]),
schema_id = "0xbcc8f57c63814006",
tsconfig_json = "tsconfig.json",
)
5 changes: 1 addition & 4 deletions src/cloudflare/internal/test/d1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ load("//:build/wd_test.bzl", "wd_test")
wd_test(
src = "d1-api-test.wd-test",
args = ["--experimental"],
data = glob([
"*.js",
"*.capnp",
]),
data = glob(["*.js"]),
)
5 changes: 1 addition & 4 deletions src/cloudflare/internal/test/vectorize/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@ load("//:build/wd_test.bzl", "wd_test")

wd_test(
src = "vectorize-api-test.wd-test",
data = glob([
"*.js",
"*.capnp",
]),
data = glob(["*.js"]),
)
5 changes: 1 addition & 4 deletions src/workerd/server/tests/unsafe-module/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ load("//:build/wd_test.bzl", "wd_test")
wd_test(
src = "unsafe-module-test.wd-test",
args = ["--experimental"],
data = glob([
"*.js",
"*.capnp",
]),
data = glob(["*.js"]),
)

0 comments on commit 534d854

Please sign in to comment.