-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Support workspace status values a.k.a. "stamping" in run_binary
#185
Comments
Agreed. We'll add this. |
@kormide Lets model this after what rules_go and rules_nodejs does. |
I've come around to the opinion that we should just use a integer for the stamping value on rules rather than a custom config setting. It's just easier to type. Like rules_python. |
Actually I think I'll take this one, I've already implemented it a few times. |
#186 is the first step, allowing custom rules to use stamping. I'm thinking about your proposal, and there isn't a way to do exactly what you've suggested. The two status files are only paths at analysis time, and only an action can read their content. I think the best we can do is set an environment for that tool like |
Thanks for the quick implementation! Will this ability be inherited by
Ah, too bad, but understandable. |
It will be inherited implicitly via |
FYI, I convinced Alex to change the default stamp value to |
genrule
has an (undocumented)stamp
attribute that gives the command access tobazel-out/stable-status.txt
andbazel-out/volatile-status.txt
.run_binary
should have some way to access workspace status values as well, but in a more ergonomic way. That is, don't make the binary itself responsible for finding and parsing the .txt files -- build that intorun_binary
. Maybestamp = True
puts each workspace status key-value into the environment? Or thestamp
value could be a list of workspace status keys to expose as environment variables.The text was updated successfully, but these errors were encountered: