You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding is that the stamping helpers (which expand_template uses) are designed such that if stamp = 1, then the actions will always be re-run when volatile-status.txt changes. However, if I make a simple target and test that, it does not happen.
Version
Development (host) and target OS/architectures: linux/amd64
Output of bazel --version: bazel 7.1.2
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: 2.7.6
Language(s) and/or frameworks involved: none
How to reproduce
1. Add the following to a BUILD file:
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
expand_template(
name = "stamped",
out = "_stamped.tags.txt",
stamp = 1,
stamp_substitutions = {"BUILD_VERSION": "{{BUILD_TIMESTAMP}}"},
template = [
"BUILD_VERSION",
],
)
run bazel build :stamped
run cat bazel-bin/_stamped.tags.txt
wait a couple seconds
run bazel build :stamped
run cat bazel-bin/_stamped.tags.txt
observe that the same thing was printed in steps 3 and 6.
### Any other information?
_No response_
The text was updated successfully, but these errors were encountered:
What happened?
My understanding is that the stamping helpers (which
expand_template
uses) are designed such that ifstamp = 1
, then the actions will always be re-run when volatile-status.txt changes. However, if I make a simple target and test that, it does not happen.Version
Development (host) and target OS/architectures: linux/amd64
Output of
bazel --version
: bazel 7.1.2Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: 2.7.6Language(s) and/or frameworks involved: none
How to reproduce
bazel build :stamped
cat bazel-bin/_stamped.tags.txt
bazel build :stamped
cat bazel-bin/_stamped.tags.txt
The text was updated successfully, but these errors were encountered: