Skip to content

Documentation issue: ctx.version_file is undocumented #11607

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

Closed
adam-azarchs opened this issue Jun 17, 2020 · 1 comment
Closed

Documentation issue: ctx.version_file is undocumented #11607

adam-azarchs opened this issue Jun 17, 2020 · 1 comment

Comments

@adam-azarchs
Copy link
Contributor

Description of the problem / feature request:

A starlark rule can support stamping by looking at the ctx.version_file or ctx.info_file field. However, this field does not appear in the documentation for ctx. Same goes for ctx.info_file.

Feature requests: what underlying problem are you trying to solve with this feature?

The semantics of version stamping in starlark rules are far from clear. How can they use stamp information if and only if building with --stamp? How can they specify stamping be on by default? And so on. I needed to read through the implementation of go_binary to figure out what I did.

It seems a little bit strange that the documentation is missing, because there does appear to be documentation attached to the field in the java definition of the starlark API:


though I am not familiar with the process by which that documentation gets bubbled up to the documentation on the web. That would be a good start, although as I said it would be nice to also document the conditions under which that field is or is not populated.

What's the output of bazel info release?

release 3.3.0

Have you found anything relevant by searching the web?

There's uses of ctx.version_file in various rules repos including rules_go, rules_nodejs and so on. That suggests to me that the API is expected to remain stable.

Related: #4942

@laurentlb
Copy link
Contributor

Duplicate with #9363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants