-
-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable stamp support with --[no]stamp and stamp attrs #2110
Add configurable stamp support with --[no]stamp and stamp attrs #2110
Conversation
@jayconrod I can't seem to reproduce the build failure locally, or find the raw non summarized logs. Can you let me know if we can retry or help me out with the logs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change generally looks good, but I'd prefer we not add a stamp
attribute to go_binary
and go_test
.
stamp
is useful on cc_binary
, since all of the keys from --workspace_status_command
may be used. We don't know which binaries need which flags, so we have a mechanism for binaries to say whether they need stamping at all.
With go_binary
, we already explicitly ask for specific keys to be stamped using x_defs
. Setting stamp = 0
and x_defs = {"Timestamp": "{BUILD_TIMESTAMP}"}
wouldn't make sense. Likewise, setting stamp = 1
without setting x_defs
wouldn't make sense.
About the test failures, everything passed except the known failures due to #2100, which we still have no work around for. Don't worry about that for this PR though.
I originally went without the
Happy to remove the stamp attribute, but need some guidance on what to do with the existing tests under |
Ah, I just wrote a new testing thing last weekend that would work for this: So in this case, the test would define a test workspace with a binary to be stamped. It could |
9d301ad
to
bfc4dd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for working on this!
I've just pulled in a revision of
My
This makes sense, however if len(x_defs) > 0, should |
I realised we have two different places |
@munnerz This was intentionally a user-facing change. We were not being consistent with other languages. I can see an argument for adding a |
This adds support for rules_go to make stamping of workspace variables conditional to Bazel's
--nostamp
flag.Fixes #2102.