Skip to content

Commit 145a75e

Browse files
justinhorvitzkrasimirgg
authored andcommitted
Fix stamping for rules that don't have a stamp attribute (bazelbuild#3829)
Rules that don't have a `stamp` attribute, for example `rust_cc_proto_library_aspect`, should not be treated as stamped. This was broken by bazelbuild#3816 - prior to that, we were returning false because they also don't have a `_stamp_flag ` attribute. By returning true for `rust_cc_proto_library_aspect`, we're unnecessarily including the volatile stamp files as action inputs, which harms build caching. --------- Co-authored-by: Krasimir Georgiev <krasimir@google.com>
1 parent 9f38fb1 commit 145a75e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/private/stamp.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def is_stamping_enabled(attr):
6363
Returns:
6464
bool: The stamp value
6565
"""
66-
stamp_num = getattr(attr, "stamp", -1)
66+
stamp_num = getattr(attr, "stamp", 0)
6767
if stamp_num == 1:
6868
return True
6969
elif stamp_num == 0:

0 commit comments

Comments
 (0)