When running aquery
on a target, I can see two actions being performed by bazel:
bazel aquery '//bazel_test/a:foo'
action 'Writing file bazel_test/a/foo.manifest'
Mnemonic: FileWrite
Target: //bazel_test/a:foo
Configuration: k8-fastbuild
ActionKey: <hash>
Inputs: []
Outputs: [bazel-out/k8-fastbuild/bin/bazel_test/a/foo.manifest]
action 'Writing: bazel-out/k8-fastbuild/bin/bazel_test/a/foo.tar'
Mnemonic: PackageTar
Target: //bazel_test/a:foo
Configuration: k8-fastbuild
ActionKey: <hash>
Inputs: [bazel-out/k8-fastbuild/bin/bazel_test/a/foo.manifest, ...]
Outputs: [bazel-out/k8-fastbuild/bin/bazel_test/a/foo.tar]
I am interested in the manifest file because I want to see the resulting file tree of the files in foo.tar
.
Is there a way to only do the first of these action and write the manifest file without writing the tar file?
I looked through different flags to use when building but I did not find a suitable one. I was thinking the maybe --nobuild
would work but that actually skips the execution phase and thus skipping both of the actions above. I have the ActionKey
, so I was thinking maybe there is a way to execute an action if you have the ActionKey
.
There is a question closely related to this but it does not specifically mention how to create the manifest file without running the action after it. How do I get output files for a given Bazel target?