Skip to content

Commit

Permalink
bazel: skip recompilation when using dev+bazel
Browse files Browse the repository at this point in the history
Fixes #71835. When switching between using `dev` and `bazel` raw, I kept
seeing our C++ protobuf dependency getting recompiled (slowly).
It appears that the bazel build for protobuf has a dependency on $PATH
(see bazelbuild/intellij#1169 and bazelbuild/bazel#7095). Specifying
`--incompatible_strict_action_env` pins PATH and avoids the build cache
thrashing we were seeing before.

Release note: None
  • Loading branch information
irfansharif committed Oct 22, 2021
1 parent 6ef0b11 commit ff59b0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
try-import %workspace%/.bazelrc.user

build --symlink_prefix=_bazel/ --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off,gss --experimental_proto_descriptor_sets_include_source_info
build --symlink_prefix=_bazel/ --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off,gss --experimental_proto_descriptor_sets_include_source_info --incompatible_strict_action_env
test --config=test
build:with_ui --define cockroach_with_ui=y
build:test --define gotags=bazel,crdb_test,gss
Expand Down Expand Up @@ -48,3 +48,5 @@ build:devdarwinx86_64 --crosstool_top=@toolchain_dev_darwin_x86-64//:suite
build:devdarwinx86_64 --config=dev
build:dev --define cockroach_bazel_dev=y
build:dev --stamp --workspace_status_command=./build/bazelutil/stamp.sh

# vi: ft=sh

0 comments on commit ff59b0d

Please sign in to comment.