Skip to content

Commit 52231ef

Browse files
authored
Added compatibility flags to .bazelrc to prevent regressions (#1789)
1 parent 91cd399 commit 52231ef

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

.bazelrc

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
# `.bazelrc` is a Bazel configuration file.
2-
# https://bazel.build/docs/best-practices#bazelrc-file
1+
###############################################################################
2+
## Bazel Configuration Flags
3+
##
4+
## `.bazelrc` is a Bazel configuration file.
5+
## https://bazel.build/docs/best-practices#bazelrc-file
6+
###############################################################################
7+
8+
# https://bazel.build/docs/windows#symlink
9+
startup --windows_enable_symlinks
10+
11+
###############################################################################
12+
## Unique configuration groups
13+
###############################################################################
314

415
# Enable rustfmt for all targets in the workspace
516
build:rustfmt --aspects=//rust:defs.bzl%rustfmt_aspect
@@ -9,9 +20,19 @@ build:rustfmt --output_groups=+rustfmt_checks
920
build:clippy --aspects=//rust:defs.bzl%rust_clippy_aspect
1021
build:clippy --output_groups=+clippy_checks
1122

12-
# https://bazel.build/docs/windows#symlink
13-
startup --windows_enable_symlinks
23+
###############################################################################
24+
## Incompatibility flags
25+
###############################################################################
26+
27+
# https://github.com/bazelbuild/bazel/issues/8195
28+
build --incompatible_disallow_empty_glob=true
29+
30+
###############################################################################
31+
## Custom user flags
32+
##
33+
## This should always be the last thing in the `.bazelrc` file to ensure
34+
## consistent behavior when setting flags in that file as `.bazelrc` files are
35+
## evaluated top to bottom.
36+
###############################################################################
1437

15-
# This import should always be last to allow users to override
16-
# settings for local development.
1738
try-import %workspace%/user.bazelrc

0 commit comments

Comments
 (0)