Is there a way to see the mnemonics of actions that are running?

210 views
Skip to first unread message

Mike Morearty

unread,
Jun 11, 2017, 1:27:54 AM6/11/17
to bazel-discuss
We're using the remote cache (--spawn_strategy=remote), and we are having to do some fine-tuning in order to turn off the cache for certain actions. For example, when we generate tar files, we don't want to use the remote cache, because (a) building tar files locally is just as fast as downloading them, and (b) some of our tar files can be really enormous.

So I'd like to have our .bazelrc files specify a different strategy for some actions, e.g. --strategy=PackageTar=standalone.

Here's the tricky part: In order to override the strategy, you need to know the mnemonic. E.g. for the "pkg_tar" rule, the relevant action has the mnemonic "PackageTar". I found that in the bazel source. Some others are quite a bit trickier to figure out.

Is there any way I can get bazel to tell me the mnemonics of the actions it is executing? I looked into a variety of options, such as --profile, --explain, --verbose_explanations, --subcommands, but couldn't figure out a way.

Thanks! - Mike Morearty

László Csomor

unread,
Jun 12, 2017, 3:57:11 AM6/12/17
to bazel-discuss
Hey, thanks for your email!
We recommend posting Bazel related questions on StackOverflow using the 'bazel' tag. We will be happy to answer it there, so that other users can also benefit. I forwarded your question to: https://stackoverflow.com/questions/44494170/is-there-a-way-to-see-the-mnemonics-of-actions-that-are-running

Cheers,
Laszlo

William Chargin

unread,
Jul 12, 2019, 2:40:05 AM7/12/19
to bazel-discuss
Cross-posting from that Stack Overflow question, in case people run
across this thread: this can be done with `bazel aquery` [1]. I posted
an answer on Stack Overflow with a few more details [2].


Reply all
Reply to author
Forward
0 new messages