-
Notifications
You must be signed in to change notification settings - Fork 122
/
.bazelrc
79 lines (61 loc) · 3.22 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Release configuration
build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release"
build:release --stamp
# ======================================================================================================================
# Support for debugging Node.js tests
# Use `--config=debug` to enable these settings
# Use bazel run with `--config=debug` to turn on the NodeJS inspector agent.
# The node process will break before user code starts and wait for the debugger to connect.
# Pass the --inspect-brk option to all tests which enables the node inspector agent.
# See https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more details.
run:debug -- --node_options=--inspect-brk
# Stream stdout/stderr output from each test in real-time.
# See https://docs.bazel.build/versions/master/user-manual.html#flag--test_output for more details.
test:debug --test_output=streamed
# Run one test at a time.
test:debug --test_strategy=exclusive
# Prevent long running tests from timing out.
# See https://docs.bazel.build/versions/master/user-manual.html#flag--test_timeout for more details.
test:debug --test_timeout=9999
# Always run tests even if they have cached results.
test:debug --nocache_test_results
# ======================================================================================================================
###############################
# Filesystem interactions #
###############################
# Turn off legacy external runfiles
build --nolegacy_external_runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles
# Turn on --incompatible_strict_action_env which was on by default
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
# This flag is needed to so that the bazel cache is not invalidated
# when running bazel via `yarn bazel`.
# See https://github.com/angular/angular/issues/27514.
build --incompatible_strict_action_env
run --incompatible_strict_action_env
test --incompatible_strict_action_env
# Do not build runfile trees by default. If an execution strategy relies on runfile
# symlink teee, the tree is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
build --nobuild_runfile_links
build --enable_runfiles
# Keep tests tagged "exclusive" in the sandbox
test --incompatible_exclusive_test_sandboxed
test --build_tests_only
###############################
# Output #
###############################
# A more useful default output mode for bazel query
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
query --output=label_kind
# By default, failing tests don't print any output, it goes to the log file
test --test_output=errors
####################################################
# User bazel configuration
# NOTE: This needs to be the *last* entry in the config.
####################################################
# Load any settings which are specific to the current user. Needs to be *last* statement
# in this config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user