You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Description of the problem / feature request:
A starlark rule can support stamping by looking at the
ctx.version_file
orctx.info_file
field. However, this field does not appear in the documentation forctx
. Same goes forctx.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:
bazel/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/StarlarkRuleContextApi.java
Line 516 in 656cc06
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
?Have you found anything relevant by searching the web?
There's uses of
ctx.version_file
in various rules repos includingrules_go
,rules_nodejs
and so on. That suggests to me that the API is expected to remain stable.Related: #4942
The text was updated successfully, but these errors were encountered: