Skip to content

Commit f198dde

Browse files
Fix stamping for rules that don't have a stamp attribute (#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 #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 9586468 commit f198dde

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
@@ -10,7 +10,7 @@ def is_stamping_enabled(ctx, attr):
1010
Returns:
1111
bool: The stamp value
1212
"""
13-
stamp_num = getattr(attr, "stamp", -1)
13+
stamp_num = getattr(attr, "stamp", 0)
1414
if stamp_num == 1:
1515
return True
1616
elif stamp_num == 0:

0 commit comments

Comments
 (0)