How can I tell Which bazel aspect outputs are still relevant

288 views Asked by At

As part of our efforts to create a bazel-maven transition interop tool (that creates maven sized jars from more granular sized bazel jars), we have written an aspect that runs on bazel build of the entire bazel repo and writes important information to txt files outputs (e.g.: jar file paths, compile deps targets and runtime deps targets, etc.)

We ran across an issue where the repo's code was changed such that some of the txt file were not written anymore. But the old txt file from previous runs (before the code change) remained!

Is there a way to know that these txt files are no longer relevant?

1

There are 1 answers

0
Damien Martin-Guillerez On

You should be able to run with --build_event_json_file=file.json and try to locate generated artifacts. For example we use it on ci.bazel.io to locate actual test.xml file that were generated: https://github.com/bazelbuild/continuous-integration/blob/09975cbb487a84a62ca1e43aa43e7c6fe078f058/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy#L218

The definition of the protocol can be found in build_event_stream.proto