I have an action that captures some system state like version of installed tools, etc. My rules then depend on this state so that I can invalidate the cache for builds when the system state has changed.
How do I make this action run unconditionally on every build without using the local action cache?
I looked into repository_rule and even the `local` attribute there does not give me unconditional execution. I know that people depend on environment variables to capture system state, but I really do want to execute a few commands to get version information, etc.
The other option I know is to include my state in bazel's workspace_status, but that would invalidate cache for targets of all rule types that depend on the volatile or stable status files, and would also slow down every bazel invocation, not just the ones that build targets of my rule type.
Thanks.
Sid
--
This email message, including attachments, may contain private,
proprietary, or privileged information and is the confidential information
and/or property of GRAIL, Inc., and is for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
strictly prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original message.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/afdc0c35-6022-4220-8d9f-9f202d2a7ecd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAJXhWqWE42vay3npVimdpdHVOO0iUkOXgYo8opHcQbm8MD7rmw%40mail.gmail.com.
Can you explain why that doesn't work for you?
echo "STABLE_TOOLS $(determine-tool-versions)"genrule(
name = "tool-versions",
outs = ["tool-versions.txt"],
cmd = "grep '^STABLE_TOOLS' bazel-out/stable-status.txt > $@",
stamp = 1,
)This email message, including attachments, may contain private, proprietary, or privileged information and is the confidential information and/or property of GRAIL, Inc., and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/abcb6fad-2632-4f74-8bc7-99aa992e7729%40googlegroups.com.