Open ghost opened 2 years ago
What do you mean by a "tree artifact"?
What do you mean by a "tree artifact"?
https://bazel.build/reference/glossary#artifact sums it up better than I could. :)
A source file or a generated file. Can also be a directory of files, known as "tree artifacts". Tree artifacts are black boxes to Bazel: Bazel does not treat the files in tree artifacts as individual artifacts and thus cannot reference them directly as action inputs / outputs. An artifact can be an input to multiple actions, but must only be generated by at most one action.
I.e. when an action produces a directory (as declared by ctx.actions.declare_directory
), that output directory is a tree artifact.
Aha. So since passing a directory to Args.add_all()
actually adds each file recursively found in that directory, we just switch to using Args
?
I am trying to use generate Javadoc from auto-generated Java sources (e.g. Java bindings generated from WSDL). My Java source generator produces a tree artifact. However, I cannot provide tree artifacts to
javadoc_library
, becausejavadoc_library
simply passessrcs
directly to thejavadoc
command-line. As a result, the action fails with the following: