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

Access workspace status in a Starlark action #1054

Closed
dfabulich opened this issue Mar 17, 2016 · 8 comments
Closed

Access workspace status in a Starlark action #1054

dfabulich opened this issue Mar 17, 2016 · 8 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: feature request untriaged

Comments

@dfabulich
Copy link
Contributor

https://groups.google.com/forum/#!topic/bazel-discuss/hqyMFjEpJgM

There's apparently no way to access volatile-status.txt in a Skylark action.

@dslomov
Copy link
Contributor

dslomov commented Mar 18, 2016

@damienmg ptal

@damienmg
Copy link
Contributor

Yes there is no nice way to do it, except use a stamped genrule that expose that file to the skylark rule.

@damienmg damienmg added P2 We'll consider working on this in future. (Assignee optional) Skylark labels Mar 18, 2016
@schroederc
Copy link
Contributor

It's possible to add a dependency to the ctx.version_file artifact and read it (as well as ctx.info_file). However, it would be useful to allow Skylark rules access to value of the --stamp setting so that they can conditionally rely on that file when stamping is requested.

This issue also relates tangentially to #849.

@mgyucht
Copy link

mgyucht commented Jun 20, 2016

+1! I would love to be able to do this as well.

@mikedanese
Copy link

Is this even possible with workspace status modeled as an action? What would a solution look like?

@AustinSchuh
Copy link
Contributor

Building off what @schroederc wrote, I'd really love to only stamp when --stamp=true is specified. Which means that I need access to the --stamp flag in skylark.

@laurentlb laurentlb removed this from the 0.6 milestone Oct 6, 2018
@laurentlb laurentlb added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed P2 We'll consider working on this in future. (Assignee optional) labels Apr 5, 2019
@jaksky
Copy link

jaksky commented Sep 18, 2019

Is it possible to access such info(workspace status) from macro?

@meisterT meisterT removed their assignment May 11, 2020
@brandjon brandjon added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Starlark labels Feb 15, 2021
@brandjon brandjon changed the title Access workspace status in a Skylark action Access workspace status in a Starlark action Feb 15, 2021
@brandjon brandjon added untriaged team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts and removed team-Build-Language labels Nov 4, 2022
@sgowroji
Copy link
Member

Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts type: feature request untriaged
Projects
None yet
Development

No branches or pull requests