-
Notifications
You must be signed in to change notification settings - Fork 4.1k
dev,bazel: actions/build cache partially discarded when switching between dev and bazel #71835
Copy link
Copy link
Closed
Labels
A-build-systemC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
Describe the problem
I'm seeing the we're doing additional work when switching between dev and raw bazel. Not a problem in of itself, but curious why. bazelbuild/bazel#10902?
To Reproduce
$ ./dev build cockroach-short
$ bazel build //pkg/cmd/cockroach-short:cockroach-short
INFO: Analyzed target //pkg/cmd/cockroach-short:cockroach-short (1 packages loaded, 2825 targets configured).
INFO: Found 1 target...
Target //pkg/cmd/cockroach-short:cockroach-short up-to-date:
_bazel/bin/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short
INFO: Elapsed time: 1.891s, Critical Path: 0.75s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Successfully built binary for target //pkg/cmd/cockroach-short:cockroach-short at cockroach-short
$ ./dev build cockroach-short
$ bazel build //pkg/cmd/cockroach-short:cockroach-short
INFO: Analyzed target //pkg/cmd/cockroach-short:cockroach-short (1 packages loaded, 2825 targets configured).
INFO: Found 1 target...
Target //pkg/cmd/cockroach-short:cockroach-short up-to-date:
_bazel/bin/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short
INFO: Elapsed time: 1.649s, Critical Path: 0.66s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Successfully built binary for target //pkg/cmd/cockroach-short:cockroach-short at cockroach-short
$ bazel build //pkg/cmd/cockroach-short:cockroach-short
INFO: Analyzed target //pkg/cmd/cockroach-short:cockroach-short (1 packages loaded, 5 targets configured).
INFO: Found 1 target...
INFO: From Linking external/com_google_protobuf/libprotobuf_lite.a:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/_objs/protobuf_lite/io_win32.o has no symbols
[76 / 279] 16 actions, 15 running
Compiling src/google/protobuf/util/internal/default_value_objectwriter.cc; 3s darwin-sandbox
Compiling src/google/protobuf/util/internal/field_mask_utility.cc; 3s darwin-sandbox
Compiling src/google/protobuf/util/field_comparator.cc; 2s darwin-sandbox
Compiling src/google/protobuf/util/field_mask_util.cc; 2s darwin-sandbox
Compiling src/google/protobuf/util/internal/datapiece.cc; 2s darwin-sandbox
Compiling src/google/protobuf/text_format.cc; 2s darwin-sandbox
Compiling src/google/protobuf/timestamp.pb.cc; 1s darwin-sandbox
Compiling src/google/protobuf/type.pb.cc; 1s darwin-sandbox ...Expected behavior
The final command simply being able to re-use existing cached artifacts/analysis.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-build-systemC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)