Add stamp attribute to pkg_tar (in the style of cc_binary(stamp=-1,0,1)#288
Merged
aiuto merged 19 commits intobazelbuild:mainfrom May 6, 2021
Merged
Add stamp attribute to pkg_tar (in the style of cc_binary(stamp=-1,0,1)#288aiuto merged 19 commits intobazelbuild:mainfrom
aiuto merged 19 commits intobazelbuild:mainfrom
Conversation
This is hack upon hack, because Bazel does not make --stamp available directly - add a config setting to mimic --stamp. - This should be available directly from starlark ctx - use the setting to pass a flag to the packager to stamp - have a genrule to copy volatile-status.txt We need this because the packagers can not read it otherwise. - genrule has the 'stamp' attribute, which makes bazel-out/volatile-status.txt availble to it - we can copy it to a new place that other rules can see - This is tedious and not portable, bazel should make it available diretly. - have pkg_tar implicitly depend on the status file - if the builder gets the flag, read the status file to get a time. But actually using the time is not implemented.
stamp attribute to pkg_tar
stamp attribute to pkg_tar
Collaborator
Author
|
@nacl This is ready now. It's not as ugly as I thought it would be. |
This was referenced May 3, 2021
nacl
approved these changes
May 5, 2021
Collaborator
nacl
left a comment
There was a problem hiding this comment.
LGTM -- not particularly ugly, other than the private_stamp_detect attribute.
Most comments other than about private_stamp_detect are mostly nits and documentation suggestions.
Also needs a rebase/merge against main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of #287 This is not pretty, because Bazel does not make --stamp available directly
private_stamp_detect--stampsetting bazel#11164stampattribute topkg_tarstamp&private_stamp_detectto invoke stampingFuture work:
RELNOTES: Add
stamptopkg_tar.