Skip to content

Avoid depending on the value of the --stamp flag if possible#1035

Merged
aiuto merged 8 commits intobazelbuild:mainfrom
justinhorvitz:patch-1
Mar 7, 2026
Merged

Avoid depending on the value of the --stamp flag if possible#1035
aiuto merged 8 commits intobazelbuild:mainfrom
justinhorvitz:patch-1

Conversation

@justinhorvitz
Copy link
Contributor

@justinhorvitz justinhorvitz commented Feb 23, 2026

pkg_tar and pkg_zip use a config_setting to read the value of the --stamp build option. This is suboptimal for some new Google-internal caching features. We can restrict this dependency to cases where stamp = -1 on the rule level. The default rule-level attribute is stamp = 0, so this removes the dependency by default.

@cgrindel
Copy link
Collaborator

cgrindel commented Mar 1, 2026

I won't merge this PR yet so that @aiuto can take a look.

Copy link
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay.
This is a subtle one, but I see what you're doing now.

@aiuto aiuto merged commit 94084b0 into bazelbuild:main Mar 7, 2026
6 checks passed
wade-arista added a commit to wade-arista/rules_pkg that referenced this pull request Mar 10, 2026
- Add docstring to get_status_vars() in build_info.py
- Use get_stamp_detect() from util.bzl instead of inline select()
  to match the pattern from PR bazelbuild#1035
- Expand release attr docstring to document stamp variable substitution
- Add stamped RPM example to examples/rpm/system_rpmbuild_pfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants