https://github.com/aherrmann/bazel-configuration-rebuild
https://github.com/aherrmann/bazel-configuration-rebuild
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aherrmann/bazel-configuration-rebuild
- Owner: aherrmann
- Created: 2021-03-30T09:50:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T09:51:21.000Z (about 5 years ago)
- Last Synced: 2025-03-02T22:18:29.927Z (over 1 year ago)
- Language: Starlark
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duplicate Builds with Configuration Transitions
The target `//:cat` is independent of the user defined build flag `//:flag`.
The target `//:flag_cat` on the other hand depends on the value of the flag and
on `//:cat` as well.
The target `//:cat` is only built once, and cached under the same action cache
key, if the configuration is set via command-line flag.
```
$ bazel clean --expunge; bazel build //:flag_cat --disk_cache=.cache/default --build_event_publish_all_actions --build_event_json_file=default.json
$ bazel clean --expunge; bazel build //:flag_cat --//:flag=different_flag --disk_cache=.cache/different --build_event_publish_all_actions --build_event_json_file=different.json
$ jq 'select(.id.actionCompleted.label == "//:cat")'