Skip to content
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 stamp attribute in go_binary rule #2154

Open
TennyZhuang opened this issue Jul 20, 2019 · 1 comment · May be fixed by #3980
Open

Add stamp attribute in go_binary rule #2154

TennyZhuang opened this issue Jul 20, 2019 · 1 comment · May be fixed by #3980

Comments

@TennyZhuang
Copy link
Contributor

What version of rules_go are you using?

0.19.0

What version of gazelle are you using?

commit: 7a19100a6d86a392a2f88e337fbcc60a3e4b154a

Near master

What version of Bazel are you using?

0.24.1

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Linux amd64

What did you expect to see?

Hope the stamp behavior to keep consistent with other language toolchains in https://docs.bazel.build/versions/master/be/overview.html

Many [lang]_binary rule have stamp attribute.

@TennyZhuang TennyZhuang changed the title Add stamp attribute in go_binary rule [Feature Request] Add stamp attribute in go_binary rule Jul 20, 2019
@jayconrod jayconrod changed the title [Feature Request] Add stamp attribute in go_binary rule Add stamp attribute in go_binary rule Jul 29, 2019
@jayconrod
Copy link
Contributor

Context: in #2110, we started respecting the --stamp command line flag. Previously, we stamped unconditionally if x_defs referenced a variable from the workspace status script. Now, we only stamp when --stamp is set.

cc_binary and other rules have a stamp attribute which can be set to -1 (default; observe --stamp flag), 0 (never stamp), or 1 (always stamp). We could have something similar, though it's not clear to me that 0 is meaningful, since we could just not set x_defs.

ian-h-chamberlain added a commit to ian-h-chamberlain/rules_go that referenced this issue Jul 3, 2024
Closes bazel-contrib#2154

Semantics match those of cc_binary, and are limited to just go_binary
for now.
@ian-h-chamberlain ian-h-chamberlain linked a pull request Jul 3, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants